[systemd-bugs] [Bug 65973] when a unit file is removed, systemd abandons running processes

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jun 20 10:32:56 PDT 2013


https://bugs.freedesktop.org/show_bug.cgi?id=65973

--- Comment #4 from Zbigniew Jedrzejewski-Szmek <zbyszek at in.waw.pl> ---
(In reply to comment #3)
> (In reply to comment #2)
> 
> > > So, not sure we can do anything about this, except filing a bug against
> > > libvirt to fix its scriptlets?
> > It's on purpose, so that running VM are not interrupted by libvirtd
> > restarts. Tying the VMs to libvirtd lifecycle would be a huge drawback.
> 
> How? A restart is not an un-install.
> 
> I don't see any valid reason to leave the service running after the process
> binary is removed from the system.
> 
> It really does not sound like a systemd issue.
But a user might remove the file at any time... and systemd should do it's best
to behave gracefully. I think it's an issue with all KillMode=process units.

Let's try:
% systemctl status avahi-daemon.service
avahi-daemon.service - Avahi mDNS/DNS-SD Stack
   Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled)
   Active: active (running) since Thu 2013-06-20 03:17:56 EDT; 10h ago
 Main PID: 641 (avahi-daemon)
   Status: "Server startup complete. Host name is bupkis.local. Local service
cookie is 4162726802."
   CGroup: name=systemd:/system/avahi-daemon.service
           ├─641 avahi-daemon: running [bupkis.local]
           └─652 avahi-daemon: chroot helper

% sudo mv /usr/lib/systemd/system/avahi-daemon.service /tmp/
% sudo systemctl daemon-reload
% systemctl status avahi-daemon.service
avahi-daemon.service
   Loaded: error (Reason: No such file or directory)
   Active: active (running) since Thu 2013-06-20 03:17:56 EDT; 10h ago
 Main PID: 641 (avahi-daemon)
   Status: "Server startup complete. Host name is bupkis.local. Local service
cookie is 4162726802."

% sudo systemctl stop avahi-daemon.service
Warning: Stopping avahi-daemon.service, but it can still be activated by:
  avahi-daemon.socket

% systemctl status avahi-daemon.service
avahi-daemon.service
   Loaded: error (Reason: No such file or directory)
   Active: inactive (dead) since Thu 2013-06-20 13:30:51 EDT; 33s ago
 Main PID: 641 (code=exited, status=0/SUCCESS)
   Status: "Server startup complete. Host name is bupkis.local. Local service
cookie is 4162726802."

...so it seems that systemd has only partial amnesia when a unit file is
removed ;)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20130620/a32470b2/attachment.html>


More information about the systemd-bugs mailing list