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

systemd-resolve user missing #1656

Closed
Cornelicorn opened this issue Nov 28, 2021 · 6 comments · Fixed by #1658
Closed

systemd-resolve user missing #1656

Cornelicorn opened this issue Nov 28, 2021 · 6 comments · Fixed by #1658
Labels
bug Our bugs

Comments

@Cornelicorn
Copy link
Contributor

Describe the bug
When adding the systemd-resolved module, the service will not start correctly as the systemd-resolve user is missing. This user is used by the service since v235.

Distribution used
Arch rolling

Dracut version
dracut 055

Init system
systemd 249.7-1-arch

To Reproduce
Call dracut with --add systemd-resolved and reboot

Expected behavior
The service should start

Additional context

@johannbg
Copy link
Collaborator

This is due to systemd/systemd#20056

@Cornelicorn
Copy link
Contributor Author

This is due to systemd/systemd#20056

This has not been released yet, as far as I can tell.

I think I found the culprit, systemd-sysusers.service contains ConditionNeedsUpdate=/etc. This will cause the unit to not start, seemingly since it cannot find /etc/.updated. The docs for that condition give a kernel commandline parameter to override this Condition Check. If I add systemd.condition-needs-update=true, systemd-sysusers.service runs and systemd-resolved starts without a problem.

I also found a news entry from systemd mentioning that this Condition will cause units not to be executed in initrd's anymore.

So this seems like a larger issue of systemd-sysusers not running anymore.

@Cornelicorn
Copy link
Contributor Author

The corresponding check.

@johannbg
Copy link
Collaborator

That's an interesting PR which is seemingly based on misconception or total disregard for some of the usecases initrd are used for and basically means we need to start shipping our own type units for the initrd for systemd upstream units ( or overide snippets for them ).

@Cornelicorn
Copy link
Contributor Author

Cornelicorn commented Nov 29, 2021

For the override snippet, it would be enough to install

[Unit]
ConditionNeedsUpdate=

to $systemdsystemunitdir/systemd-sysusers.service.d/sysusers-initrd.conf from modules.d/01systemd-sysusers/module-setup.sh.

I successfully tested this locally.

I can open a PR for this change if you want.

@johannbg
Copy link
Collaborator

Yeah sure and it's probably better to have dracut in the unit file name to make it clear that this unit came from dracut ( as opposed to initrd since there are multiple initrd solutions in the wild ) but in the end of the day I dont think we can avoid having to start shipping a full blown systemd units for modules since there are limitation what can be overridden using snippets. + we need to file a upstream bug about this.

Cornelicorn added a commit to Cornelicorn/dracut that referenced this issue Dec 1, 2021
johannbg pushed a commit that referenced this issue Dec 10, 2021
aafeijoo-suse pushed a commit to aafeijoo-suse/dracut that referenced this issue Feb 21, 2022
Fixes the regression introduced by systemd/systemd#20056
As discussed in dracutdevs#1656 and dracutdevs#1657

(cherry picked from commit fec93bb)
aafeijoo-suse pushed a commit to aafeijoo-suse/dracut that referenced this issue Mar 10, 2022
Fixes the regression introduced by systemd/systemd#20056
As discussed in dracutdevs#1656 and dracutdevs#1657

(cherry picked from commit fec93bb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs
Projects
None yet
2 participants