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

sysusers,tmpfiles: re-create systemd-network, systemd-resolve and systemd-timesync #9586

Merged
merged 1 commit into from Jul 16, 2018

Conversation

yuwata
Copy link
Member

@yuwata yuwata commented Jul 15, 2018

This partially reverts d4e9e57, 0187368, and 4240cb0.
The services systemd-networkd, systemd-resolved, and systemd-timesyncd enable DynamicUsers= and have bus interfaces. Unfortunately, these has many problems now. Let us create the relevant users, at least, tentatively.

Fixes #9503.

…temd-timesync

This partially reverts d4e9e57,
0187368, and
4240cb0.
The services systemd-networkd, systemd-resolved, and systemd-timesyncd
enable DynamicUsers= and have bus interfaces. Unfortunately, these
has many problems now. Let us create the relevant users, at least,
tentatively.

Fixes systemd#9503.
@teg
Copy link
Contributor

teg commented Jul 15, 2018

Looks good to me. I'd take it even further and drop bus_request_name_async_may_reload_dbus() entirely so it is clear that reloading the bus at runtime is the wrong thing to do (so others are not tempted to copy the behavior in the future). We should find a proper solution to this issue though.

Copy link
Member

@filbranden filbranden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The change to systemd.conf.m4 is the exact workaround I'm using on my host right now.

Thanks for the clarification that it's due to DynamicUser=no that I'm seeing this behavior... But that's for my workaround to #9583 so I'll try to attack that next. (I'll make sure when I do I preserve the behavior of chown()ing RuntimeDirectory= even if the user already exists.)

Cheers!
Filipe

@yuwata
Copy link
Member Author

yuwata commented Jul 15, 2018

drop bus_request_name_async_may_reload_dbus() entirely

After merging this PR, the function has almost the same functionality as sd_bus_request_name_async(). However, systemd-sysusers may be disabled. So, I am not sure it is safe to remove the function right now. Moreover, even if the new method discussed in #9503 is implemented in the future, we may not to drop the function for the backward compatibility, though I am not sure about the proposed new method...

@GoliathLabs
Copy link

GoliathLabs commented Aug 16, 2018

Just for reference, I think I'm experiencing the same problem, currently.

Aug 14 15:27:33 Eggy systemd-networkd[326]: containerbr0: netdev ready
Aug 14 15:27:33 Eggy systemd-networkd[326]: Enumeration completed
Aug 14 15:27:33 Eggy systemd[1]: Started Network Service.
Aug 14 15:27:33 Eggy systemd-networkd[326]: lo: Link is not managed by us
Aug 14 15:27:33 Eggy systemd-networkd[326]: containerbr0: Link is not managed by us
Aug 14 15:27:33 Eggy systemd-udevd[353]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Aug 14 15:27:33 Eggy systemd[1]: Starting Wait for Network to be Configured...
Aug 14 15:27:33 Eggy systemd[1]: Starting Network Name Resolution...
Aug 14 15:27:33 Eggy systemd-networkd[326]: ens3: Gained carrier
Aug 14 15:27:33 Eggy systemd-networkd-wait-online[355]: ignoring: containerbr0
Aug 14 15:27:33 Eggy systemd-networkd[326]: lo: Link is not managed by us
Aug 14 15:27:33 Eggy systemd-networkd-wait-online[355]: ignoring: containerbr0
Aug 14 15:27:33 Eggy systemd-networkd[326]: request_name_destroy_callback n_ref=2
Aug 14 15:27:33 Eggy kernel: IPv6: ADDRCONF(NETDEV_UP): containerbr0: link is not ready
Aug 14 15:27:33 Eggy dbus-daemon[314]: Unknown username "systemd-resolve" in message bus configuration file
Aug 14 15:27:33 Eggy dbus-daemon[314]: [system] Reloaded configuration
Aug 14 15:27:33 Eggy systemd-networkd[326]: request_name_destroy_callback n_ref=1
Aug 14 15:27:33 Eggy systemd-networkd-wait-online[355]: ignoring: containerbr0
Aug 14 15:27:33 Eggy systemd-networkd-wait-online[355]: ignoring: containerbr0
Aug 14 15:27:33 Eggy systemd-networkd-wait-online[355]: ignoring: containerbr0
Aug 14 15:27:33 Eggy systemd-networkd[326]: ens3: DHCPv4 address IPAddrRedacted/22 via IPAddrRedacted
Aug 14 15:27:33 Eggy systemd-timesyncd[307]: Network configuration changed, trying to establish connection.
Aug 14 15:27:33 Eggy systemd-networkd-wait-online[355]: ignoring: containerbr0
Aug 14 15:27:33 Eggy dbus-daemon[314]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.4' (uid=63822 pid=326 comm="/usr/lib/systemd/systemd-networkd ")
Aug 14 15:27:33 Eggy systemd[1]: Starting Hostname Service...
Aug 14 15:27:33 Eggy systemd-swap[315]: INFO: Zswap: backup current configuration: complete
Aug 14 15:27:33 Eggy systemd-swap[315]: INFO: Zswap: set new parameters: start
Aug 14 15:27:33 Eggy systemd-swap[315]: INFO: Zswap: Enable: 1, Comp: lz4,  Max pool %: 25, Zpool: zbud
Aug 14 15:27:33 Eggy systemd-swap[315]: INFO: Zswap: set new parameters: complete
Aug 14 15:27:33 Eggy systemd-swap[315]: INFO: swapD: pickup devices from systemd-gpt-auto-generator
Aug 14 15:27:33 Eggy ssh-keygen[318]: ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Aug 14 15:27:33 Eggy systemd[1]: Started SSH Key Generation.
Aug 14 15:27:33 Eggy dbus-daemon[314]: [system] Successfully activated service 'org.freedesktop.hostname1'
Aug 14 15:27:33 Eggy systemd[1]: Started Hostname Service.
Aug 14 15:27:33 Eggy dbus-daemon[314]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service' requested by ':1.10' (uid=0 pid=363 comm="/usr/lib/systemd/systemd-hostnamed ")
Aug 14 15:27:33 Eggy systemd[1]: Starting Authorization Manager...
Aug 14 15:27:33 Eggy systemd-swap[315]: INFO: swapD: searching swap devices
Aug 14 15:27:33 Eggy systemd-resolved[356]: Cannot resolve user name systemd-resolve: No such process
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=1/FAILURE
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
Aug 14 15:27:33 Eggy systemd[1]: Failed to start Network Name Resolution.
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Service has no hold-off time (RestartSec=0), scheduling restart.
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 1.
Aug 14 15:27:33 Eggy systemd[1]: Stopped Network Name Resolution.
Aug 14 15:27:33 Eggy systemd[1]: Starting Network Name Resolution...
Aug 14 15:27:33 Eggy polkitd[397]: Started polkitd version 0.114
Aug 14 15:27:33 Eggy polkitd[397]: Loading rules from directory /etc/polkit-1/rules.d
Aug 14 15:27:33 Eggy polkitd[397]: Loading rules from directory /usr/share/polkit-1/rules.d
Aug 14 15:27:33 Eggy polkitd[397]: Finished loading, compiling and executing 2 rules
Aug 14 15:27:33 Eggy dbus-daemon[314]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Aug 14 15:27:33 Eggy systemd[1]: Started Authorization Manager.
Aug 14 15:27:33 Eggy polkitd[397]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Aug 14 15:27:33 Eggy systemd-hostnamed[363]: Changed host name to 'myfancyhostnameidontwanttoshow.life'
Aug 14 15:27:33 Eggy systemd-resolved[404]: Cannot resolve user name systemd-resolve: No such process
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Main process exited, code=exited, status=1/FAILURE
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Failed with result 'exit-code'.
Aug 14 15:27:33 Eggy systemd[1]: Failed to start Network Name Resolution.
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Service has no hold-off time (RestartSec=0), scheduling restart.
Aug 14 15:27:33 Eggy systemd[1]: systemd-resolved.service: Scheduled restart job, restart counter is at 2.
Aug 14 15:27:33 Eggy systemd[1]: Stopped Network Name Resolution.```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

dbus-daemon and DynamicUser=1 don't get along
5 participants