netplan reparses wifi when bridge member is listed before definition

Bug #1809994 reported by Ryan Harper on 2018-12-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone (Ubuntu)

Bug Description

1) # lsb_release -rd
Description: Ubuntu 18.04.1 LTS
Release: 18.04

2) # apt-cache policy
  Installed: 0.36.3
  Candidate: 0.40.1~18.04.3
  Version table:
     0.40.1~18.04.3 500
        500 bionic-updates/main amd64 Packages
 *** 0.36.3 100
        100 /var/lib/dpkg/status
     0.36.1 500
        500 bionic/main amd64 Packages

3) netplan generate creates configuration for a bridge with single member and wifi accesspoint

4) netplan generate returns error, "Duplicate access point SSID"

# netplan --debug generate
DEBUG:command generate: running ['/lib/netplan/generate']
** (generate:5321): DEBUG: 20:44:08.972: Processing input file //etc/netplan/50-cloud-init.yaml..
** (generate:5321): DEBUG: 20:44:08.972: starting new processing pass
** (generate:5321): DEBUG: 20:44:08.972: recording missing yaml_node_t enp5s0
** (generate:5321): DEBUG: 20:44:08.973: wlp6s0: adding wifi AP 'palisades-guest'
** (generate:5321): DEBUG: 20:44:08.973: starting new processing pass
** (generate:5321): DEBUG: 20:44:08.973: wlp6s0: adding wifi AP 'palisades-guest'
Error in network definition //etc/netplan/50-cloud-init.yaml line 18 column 16: wlp6s0: Duplicate access point SSID 'palisades-guest'

% cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
            interfaces: [enp5s0]
            dhcp4: true
            dhcp4: no
            dhcp4: true
            optional: true
                    password: "mypass"
    version: 2

Note, if I move the ethernet definition of enp5s0 before the bridge, netplan can parse it.

This appears to be related to parse.c:add_missing_node() which tags it is missing a definition and then reparses. This then attempts to parse wifis a second time and runs into a condition check that's meant to prevent duplicate SSIDs.

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: 0.36.3
ProcVersionSignature: Ubuntu 4.15.0-36.39-generic 4.15.18
Uname: Linux 4.15.0-36-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.4
Architecture: amd64
Date: Fri Dec 28 20:40:57 2018
 PATH=(custom, no user)
UpgradeStatus: No upgrade log present (probably fresh install)

Ryan Harper (raharper) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers