Replies: 3 comments
-
I do approve this idea. Note to anybody else who sees this, it is about how cocalc runs as part of cocalc-docker (not cocalc.com or cocalc-cloud). This wouldn't impact anything except cocalc-docker, and would be relatively easy to change. Of course, you can also run cocalc directly in the same mode as cocalc-docker which is why the remark ("This is usable for non-docker installation (I exproring some way to integrate cocalc with other services,like nextcloud, etc), and of course, also may be global setting 'disable user tuning' to disable this for docker version of cocalc."). I would be fine with a simpler solution -- just never delete the user. I.e., delete the one line of code that deletes the user. That would be really easy for you to implement. |
Beta Was this translation helpful? Give feedback.
-
According this discussion, deleting of user disabled in this.stateChanging = { state: "stopping" };
await this.saveStateToDatabase(this.stateChanging);
await stopProjectProcesses(this.project_id);
// await deleteUser(this.project_id); and all looks OK for 9 month...
that also fires sometimes (deletes user that something wrong in path) that complicates debugging and looks inconsistent. |
Beta Was this translation helpful? Give feedback.
-
Not exactly. Not deleting users resulted in situations where projects wouldn't start, because there was code in cocalc-docker that assumed the user had been deleted, and that code broke if this wasn't true, in some cases. I fixed this 4 days ago, since I kept running into stuck projects that wouldn't restart without killing all relevant processes of that user, and when I tracked it down, this was why: That said, I'm totally in support of this ticket and adding an admin setting to not delete user when project stops, at least on cocalc docker. You just have to edit a file in packages/util/db-schema/settings to add such a setting, and then use it via |
Beta Was this translation helpful? Give feedback.
-
Right now, cocalc-hub creates ephemeral users when corresponding projects are running and deletes then after project is stopped.
May be, it is good for security, but we losing lot of usecases:
Lets add simple checkbox «dont delete user when project stopped»!
Actually, this is connected to #6277 but looks little simpler (one checkbox on project settigs UI, little patching on
src/packages/server/projects/control/multi-user.ts
…This is usable for non-docker installation (I exproring some way to integrate cocalc with other services,like nextcloud, etc), and
of course, also may be global setting 'disable user tuning' to disable this for docker version of cocalc.
If you approve the idea, I will try to implement it.
Beta Was this translation helpful? Give feedback.
All reactions