How to admin force close notebooks?

Based on Datalore server logs (Docker) there are some notebook sessions running:

Kmi2fC6bXqIwo3ianK [with source P5QjKmi2fC6bXqIwo3ianK/JkGt4TqadydcnSa8bx4VHi]
datalore-env-datalore-1  | 09:53:01.343 INFO  [Computation edt_5_5] j.d.n.s.c.c.ComputationControllerImpl    Setting computation status to COMPUTATION_CREATED for NOTEBOOK session dEr50IABZTLbTMkWzSyVvY owned by ANFIAouVqBeuSizaLr2WUX [with source ANFIAouVqBeuSizaLr2WUX/NkL7rF0ptKkQYRQ6yk3puF]
datalore-env-datalore-1  | 09:53:01.345 INFO  [Computation edt_1_1] j.d.n.s.c.c.ComputationControllerImpl    Setting computation status to COMPUTATION_CREATED for NOTEBOOK session RdoFnXQIlT5vhzAHZ5Owj1 owned by ANFIAouVqBeuSizaLr2WUX [with source ANFIAouVqBeuSizaLr2WUX/aze8JwW4ewhWjdSxZuT6AS]
datalore-env-datalore-1  | 09:54:33.873 INFO  [Computation edt_5_5] j.d.n.s.c.controller.ComputationHolder   Computation NOTEBOOK session 11jBI5JmSyDAZkP02NNhwR owned by jpakWHY96DJCdQzqc2pdJr [with source jpakWHY96DJCdQzqc2pdJr/ZhEFb4jsSucQ0erGClENKY] can be disposed: true false
datalore-env-datalore-1  | 09:54:33.876 INFO  [Computation edt_5_5] j.d.n.s.c.c.ComputationControllerImpl    Setting computation status to NONE for NOTEBOOK session 11jBI5JmSyDAZkP02NNhwR owned by jpakWHY96DJCdQzqc2pdJr [with source jpakWHY96DJCdQzqc2pdJr/ZhEFb4jsSucQ0erGClENKY]
datalore-env-datalore-1  | 09:54:37.127 INFO  [Datalore EDT Manager] j.d.a.s.i.i.BaseInstanceManager          Agent basic-agent-St3WWoZjWJvgiBWz has been destroyed
datalore-env-datalore-1  | 09:56:03.464 INFO  [Computation edt_8_8] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for Ruyk3X3SoXonkhow3e5pXy(ANFIAouVqBeuSizaLr2WUX/dsHXtUkU4isKuvtU1P7hWY) to -1
datalore-env-datalore-1  | 09:56:03.464 INFO  [Computation edt_6_6] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for Db9dkrqdMX935BnMbYhUci(ANFIAouVqBeuSizaLr2WUX/ov0LfXfwhzwxyVn8MBYX61) to -1
datalore-env-datalore-1  | 09:56:03.464 INFO  [Computation edt_9_9] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for NT7ZSjXKVxZkpFmGg496Ie(ANFIAouVqBeuSizaLr2WUX/zbOagglDGuqojXBrrkfDpL) to -1
datalore-env-datalore-1  | 09:56:03.477 INFO  [Computation edt_7_7] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for S0mb9fqUEmFdlLMEnejONT(ANFIAouVqBeuSizaLr2WUX/qNJXOSSZIxpJx5rsYGwjxW) to -1
datalore-env-datalore-1  | 09:56:03.491 INFO  [Computation edt_0_0] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for F6SaSrQ2TuKBg9OvpaAjfP(ANFIAouVqBeuSizaLr2WUX/eEgByq3DqF2WM75O1pSOkI) to -1
datalore-env-datalore-1  | 09:56:03.640 INFO  [Computation edt_1_1] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for c1lvwfYQ4gTTnJcONAWg02(P5QjKmi2fC6bXqIwo3ianK/irKFc6umycNAbZmASQv69G) to -1
datalore-env-datalore-1  | 09:56:03.653 INFO  [Computation edt_3_3] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for 0zTaWTK6jVItH1545GQwmA(ANFIAouVqBeuSizaLr2WUX/OJYwmCnBQEeF0ntNb9dJb8) to -1
datalore-env-datalore-1  | 09:56:03.656 INFO  [Computation edt_2_2] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for Ogie9kyUJTnJfh8U0Xdaud(P5QjKmi2fC6bXqIwo3ianK/JkGt4TqadydcnSa8bx4VHi) to -1
datalore-env-datalore-1  | 09:56:03.656 INFO  [Computation edt_4_4] j.d.n.s.c.c.BackgroundComputationController Updating idle timeout for hGMYnhchA3jL3hPHbj4Pdz(ANFIAouVqBeuSizaLr2WUX/AbyRODYdzTPinIEUo8znbL) to -1
datalore-env-datalore-1  | 09:56:03.668 INFO  [Com

As a sysadmin, I need to release the server resources (RAM, etc.) for other tasks. How can I force close these notebooks without asking the users?

I figured it out.

You need to stop the underlying Docker containers, named basic-agent.

To close all Datalore notebook instances:

docker stop $(docker ps -a -q --filter name=basic-agent --format="{{.ID}}")

If you have dozens of them running does wonders for your RAM.

As an instance admin, you can stop any running computation from the Admin panel:

You can click on the button to stop it. but sometimes I’ve ran into a bug that causes the container to freeze up. I have not clue why they try to stop the instance ‘gracefully’ but sometimes you have to go in and kill the container yourself, it gets annoying when you can’t just grab the name of the container you want to kill since you only see that in the terminal of an active healthy instance. So you have to get the names of all the other containers that are healthy to not stop everyones workflow with something like ‘microk8s kubectl delete pod -l podType=dataloreKubernetesAgent’