wireless connection test item failed with permission error

Bug #1798788 reported by Alex Tu
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Next Generation Checkbox (CLI)
Invalid
Undecided
Unassigned

Bug Description

It always get error :

"Error: Failed to add/activate new connection: Not authorized to control networking."

Full message of that error: https://pastebin.canonical.com/p/MqNJcRHmKh/

## Connection attempt
+ nmcli d wifi connect ubuntu-cert-bg-wpa-tpelab password insecure ifname wlp2s0 name TEST_CON
Error: Failed to add/activate new connection: Not authorized to control networking.
+ nmcli -m tabular -t -f GENERAL.STATE d show wlp2s0
30 (disconnected)

## Cleaning up NM connections
+ nmcli -t -f TYPE,UUID,NAME c

------------------------------------------------------------------------- >8 ---
Outcome: job failed

jenkins job:
https://taipei-jenkins-docker.redirectme.net/job/sanity-3-testflinger-dell-bto-bionic-bucky-n5-v5-201807-26321/43/

C3 submission url:
https://certification.canonical.com/submissions/status/23200374-660b-4797-8c6c-2dfd7272ebe0

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Many of you are trying to run checkbox over ssh via jenkins jobs. You need to take special care doing so.

The error you reported can be solved via a polkit rule (pkla file).
But in general adopt what I did for the checkbox-oem-qa snap:

https://git.launchpad.net/~oem-qa/oem-qa-checkbox/+git/checkbox-oem-qa/tree/snap/hooks/install

The relevant bits for your error are:

cat <<EOF > /etc/polkit-1/localauthority/50-local.d/com.canonical.certification.checkbox.pkla
[Checkbox]
Identity=unix-group:sudo
Action=org.freedesktop.NetworkManager.*
ResultAny=yes
ResultInactive=yes
ResultActive=yes
EOF

Changed in checkbox-ng:
status: New → Triaged
Revision history for this message
Taihsiang Ho (tai271828) wrote :

The comment#1 works for bucky CID 201807-26321. Thanks!

Changed in checkbox-ng:
status: Triaged → Invalid
Revision history for this message
Alex Tu (alextu) wrote :

followed #2 result, we land that solution by job yaml, but get another error:

00:05:48 ## Calling a rescan
00:05:48 + nmcli d wifi rescan
00:05:48 Error: org.freedesktop.NetworkManager.network-control request failed: not authorized.

full log:
https://taipei-jenkins-docker.redirectme.net/view/Daily-Auto-Sanity/job/sanity-3-testflinger-dell-bto-bionic-bucky-n5-v5-201807-26321/67/consoleFull

Changed in checkbox-ng:
status: Invalid → Confirmed
Revision history for this message
Taihsiang Ho (tai271828) wrote :

@alex

It does not related to checkbox-ng itself.

You missed this configuration and it may matter:

echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/checkbox

From the console log:

23:54:53 + _put etc.sudoers.d.checkbox /home/ubuntu
23:54:53 + scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null etc.sudoers.d.checkbox ubuntu@10.101.49.101:/home/ubuntu
23:54:53 etc.sudoers.d.checkbox: No such file or directory
23:54:53 + _run sudo mv /home/ubuntu/etc.sudoers.d.checkbox /etc/sudoers.d/
23:54:53 + ssh -t -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@10.101.49.101 sudo mv /home/ubuntu/etc.sudoers.d.checkbox /etc/sudoers.d/
23:54:53 mv: cannot stat '/home/ubuntu/etc.sudoers.d.checkbox': No such file or directory

It seems a typo or something in the job.yaml

Taihsiang Ho (tai271828)
Changed in checkbox-ng:
status: Confirmed → Triaged
Changed in checkbox-ng:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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