Merge ~knitzsche/snappy-hwe-snaps/+git/wifi-connect:1729409-externally-delete-wifi-connection into ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-connect:master

Proposed by Kyle Nitzsche
Status: Rejected
Rejected by: Kyle Nitzsche
Proposed branch: ~knitzsche/snappy-hwe-snaps/+git/wifi-connect:1729409-externally-delete-wifi-connection
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/wifi-connect:master
Diff against target: 62 lines (+14/-10)
3 files modified
server/handlers.go (+1/-1)
service/service.go (+12/-8)
snapcraft.yaml (+1/-1)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Needs Fixing
Roberto Mier Escandon (community) Approve
Review via email: mp+333103@code.launchpad.net

Description of the change

Restore support for externally disconnecting wifi-connection such that daemon notices via netman dbus call and reconfigs to Management mode so user can join and connect to external AP.

Note: the regression was not published in snap and using Operational Portal to disconnect still worked.

Fixes LP:1729409

To post a comment you must log in.
Revision history for this message
Roberto Mier Escandon (rmescandon) wrote :

lgtm

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: cd02dcda772ef305497659820939b00accc69563

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/954/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
fadd1eb... by Kyle Nitzsche <email address hidden>

Fix go fmt errors to pass CI

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: 8e4586630ae4256622664f1d9f70473299c5eb07

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/955/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: 8e4586630ae4256622664f1d9f70473299c5eb07

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/956/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: 8e4586630ae4256622664f1d9f70473299c5eb07

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/958/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: 8e4586630ae4256622664f1d9f70473299c5eb07

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/959/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: fadd1eb55eedc3e3f7c3901f3c6f48de26ef9dd1

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/970/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged commits

fadd1eb... by Kyle Nitzsche <email address hidden>

Fix go fmt errors to pass CI

cd02dcd... by Kyle Nitzsche

fix lp:1729409 deamon detects external wifi disconnect

Fixes regression in masterxi (not in published snap). The regression
meant that externally originated disconnects from AP were not
detected by wifi-connect, thus system state did not recover and
user could not join and connect to another external AP. The fix
involves daemon checking whether wifi is connected through netman dbus
call, then doing the right things, instead of merely checking for
state file.

1b216ec... by System Enablement CI Bot <email address hidden>

Merge remote tracking branch join-after-fail-regress-1726567

Merge-Proposal: https://code.launchpad.net/~knitzsche/snappy-hwe-snaps/+git/wifi-connect/+merge/332672

Author: Kyle Nitzsche <email address hidden>

fix https://bugs.launchpad.net/snappy-hwe-snaps/+bug/1726567

A regression that prevents joining AP after a failed attempt to join

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/server/handlers.go b/server/handlers.go
2index cb0998d..3fd10d4 100644
3--- a/server/handlers.go
4+++ b/server/handlers.go
5@@ -207,7 +207,7 @@ func ConnectHandler(w http.ResponseWriter, r *http.Request) {
6 waitPath := os.Getenv("SNAP_COMMON") + "/startingApConnect"
7 utils.RemoveFlagFile(waitPath)
8
9- // attempt to connect to external AP
10+ // attempt to connect to external AP
11 err = netmanClient.ConnectAp(ssid, pwd, ap2device, ssid2ap)
12 //TODO signal user in portal on failure to connect
13 if err != nil {
14diff --git a/service/service.go b/service/service.go
15index 568b3dd..133b79e 100644
16--- a/service/service.go
17+++ b/service/service.go
18@@ -88,14 +88,6 @@ func main() {
19 continue
20 }
21
22- // wait/loop until management portal's wait flag file is gone
23- // this stops daemon State changing until the management portal
24- // is done, either stopped or the user has attempted to connect to
25- // an external AP
26- if client.CheckWaitApConnect() {
27- continue
28- }
29-
30 // if an external wifi connection, we are in Operational mode
31 // and we stay here until there is an external wifi connection
32 if c.ConnectedWifi(c.GetWifiDevices(c.GetDevices())) {
33@@ -110,6 +102,18 @@ func main() {
34 client.OperationalServerUp()
35 }
36 continue
37+ } else {
38+ //remove flag file so that daemon starts checking state
39+ //and takes control again
40+ waitPath := os.Getenv("SNAP_COMMON") + "/startingApConnect"
41+ utils.RemoveFlagFile(waitPath)
42+ // wait/loop until management portal's wait flag file is gone
43+ // this stops daemon State changing until the management portal
44+ // is done, either stopped or the user has attempted to connect to
45+ // an external AP
46+ if client.CheckWaitApConnect() {
47+ continue
48+ }
49 }
50
51 client.SetState(daemon.MANAGING)
52diff --git a/snapcraft.yaml b/snapcraft.yaml
53index 6826057..1a580fc 100644
54--- a/snapcraft.yaml
55+++ b/snapcraft.yaml
56@@ -1,5 +1,5 @@
57 name: wifi-connect
58-version: 0.10-2-dev
59+version: 0.10-3-dev
60 summary: Connect your device to external wifi over temp wifi AP
61 description: |
62 A solution to enable your device to connect to an external

Subscribers

People subscribed via source and target branches