jupyterhub / systemdspawner

Spawn JupyterHub single-user notebook servers with systemd
BSD 3-Clause "New" or "Revised" License
92 stars 45 forks source link

OOM policy "continue" not supported in Centos/Rocky linux 8 #105

Closed caseybea closed 1 year ago

caseybea commented 1 year ago

I have a server running Rocky Linux 8 (basically, Centos 8..). Systemd version is 239.

The sudospawner logs this error when starting up:

jupyterhub[352620]: Unknown assignment: OOMPolicy=continue

This causes the systemdspawner to time-out when firing up the user's spawned environment. Users cannot start their hubs.

commenting out the line below from "systemd.py" provided by the package seems to work. But I fear for side-effects. properties.setdefault('OOMPolicy', 'continue')

welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

caseybea commented 1 year ago

After a whole bunnch more testing, it seems to me that even the systemd version with RedHat8/Rocky8/Almalinux8 etc is not sufficient. The OOMPolicy thing is somehow not supported, apparently.

I was able to get it to work (and no errors) under Rocky9(akaRedHat9,Alma9, etc).

I highly suggest the documentation be updated to reflect that you need Redhat9/Rocky9/etc for that class OS for this to work.

(PS: It could POSSIBLY work with Centos STREAM 8, I have not tried and most people do not use Stream 8 for production..)

consideRatio commented 1 year ago

Ah, so this makes things crash on systemd sometime between version 239 (rocky 8, doesn't work) and 252 (rocky 9, works).

The sudospawner logs this error when starting up:

jupyterhub[352620]: Unknown assignment: OOMPolicy=continue

This causes the systemdspawner to time-out when firing up the user's spawned environment. Users cannot start their hubs.

It seems that ubuntu 18.04's man pages for systemd 237 doesn't include OOMPolicy, but ubuntu 20.04 does with systemd 245. So, maybe this was introduced between 239 and 245 somtime?

consideRatio commented 1 year ago

It seems that it was introduced in v243, so it seems we need v243 to function currently. See https://github.com/systemd/systemd/commit/afcfaa695cd00b713e7d57e1829da90b692ac6f8.