systemd fails to run /lib/systemd/system-sleep/wpasupplicant script when wpa-supplicant is installed

Bug #1697492 reported by Alfonso Sanchez-Beato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Undecided
Unassigned

Bug Description

When suspending/resuming, systemd runs the script /lib/systemd/system-sleep/wpasupplicant, but fails if the wpa-supplicant snap is installed. This happens because the script tries to run "/sbin/wpa_cli" instead of the client included in the snap, "wpa-supplicant.wpa-cli". This is the content of the script:

$ cat /lib/systemd/system-sleep/wpasupplicant
#!/bin/sh
set -e

if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
    case "$1" in
        pre) /sbin/wpa_cli suspend ;;
        post) /sbin/wpa_cli resume ;;
    esac
fi

The version of wpa-supplicant snap is: 2.4-1, r12
The version of core snap is:

Tony Espy (awe)
Changed in snappy:
status: New → Confirmed
Revision history for this message
Tony Espy (awe) wrote :

The wpa_cli suspend command triggers the following logic:

 - for all interfaces, call wpa_drv_suspend()

...for the resume command:

 - for all interfaces, call wpa_drv_resume(), and additionally if the interface is disconnected, it triggers a scan

I checked, and our wpa-supplicant is based on 2.4, and none of the drivers in that release implement suspend() or resume(), so basically other than the scan trigger on resume, there's nothing additional happening. Furthermore, if this snap is used in conjunction with the network-manager snap, NM will trigger the rescan. So basically for the purposes of using this snap in conjunction with the network-manager snap (1.2.2-10.2, r166) the bug has no impact.

It only has impact if using the wpa-supplicant snap by itself. As such, the importance of this can be to set to Medium or Low, or closed out as WontFix.

description: updated
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

This was tested with core rev. 1577.

Revision history for this message
Oliver Grawert (ogra) wrote :

one thing i suggested when discussing this on IRC with alfonso was to try to ship a modified /lib/systemd/system-sleep/wpasupplicant from the gadget snap (not sure if that works but would be worth a try) for systems where you pre-install the wpa-supplicant snap.

Michael Vogt (mvo)
affects: snappy → snapd
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.