memfd-bind: fixup systemd unit file and README#4428
Merged
cyphar merged 2 commits intoopencontainers:mainfrom Oct 15, 2024
Merged
memfd-bind: fixup systemd unit file and README#4428cyphar merged 2 commits intoopencontainers:mainfrom
cyphar merged 2 commits intoopencontainers:mainfrom
Conversation
The example of starting memfd-bind via systemd in README did not work for me (Fedora 40, systemd 255): # systemctl status memfd-bind@/usr/bin/runc Invalid unit name "memfd-bind@/usr/bin/runc" escaped as "memfd-bind@-usr-bin-runc" (maybe you should use systemd-escape?). ○ memfd-bind@-usr-bin-runc.service Loaded: bad-setting (Reason: Unit memfd-bind@-usr-bin-runc.service has a bad unit file setting.) Active: inactive (dead) Docs: https://github.com/opencontainers/runc So, let's use systemd-escape -p ("path") in the README example, and use %f in the systemd unit file to prepend the slash to the filename. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Let's point to the relevant README directly in the systemd unit file, as it is hard to find in the whole nine yards of the runc repo. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Contributor
Author
|
@cyphar PTAL |
Member
|
I can't seem to start this unit on my local machine: My systemd version should be new enough: Any idea what might be going wrong? |
Contributor
Author
The unit name should be |
Member
|
D'oh 🤦, yeah now it works. It would be nice for the "wrong" way of referencing it ( |
cyphar
approved these changes
Oct 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The example of starting memfd-bind via systemd in README did not work
for me (Fedora 40, systemd 255):
So, let's use systemd-escape -p ("path") in the README example,
and use %f in the systemd unit file to prepend the slash to the
filename.