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

Add json file caching for systemd detection results #2109

Closed
wants to merge 1 commit into from
Closed

Add json file caching for systemd detection results #2109

wants to merge 1 commit into from

Conversation

youurayy
Copy link

Closes #2108

Signed-off-by: Juraj Vitko [email protected]

@cyphar
Copy link
Member

cyphar commented Aug 18, 2019

What happens if the system gets updated to a new systemd version, such that the cached values are incorrect (at least on openSUSE, neither /var/cache nor /tmp are on a tmpfs)? I'm also slightly concerned about the code which handles the cache file, but we first need to have a solution for invalidation.

@youurayy
Copy link
Author

  • yes ideally we don't write to an actual filesystem - I'm open to all suggestions
  • systemd upgrade: we could add a timestamp into the json file and invalidate every so often

Another (and fast) way of checking systemd capabilities would be to simply ask the systemd binary for a --version, and also somehow determine if this is a RHEL systemd, and then use that combined info to establish a) whether this is a new-enough systemd, b) whether this is an older but backported RHEL systemd, c) neither.

@filbranden
Copy link
Contributor

Quite frankly, we should simply drop these three checks.

  • hasStartTransientUnit and hasStartTransientSliceUnit: Anything new enough to run runc and libcontainer will have a systemd that supports this. Even systemd v219 from RHEL 7 has this. Something older than that, at this point, is utterly broken.
  • hasDelegateSlice: Newer systemd doesn't support this, but without setting this, everything works fine. So why would we want to set it on older systemd? Not to mention this never really did much while systemd allowed it.

Let's just drop this?

@filbranden
Copy link
Contributor

See #2117 for a PR dropping these checks. It passes tests with RUNC_USE_SYSTEMD=1.

@mrunalp
Copy link
Contributor

mrunalp commented Aug 26, 2019

This can be closed since #2117 is merged.

@youurayy youurayy closed this Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache the systemd detection results
4 participants