[pkg-wpa-devel] Bug#756847: Bug#756847: wpasupplicant: systemd wpa_supplicant.service wrong behavior on target isolate

Stefan Lippers-Hollmann s.L-H at gmx.de
Sat Aug 2 16:57:50 UTC 2014


Control: tags -1 moreinfo
Control: tags -1 help

Hi

On Saturday 02 August 2014, debianizzato wrote:
> Package: wpasupplicant
> Version: 1.1-1
> Severity: normal
> 
> Dear Maintainer,
> I switched from sysvinit to systemd in Debian Jessie.
> I created a personalized systemd target similar to graphical.target, 
> just adding some Conflicts directives in order to stop some daemons 
> (mysql and apache2).
> When I switch from graphical.target to personalized.target and 
> vice-versa (using systemctl isolate <name>.target), everything works 
> fine, except that WiFi connection in Gnome3  Network Manager drops 
> and then restart.
> Syslog reports that it is wpa_supplicant.service that stops and then 
> restarts.
> 
> I think that it is not a desiderable behaviour of 
> wpa_supplicant.service, unless it is explicitly stopped by a target.
> 
> I tried to edit wpa_supplicant.service configuration:
> 1) I created a wpa_supplicant.service.d directory in 
>    /etc/systemd/system
> 2) I edited a personalized.conf file in it, in which I added the 
>    following 2 lines:
>     [Unit]
>     IgnoreOnIsolate=true
> 3) Then I restarted daemons and reloaded wpa_supplicant.service
> 4) systemd-delta reports that wpa_supplicant.service has been 
>    EXTENDED
> 5) switching from graphical.target to my personalize.target works 
>    fine, Wifi connection is not stopped.
> 6) errors happens when I switch to rescue.target and then back to 
>    graphical or personalized targets:
>     - rescue shell is not closed
>     - gnome3 doesn't load properly (just shows desktop image, but no 
>       login window)
>     - I need to force a reboot
>     - I suspect that it is an issue related to DBus (I am not an 
>       expert.....)
> 
> Do you think it is possible to fix wpa_supplicant.service ?
> thanks
[...]

$ cat /lib/systemd/system/wpa_supplicant.service 
[Unit]
Description=WPA supplicant

[Service]
Type=dbus
BusName=fi.epitest.hostap.WPASupplicant
ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant

[Install]
WantedBy=multi-user.target
Alias=dbus-fi.epitest.hostap.WPASupplicant.service


These are the full contents of said systemd unit, which looks sensible
to me. I guess what happens in your case is not really wpasupplicant
restarting, but the frontend driving it triggering the connection reset
via DBUS, which could be the case of network-manager interacting with
the graphical.target.

Are you using network-manager - and if you do, are your wlan 
connections configured as "system connections" or "user connections", 
the later are (afaik) bound to your logind console session and may
stop (or restart) if you log out. Configuring these as "system 
connections" might provide further data points.

Alternatively you could test what happens with different frontends for
wpasupplicant, in particular the native ifupdown integration - which
should be excempt from these problems.

As these advanced aspects of systemd customisations are still rather
new to me, I would suggest to solicit assistance from the systemd 
maintainers.

Regards
	Stefan Lippers-Hollmann
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.alioth.debian.org/pipermail/pkg-wpa-devel/attachments/20140802/3e440bf9/attachment.sig>


More information about the Pkg-wpa-devel mailing list