Version:
Domino 5.x
Issue:
If you are unable to delete a workspace that appears Stopped and see a message like "Workspace cannot be deleted from current state", it likely means that the mongo collections that record the status of a workspace and workspace session did not correctly receive all of the information required to put the workspace in a completely "Stopped" status that allows it to be deleted.
Root Cause:
There are mongoDB collections that record the status of a Workspace and of each individual session of a Workspace. If the communication path to mongoDB is unavailable or unhealthy it is possible that not all of the proper information associated with the shutdown of a workspace gets recorded correctly.
To check the records for a Workspace and it's latest session and verify this is the issue occurring, you will need the WorkspaceId and Workspace SessionId. These can both be found in a Workspace's history by going to History>>Sessions. Select the latest session and find your workspaceId and sessionId from the URL:
Next go to the MongoDB CLI in the admin UI, Admin>>Advanced>>MongoDB.
Check the Workspace record
rs.secondaryOk()
db.workspace.find({"_id": ObjectId("<workspaceId>")})
Results will look like this:
{ "_id" : ObjectId("64b9af0415dc470ecd76ddc1"), "projectId" : ObjectId("63bef167dac2b02870d01981"), "ownerId" : ObjectId("63bef165dac2b02870d0197f"), "name" : "DSE 5.5", ...... "state" : "Stopped", "stateUpdatedAt" : ISODate("2023-08-10T20:14:37.642Z"), "sessionStats" : { "runTimeSec" : NumberLong(0), "lastEndTime" : ISODate("2023-08-10T20:14:37.642Z"), "lastStartTime" : ISODate("2023-08-10T17:00:09.654Z") }, "markedForDeleteTime" : null, "startRequested" : null, "currentSessionId" : null, "stopRequested" : null }
In the results above, the most important values for a properly Stopped and ready to be deleted Workspace are "state", "startRequested", "currentSessionId", and "stopRequested". If any of these are different from the above, you'll need to run a query to update the Workspace as detailed under 'Resolution' below.
Check the most recent Workspace Session
rs.secondaryOk()
db.workspace_session.find({"_id": ObjectId("<sessionId>")})
Results will look like this:
{ "_id" : ObjectId("64d51787384ff45e1185bbb3"), "workspaceId" : ObjectId("64b9af0415dc470ecd76ddc1"), "executionId" : ObjectId("64d51787384ff45e1185bbb4"), ...... "start" : { "time" : ISODate("2023-08-10T16:59:51.632Z") }, "sessionExecutionState" : "Ended", "rawExecutionDisplayStatus" : "Stopped", "rawExecutionDisplayStatusUpdatedAt" : ISODate("2023-08-10T20:14:37.642Z"), ..... "end" : { "time" : ISODate("2023-08-10T20:14:37.670Z"), "exitStatus" : "Succeeded", "repoDirty" : true } }
In the results above, the most important values for a properly Stopped and ready to be deleted Workspace Session are "sessionExecutionState" and "rawExecutionDisplayStatus". If any of these are different from the above, you'll need to run a query to update the Workspace Session as detailed under 'Resolution' below.
Resolution:
Fixing these records to allow a problematic Workspace to be deleted requires running mongo queries to update the mongo database. If your administrator is comfortable making a mongo database change like this, the process is below.
If your administrator is not comfortable with making this change, the Domino Support team can
assist. We still treat these changes with care and document a change request internally. This can take us a day or two to get approved and turned around.
Manual editing of the mongo database that backs Domino is not recommended. It is an inherently dangerous task and incorrect changes in the mongo database can make an entire deployment inaccessible.
To update the Workspace record:
db.workspace.update({"_id" : ObjectId("<workspaceId>")},
{$set: {"state": "Stopped", "currentSessionId": null, "stopRequested": null,
"startRequested": null}})
To update the Workspace Session record:
db.workspace_session.update({"_id" : ObjectId("<SessionId>")},
{$set: {"sessionExecutionState" : "Ended", "rawExecutionDisplayStatus" : "Stopped"}})
After checking and updating the mongoDB records for a Workspace and its latest Session as described above, you should now be able to go back to the Domino UI and successfully delete the Workspace.
Comments
0 comments
Article is closed for comments.