1 - Create a new space in OSIO prod-preview
1a - choose create new codebase,
1b - select sprint boot, REST API, select build pipeline
1c- once create go to open workspace to make sure the workspace is correctly initialized.
2 - Following instructions given by David @davidfestal in as per HK issue to clean workspace, the steps as followed:
2a - login to prod-preview with:
oc login https://api.dsaas-stg.openshift.com —token=XXX
2b - Get pod name for che-tenant-maintainer from dssas preview and port forward:
oc port-forward che-tenant-maintainer-3-ldkgn 8080
2c - Call the API with OSIO prod-preview token of the user to delete + username in headers:
curl -X POST -d "@curl_clean_workspaces.txt" http://localhost:8080/cleanWorkspaces -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" -H "X-User-Namespace: ckrych-preview-che" -verbose
{"code":0,"message":"","details":"should remove workspace7bx5hsjf2wybyr9k\nshould remove workspacels2b15013jxefd2b\n”}
with curl_clean_workspaces.txt:
{
"delete-all-workspaces": "true",
"debug-logs": "true"
}
got a 200 with this error:
{"code":1,"message":"Failure during cleaning of workspace files: Command failed with the following code: 1 and termination message: rm: cannot remove '/pvroot/workspacemynwdmj476xfysuh/projects': Permission denied\nrm: cannot remove '/pvroot/workspacemynwdmj476xfysuh/che-logs/dev-machine': Permission denied\n","details":"removing workspacemynwdmj476xfysuh\n"}
when looking at https://che.prod-preview.openshift.io/dashboard/#/workspaces no workspace is displayed (it looks like it was deleted).
Expected: No error displayed.