-
Notifications
You must be signed in to change notification settings - Fork 66
API to cleanup inactive users #4606
Comments
Cleaning up Che workspaces fabric8-services/fabric8-auth#721 |
@ibuziuk @l0rd We need an API on the Che side which we could call and that would gracefully clean-up everything on the Che side for a given user. I see there are a couple of APIs which do something with cleanup and deletion:
Could you help me with a single API to accomplish a complete user cleanup on the Che side? Currently, AFAIK deleting the username-che namespace ( outside of (1) (2) ) causes issues on che-server. |
@sbose78 currently there is no API that would both stop / delete all the workspaces and user itself from the Che db. This API should probably be provided by che-starter that plays the role of API adapter but there were no plans to implement it in the nearest future. @l0rd do you think we should prioritize this task ?
Yeah, just deleting namespace might have unpredictable side-effects (at least all running workspaces should be stopped). For now it should be enough just to call:
This would delete all the existing workspaces and after that deleting *-che namespace could be done. @davidfestal maybe you have some comments ? |
OK, thanks @ibuziuk . So we'll consider this to be the 'user cleanup' API for a user's Che objects |
@alexeykazakov may I ask why we need that? |
Related for build: Jenkins proxy deletion API: #4454 |
@sbose78 the entry point here should be reg app I think... So, our flow should be:
It means we will need new API in the reg app (if it doesn't exist yet). WDYT? |
@kwk to control cluster resources used by OSIO. |
@alexeykazakov , Agreed. Here's my understanding. Today: Henceforth,
|
@sbose78 Following instructions given by David @davidfestal in as per HK issue to clean workspace, the steps as followed:
2 - Get pod name for che-tenant-maintainer from dssas preview and port forward:
3 - Call the API with OSIO prod-preview token of the user to delete + username in headers:
with curl_clean_workspaces.txt:
got a 200 with this error:
when looking at https://che.prod-preview.openshift.io/dashboard/#/workspaces no workspace is displayed (it looks like it was deleted). @alexeykazakov @sbose78 not sure how we want to call this API, is it auth-service that is going to call it? as the OSIO token of the user we want to delete is required, is there a way to generate an OSIO token for a given username? |
Deletion issue tracked with fabric8-services/che-tenant-maintainer#28 |
As per discussion in MM quoting shoubhik: |
We need some single endpoint which we can call to cleanup resources of an inactive (TBD) user:
Sub tasks:
The text was updated successfully, but these errors were encountered: