Right now, we have: /lib/systemd/system/NetworkManager.service: [Unit] Description=Network Manager After=syslog.target [Service] Type=dbus BusName=org.freedesktop.NetworkManager ExecStart=/usr/sbin/NetworkManager --no-daemon [Install] WantedBy=network.target multi-user.target Alias=dbus-org.freedesktop.NetworkManager.service /usr/share/dbus-1/system-services/org.freedesktop.NetworkManager.service: # This D-Bus service activation file is only for systemd support since # an auto-activated NetworkManager would be quite surprising for those people # who have NM installed but turned off. Thus the Exec path available to # D-Bus is /bin/false, but systemd knows the real Exec path due to the NM # systemd .service file. [D-BUS Service] Name=org.freedesktop.NetworkManager Exec=/bin/false User=root SystemdService=dbus-org.freedesktop.NetworkManager.service However, this does not work in the way that we expect, or need. An example, starting with NM running: # systemctl stop NetworkManager.service <stops it> # systemctl disable NetworkManager.service rm '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service' rm '/etc/systemd/system/network.target.wants/NetworkManager.service' rm '/etc/systemd/system/multi-user.target.wants/NetworkManager.service' # dbus-send --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.BeefyMiracle <NetworkManager is started> We really don't want it to bus activate, especially when it's explicitly disabled. Right now, it does. (Starting nm-applet will do it too.) This behavior can be stopped by removing the dbus system-services file; this, however, removes all dbus activation in systemd.
Note this would all be sane if RPMs *never* enabled services, and they just got explicitly enabled by the OS installer.
I am unable to reproduce this. After the dbus-send call, NM is not started. /var/log/messages says: dbus: [system] Activating via systemd service name='org.freedesktop.NetworkManager' unit='dbus-org.freedesktop.NetworkManager.service' dbus: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.NetworkManager.service': Unit dbus-org.freedesktop.NetworkManager.service failed to load: No such file or directory. See system logs and 'systemctl status' for details. ... which is as expected.
(In reply to comment #0) > # systemctl stop NetworkManager.service > > <stops it> > > # systemctl disable NetworkManager.service To avoid a race, you should disable first, then stop. Otherwise the D-Bus activation may come in between.
Bill, can you still reproduce this? Do you have a log with systemd.log_level=debug from the time of the unwanted activation? When you reproduce this, where in the cgroup hierarchy do you see the NM process (use systemd-cgls)? Is it a member of NetworkManager.service or dbus.service?
I can't reproduce it at the moment with systemd-22-1 + NM-0.8.997. When filed, I was on systemd-20, so it's possible that something was fixed since then. The dbus command now gives: Error: org.freedesktop.systemd1.LoadFailed: Unit dbus-org.freedesktop.NetworkManager.service failed to load. No such file or directory. which, while correct, isn't the most clear error to give.
So is this fixed then? Should we close or is there something we still need to do in NM?
Let's close this. Reopen if you can reproduce the bug. Preferably with information requested in comment #4 attached.