-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
systemd-sysext: Implement optional mutability for extensions #31000
Conversation
In a test with
Edit: Here the docs: |
ad82164
to
a060530
Compare
Hm, I'm wondering if the path stored in |
umount_verbose is already doing it for us.
We will use it later when adding workdir and upperdir options for overlayfs mount operation.
The follow-up commit will refactor some code in systemd-sysext, so add some tests to make sure that things didn't break. The tests will be later extended with cases for new features added.
Divide the merge_hierarchy function into code that: - determines the lower directories for overlayfs - determination of lower directories was further split into top, middle and bottom directories: - bottom - possibly the hierarchy itself - middle - hierarchies from extensions - top - metadata directory - mounts the overlayfs using determined directories - writes information to the metadata directory - makes the merged hierarchy read-only
systemd-sysext will check if /var/lib/extensions.mutable/${hierarchy} exists and use it as an overlayfs upperdir for storing writes. This allows having mutable hierarchy after merging the extension images. The implementation is following a proposed update to the Extension Images specification at uapi-group/specifications#78.
The flag takes "auto" or "import" or a boolean value. "auto" causes systemd-sysext to make a decision about mutability of the merged hierarchy based on existence of the upper directory in `/var/lib/extensions.mutable/${hierarchy}`. "import" causes the existing upper dir to be actually used as another lower dir, which results in read-only merged hierarchy. True value makes systemd-sysext to create the upper dir if it's missing and to make the merged hierarchy mutable. False value makes systemd-sysext to ignore upper dir completely, and create a read-only merged hierarchy. The default is false value.
8f98977
to
21967be
Compare
Made @t-lo: Feel free to update the PR. |
About CI failures: previously fedora failed with some pgp check failures when installing some fedora package, so it's unrelated to the PR. In the autopkg test - I have no idea where to look, the log file is enormous. But it seems to be that some logind tests failed, but I can't see how relevant these are to the changes in this PR. |
man/systemd-sysext.xml
Outdated
|
||
<para>The following modes are supported: | ||
<orderedlist> | ||
<listitem><para><option>auto</option>: Automatic mode; the default. Mutability is disabled by default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this bit is out of date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #31000 (comment), will update today.
@@ -205,6 +212,51 @@ | |||
to tie the most frequently configured options to runtime updateable flags that can be changed without a | |||
system reboot. This will help reduce servicing times when there is a need for changing the OS configuration.</para></refsect1> | |||
|
|||
<refsect1> | |||
<title>Mutability</title> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph should include the version snippet, not sure if the xi:include works in this context, if it doesn't please write by hand that it was introduced in v256
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xi:include
seems to work - tests succeed locally, no error reported.
man/systemd-sysext.xml
Outdated
<filename>/opt/</filename>, and <filename>/etc/</filename> if write routing sub-directories | ||
or symlinks are present in <filename>/var/lib/extensions.mutable/</filename>; disable otherwise. | ||
See "Mutability" above for more information on write routing. | ||
This is the default.</para> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs to be updated too
21967be
to
ccbc805
Compare
Addressed @bluca's feedback and updated the man page. Thank you for the review! Rendered man page attached for convenience (again as |
Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>
ccbc805
to
ea29a87
Compare
@poettering @bluca Is there anything else amiss or are we good to merge? There's a single failing test of Ubuntu Jammy on s390x, which fails with
but I believe its unrelated to our changes. We didn't touch |
The PR implements some parts of the proposed update to the Extension Images specifications - uapi-group/specifications#78 - implemented are minimal requirements for enabling mutability and the
--mutable
command line flag. There is no configurability through config files. There is no ephemeral mode.Fixes: #31392