Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require a minimum systemd version ? #116

Closed
consideRatio opened this issue May 25, 2023 · 10 comments · Fixed by #117
Closed

Require a minimum systemd version ? #116

consideRatio opened this issue May 25, 2023 · 10 comments · Fixed by #117

Comments

@consideRatio
Copy link
Member

consideRatio commented May 25, 2023

As part of releasing 1.0.0, I think we should check the systemd version and fail if its not above a lower limit. If we for example require systemd 235+ then all SystemdSpawner's existing config features are supported, and we have a lower version to run test againsts.

List of systemd versions with various linux distributions: https://repology.org/project/systemd/versions

  • centos 7 use 219 (released 2014)
  • centos 8 use 239 (released 2019)
  • centos 9 use 252 (released 2021)
  • rocky 8 use 239 (released 2021)
  • rocky 9 use 252 (released 2022)
  • fedora 28+ use 238+ (released 2018)
  • ubuntu 18.04 use 237
  • ubuntu 20.04 use 245
  • ubuntu 22.04 use 249
  • debian 10 use 241 (released 2019)
  • debian 11 use 247

I suggest we declare a lower bound on 237 at least and slim down the readme file to just say that is required at least, then we also test against ubuntu 18.04's systemd versioned 237.

Related

Current README notes

Systemd Spawner requires you to use a Linux Distro that ships with at least
systemd v211. The security related features require systemd v228 or v227. We recommend running
with at least systemd v228. You can check which version of systemd is running with:

$ systemctl --version | head -1
systemd 231
@consideRatio consideRatio changed the title Require a minimum systemd version ? Require and test a minimum systemd version ? May 25, 2023
@manics
Copy link
Member

manics commented May 25, 2023

Can we add Centos or other RHEL clone to that list?

@yuvipanda
Copy link
Collaborator

+1 to 237

@consideRatio
Copy link
Member Author

@manics I added centos and rocky, where their v8 v9 aligned with the systemd version used.

If we require 237+, then systemdspawner 1.0.0 would work in ubuntu 18+ centos/rocky 8+, fedora 28+, debian 10+. I think this is acceptable.

@behrmann
Copy link
Contributor

I'd recommend being less conservative.

Old Fedora releases don't matter, since Fedora only supports an old release for a few months after a new release is made. Anything older than Fedora 36 go into the calculation. Debian 10 has reached EoL last August and is currently in LTS until next June. Since the release of Debian 12 will be in two weeks, I'd recommend looking at that either.

The pertinent point pushing you to 237 would be Ubuntu 18.04 LTS, though. It reached EoL last month.

While 239 is ancient, it's still better than 237. :)

@consideRatio
Copy link
Member Author

consideRatio commented May 25, 2023

Happy to see you chime in @behrmann!!

Okay here are some lower bounds of relevance:

  • 237+ (ubuntu 18.04+, debian 10+, fedora 28+, centos/rocky 8+)
  • 239+ (ubuntu 20.04+, debian 10+, fedora 29+, centos/rocky 8+)
  • 245+ (ubuntu 20.04+, debian 11+, fedora 32+, centos/rocky 9+)

For reference, note that the TLJH distribution of jupyterhub is helping out testing systemdspawner, and does so with what its compatible with - debian 11+ and ubuntu 20.04+.

I think if we increase the requirement, the key value is that we can more easily ensure we successfully test the lower bound. Setting up very old test environments are far harder than setting up new ones based on my experience doing this for centos7 etc in the dask/dask-gateway project.

Not being a user of this project besides via being a maintainer for the TLJH distribution of jupyterhub that makes use of it, i favor a high lower bound overall.

Suggestion

We fail on <237 (EDIT: <235 is known to not support all features, lets go with that), and warn on <245 that this project is only ensuring support for 245+.

@behrmann
Copy link
Contributor

Sounds sensible to me.

@consideRatio
Copy link
Member Author

consideRatio commented May 25, 2023

@manics @yuvipanda @behrmann wdyt?

  1. Documented like below in the README
  2. We setup tests against 245 in ubuntu 20.04, and 249 in ubuntu 22.04
  3. We emit a warning if the version is undetected or between 235 and 244
  4. We fail hard if the version is below 235

Requirements

Systemd and Linux distributions

SystemdSpawner 1 is recommended to be used with systemd version 245 or higher,
but may work with systemd version 235-244 as well. Below are examples of Linux
distributions that use systemd and has a recommended version.

  • Ubuntu 20.04+
  • Debian 11+
  • Rocky 9+ / CentOS 9+
  • Fedora 32+

The command systemctl --version can be used to verify that systemd is used,
and what version is used.

@consideRatio consideRatio changed the title Require and test a minimum systemd version ? Require a minimum systemd version ? May 25, 2023
@manics
Copy link
Member

manics commented May 25, 2023

Seems fine. I'd drop Fedora from the docs and just mention the LTS distros. However if someone reports a bug with Fedora (because it's got a newer version of systemd) we should fix it since it'll hit the more stable distros.

@consideRatio
Copy link
Member Author

consideRatio commented May 25, 2023

In #106 (comment) @yuvipanda suggested:

"Last but one Ubuntu LTS" is perhaps what to test. So that would be Ubuntu 20.04 now, and Ubuntu 22.04 once 24.04 comes out. That should give us a nice 'minimum systemd version' to test against.

This matches testing against systemd 245 as in #117!

@consideRatio
Copy link
Member Author

I've concluded that systemdspawner is broken in systemd 243 or lower because OOMPolicy is used since v0.17 but but introduced with systemd 243+

See #105 about that. I suggest we fail explicitly on 243 or lower due to that and recommend 245. This is done in #117 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants