Leonid Isaev wrote on 11/08/14 18:22:
> Hi,
> 
>       I am seeing an oddity in the CGroup output of systemctl status ran on
> some units. On the other hand, systemd-cgls shows correct information.
>       Here is an example:
> ------
> $ systemctl status netctl@wan.service
>   netctl@wan.service - DHCP connection on bond0
>    Loaded: loaded (/etc/systemd/system/netctl@wan.service; enabled)
>    Active: active (exited) since Mon 2014-08-11 11:51:05 EDT; 1h 20min ago
>      Docs: man:netctl.profile(5)
>   Process: 645 ExecStart=/usr/lib/network/network start %I (code=exited, 
> status=0/SUCCESS)
>  Main PID: 645 (code=exited, status=0/SUCCESS)
> 
> $ systemctl status netctl@wlan.service 
>   netctl@wlan.service - Secure wireless uplink
>    Loaded: loaded (/etc/systemd/system/netctl@wlan.service; enabled)
>    Active: active (exited) since Mon 2014-08-11 11:50:58 EDT; 1h 16min ago
>      Docs: man:netctl.profile(5)
>   Process: 489 ExecStart=/usr/lib/network/network start %I (code=exited, 
> status=0/SUCCESS)
>  Main PID: 489 (code=exited, status=0/SUCCESS)
>    CGroup: /system.slice/system-netctl.slice/netctl@wlan.service
>            501 wpa_supplicant -B -P /run/wpa_supplicant_wlp3s0.pid -i wlp3s..
> ------
> 
> However,
> ------
> $ systemd-cgls /system.slice/system-netctl.slice/netctl@wlan.service
> /system.slice/system-netctl.slice/netctl@wlan.service:
>  501 wpa_supplicant -B -P /run/wpa_supplicant_wlp3s0.pid -i wlp3s0 -D ...
> $ systemd-cgls /system.slice/system-netctl.slice/netctl@wan.service
> /system.slice/system-netctl.slice/netctl@wan.service:
>  663 dhcpcd -4 -q -t 30 -L bond0
> ------
> 
> So, both units are actually instances of the same netctl@.service. This 
> service
> calls a script (/usr/lib/network/network) which in turn starts wpa_supplicant
> or dhcpcd. The difference between the two cases is that dhcpcd forks yet
> another process:
> ------
> $ journalctl -u netctl@wan.service | grep forked
> Aug 11 11:51:05 borei dhcpcd[650]: forked to background, child pid 663
> ------
> 
> This is systemd-215 running on ArchLinux. Any ideas why this is happening?

I've also noticed something similar with 215 under Mageia and (perhaps)
coincidentally it also involved a network script and wpa_supplicant
processes forked into the background.

In my case, the "network" service (legacy initscripts as in Fedora),
failed to detect Network Manager properly due to command line API change
and tried to do stuff itself, forking processes etc.

In my case the wpa_supplicant process not shown by systemctl status
network but it WAS running and in the appropriate cgroup.

I kinda forgot about this quirk when I fixed the initscript problem, so
good to see it wasn't just me!

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to