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

admin/state-overlay: Require root and don't lock sysroot #3158

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Feb 6, 2024

Not required for anything in particular, but it's good to use the right flags here anyway.

Not required for anything in particular, but it's good to use the right
flags here anyway.
@cgwalters
Copy link
Member

Ahh wait, I think I see the problem with the ISO:

[    9.246494] /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator: line 24: /etc/sysctl.d/20-coreos-autologin-kernel-printk.conf: Read-only file system
[    9.248799] (sd-execu[853]: /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator failed with exit status 1.
[    9.250262] (sd-execu[853]: /usr/lib/systemd/system-generators/ostree-system-generator terminated by signal ABRT.

jlebon added a commit to jlebon/fedora-coreos-config that referenced this pull request Feb 6, 2024
This doesn't work anymore since systemd locked down where generators
can write files:

    [    9.246494] /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator: line 24: /etc/sysctl.d/20-coreos-autologin-kernel-printk.conf: Read-only file system

But anyway, nowadays this duplicates `coreos-printk-quiet.service` which
was added two years after this code was written (coreos#1840).

Noticed by Colin in
ostreedev/ostree#3158 (comment).
In CoreOS live environments, we do have `/run/ostree` but no `ostree=`
karg; we hackily fool `ostree-prepare-root.service` by bind-mounting
over `/proc/cmdline` so it does the right thing. Presumably, we should
clean this up eventually, but even so we don't want to require PXE users
to add an `ostree=` arg, so we need to tolerate this.

So this assertion would fail there. Restore the behaviour prior to
b9ce0e8 and re-add a more contemporary comment.

Fixes b9ce0e8 ("generator: Exit if there's no `/run/ostree`").
@jlebon
Copy link
Member Author

jlebon commented Feb 6, 2024

Ahh wait, I think I see the problem with the ISO:

[    9.246494] /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator: line 24: /etc/sysctl.d/20-coreos-autologin-kernel-printk.conf: Read-only file system
[    9.248799] (sd-execu[853]: /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator failed with exit status 1.
[    9.250262] (sd-execu[853]: /usr/lib/systemd/system-generators/ostree-system-generator terminated by signal ABRT.

Nice.

First one fixed by coreos/fedora-coreos-config#2839.

For the second one, added a commit which I didn't test, but I'm 99% sure will fix it.

Now... why this passed CI in #3147 but failed here, I'm not sure.

dustymabe pushed a commit to coreos/fedora-coreos-config that referenced this pull request Feb 6, 2024
This doesn't work anymore since systemd locked down where generators
can write files:

    [    9.246494] /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator: line 24: /etc/sysctl.d/20-coreos-autologin-kernel-printk.conf: Read-only file system

But anyway, nowadays this duplicates `coreos-printk-quiet.service` which
was added two years after this code was written (#1840).

Noticed by Colin in
ostreedev/ostree#3158 (comment).
@ericcurtin ericcurtin merged commit ecbd1f7 into ostreedev:main Feb 6, 2024
24 checks passed
aaradhak pushed a commit to aaradhak/fedora-coreos-config that referenced this pull request Mar 18, 2024
This doesn't work anymore since systemd locked down where generators
can write files:

    [    9.246494] /usr/lib/systemd/system-generators/coreos-liveiso-autologin-generator: line 24: /etc/sysctl.d/20-coreos-autologin-kernel-printk.conf: Read-only file system

But anyway, nowadays this duplicates `coreos-printk-quiet.service` which
was added two years after this code was written (coreos#1840).

Noticed by Colin in
ostreedev/ostree#3158 (comment).
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.

None yet

3 participants