canonical / checkbox

Checkbox is a testing framework used to validate device compatibility with Ubuntu Linux. It’s the testing tool developed for the purposes of the Ubuntu Certification program.
https://checkbox.readthedocs.io
GNU General Public License v3.0
31 stars 48 forks source link

Invalid netplan config generated for wireless tests on Ubuntu Core 16 #1538

Open andrejvelichkovski opened 3 weeks ago

andrejvelichkovski commented 3 weeks ago

Bug Description

Wireless tests started failing after a change in Checkbox was introduced to use a different netplan config: https://github.com/canonical/checkbox/commit/a506108725a61357557f2944628054e4cfcdbc90

Namely, now the auth key is added to the netplan config, which seems to be incompatible with the Ubuntu Core 16 netplan config. This makes the two wifi tests fail with the same log output:

To Reproduce

  1. Launch checkbox
  2. Run wireless wpa connection tests

Environment

Relevant log output

Interface eth0 using module smsc95xx
  Parameters:
    turbo_mode: N
    truesize_mode: N
    packetsize: 0

Checking kernel ring buffer for smsc95xx messages:

Interface wlan0 using module brcmfmac
  Parameters:
    alternative_fw_path: 
    debug: 0
    roamoff: 1
    fcmode: 0

Checking kernel ring buffer for brcmfmac messages:

## Backup any existing netplan configuration files
Clear backup location
Backing up from /etc/netplan
  /etc/netplan/50-cloud-init.yaml

## Delete any existing netplan configuration files
  /etc/netplan/50-cloud-init.yaml

## Generate a test netplan configuration
# This is the network config written by checkbox
network:
  renderer: networkd
  version: 2
  wifis:
    wlan0:
      access-points:
        cert-bg-wpa-tel-l5-01:
          auth:
            key-management: psk
            password: insecure
      dhcp4: true
      nameservers: {}

## Write the test netplan config file to disk

## Apply the test configuration
+ netplan --debug apply
netplan apply failed: Child process exited with code 1
stdout: ''
stderr: 'Error in network definition //etc/netplan/99-CREATED-BY-CHECKBOX.yaml line 8 column 10: unknown key auth
'
Traceback (most recent call last):
  File "/usr/sbin/netplan", line 448, in <module>
    eval('command_' + args.command.replace('-', '_'))()
  File "/usr/sbin/netplan", line 317, in command_apply
    "failed to communicate with dbus service")
RuntimeError: failed to communicate with dbus service
ERROR: failed netplan apply call

## Delete the test file

## Restore configuration files
Restoring:
  /etc/netplan/50-cloud-init.yaml
## Journal Entries
+ journalctl -q --no-pager -u systemd-networkd.service -u wpa_supplicant.service -u netplan-* --since "2024-10-07 11:43:06"


### Additional context

_No response_
syncronize-issues-to-jira[bot] commented 3 weeks ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1611.

This message was autogenerated