[systemd-devel] Conflation of propagation in dependencies creates race windows
Reindl Harald
h.reindl at thelounge.net
Sat Jan 19 18:59:42 UTC 2019
Am 19.01.19 um 17:58 schrieb Uoti Urpala:
> On Sat, 2019-01-19 at 15:54 +0000, Jonathon Kowalski wrote:
>> https://github.com/systemd/systemd/issues/1154 which is similar in
>> nature convinces me that systemd currently conflates two many
>> properties in the same dependency. The second bug in particular would
>> not happen if there was a version of Requires= that disabled the
>> PartOf= stuff it currently has, i.e., pick and choose deps.
>
> I think you're wrong here. It makes perfect sense that if unit A has
> Requires= for another unit, stopping that required unit which A can't
> work without will stop A too. Removing that logic is not a good
> solution.
fully agreed but there is one issue:
if you stop a required service for whatever reason and start it again
other then with restart you need also to remenber that you need manually
start the implcit taken down services
[root at srv-rhsoft:~]$ cat /etc/systemd/system/smokeping.service | grep
Requires
Requires=network-online.target openvpn.service named.service
[root at srv-rhsoft:~]$ systemctl stop openvpn.service
[root at srv-rhsoft:~]$ systemctl start openvpn.service
[root at srv-rhsoft:~]$ systemctl status smokeping
● smokeping.service - Smokeping
Loaded: loaded (/etc/systemd/system/smokeping.service; enabled;
vendor preset: disabled)
Drop-In: /etc/systemd/system/smokeping.service.d
└─smokepingstate.conf
Active: inactive (dead) since Sat 2019-01-19 19:58:37 CET; 17s ago
[root at srv-rhsoft:~]$ cat messages
Jan 19 19:58:37 srv-rhsoft smokeping[473768]: Got TERM signal,
terminating child processes.
Jan 19 19:58:37 srv-rhsoft smokeping[473768]: got TERM signal, terminating.
Jan 19 19:58:37 srv-rhsoft systemd[1]: Stopping Smokeping...
Jan 19 19:58:37 srv-rhsoft smokeping[473768]: got TERM signal, terminating.
Jan 19 19:58:37 srv-rhsoft smokeping[473768]: All child processes
successfully terminated, exiting.
Jan 19 19:58:37 srv-rhsoft systemd[1]: Stopped Smokeping.
Jan 19 19:58:37 srv-rhsoft systemd[1]: smokeping.service: Received 43.8K
IP traffic, sent 35.2K IP traffic
Jan 19 19:58:37 srv-rhsoft systemd[1]: Stopping OpenVPN Client...
Jan 19 19:58:39 srv-rhsoft avahi-daemon[9448]: Interface vpn-client.IPv4
no longer relevant for mDNS.
Jan 19 19:58:39 srv-rhsoft avahi-daemon[9448]: Leaving mDNS multicast
group on interface vpn-client.IPv4 with address 10.0.0.241.
Jan 19 19:58:39 srv-rhsoft avahi-daemon[9448]: Withdrawing address
record for 10.0.0.241 on vpn-client.
Jan 19 19:58:39 srv-rhsoft systemd[1]: Stopped OpenVPN Client.
Jan 19 19:58:40 srv-rhsoft vnstatd[2073]: Interface "vpn-client" disabled.
Jan 19 19:58:43 srv-rhsoft systemd[1]: Starting OpenVPN Client...
Jan 19 19:58:43 srv-rhsoft systemd[1]: Started OpenVPN Client.
Jan 19 19:58:44 srv-rhsoft systemd-udevd[474049]: link_config:
autonegotiation is unset or enabled, the speed and duplex are not writable.
Jan 19 19:58:44 srv-rhsoft systemd-udevd[474049]: Could not generate
persistent MAC address for vpn-client: No such file or directory
Jan 19 19:58:44 srv-rhsoft avahi-daemon[9448]: Joining mDNS multicast
group on interface vpn-client.IPv4 with address 10.0.0.241.
Jan 19 19:58:44 srv-rhsoft avahi-daemon[9448]: New relevant interface
vpn-client.IPv4 for mDNS.
Jan 19 19:58:44 srv-rhsoft avahi-daemon[9448]: Registering new address
record for 10.0.0.241 on vpn-client.IPv4.
Jan 19 19:59:10 srv-rhsoft vnstatd[2073]: Interface "vpn-client" enabled.
More information about the systemd-devel
mailing list