Ephemeral deployment keeps cloud-inits autogenerated netplan config

Bug #1835271 reported by Lee Trager
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Björn Tillenius
2.6
Won't Fix
High
Unassigned
3.2
Won't Fix
High
Unassigned
3.3
Fix Released
High
Björn Tillenius

Bug Description

When I deployed 18.04 ephemerally I noticed that /etc/netplan contains 50-cloud-init.yaml and config.yaml. 50-cloud-init.yaml is the basic DHCP config cloud-init while config.yaml is from MAAS. netplan allows multiple configuration files in /etc/netplan so you can split up a config file however these two config files may contradict each other.

MAAS should remove /etc/netplan/50-cloud-init.yaml from /etc/netplan and use netplan try --debug when applying configuration.

Related branches

Revision history for this message
Alan Baghumian (alanbach) wrote :

There is another issue that seems to be related to this.

Deploying a 18.04 machine is Ephemeral mode, fails to bring up the second interface. This only happens with Bionic. Tested Focal and Jammy and they are not affected with this issue.

Also this issue happens no matter if the interfaces are set to DHCP or are set to Static IPs. Both scenarios experience the same results, the second interface remaining down:

$ cat /etc/netplan/50-maas.yaml
network:
  version: 2
  ethernets:
    eno1:
      addresses:
      - 10.1.9.22/22
      gateway4: 10.1.10.1
      match:
        macaddress: 52:54:00:ce:2c:c0
      mtu: 1500
      nameservers:
        addresses:
        - 10.1.9.12
        - 10.1.10.10
        search: &id001
        - alannet
      set-name: eno1
    eno2:
      addresses:
      - 10.1.9.23/22
      match:
        macaddress: 52:54:00:2d:94:1d
      mtu: 1500
      nameservers:
        addresses:
        - 10.1.9.12
        - 10.1.10.10
        search: *id001
      routes:
      - table: 1
        to: 0.0.0.0/0
        via: 10.1.10.1
      routing-policy:
      - from: 10.1.8.0/22
        priority: 100
        table: 1
      - from: 10.1.8.0/22
        table: 254
        to: 10.1.8.0/22
      set-name: eno2

$ cat /etc/netplan/50-cloud-init.yaml
network:
    version: 2
    ethernets:
        enp1s0:
            dhcp4: true
            match:
                macaddress: 52:54:00:ce:2c:c0
            set-name: enp1s0

Interfaces:

2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:ce:2c:c0 brd ff:ff:ff:ff:ff:ff
    inet 10.1.10.214/22 brd 10.1.11.255 scope global dynamic enp1s0
       valid_lft 480sec preferred_lft 480sec
    inet6 fe80::5054:ff:fece:2cc0/64 scope link
       valid_lft forever preferred_lft forever
3: enp7s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:2d:94:1d brd ff:ff:ff:ff:ff:ff

It is possible to manually bring the interface up, but that is not a solution.

Revision history for this message
Alan Baghumian (alanbach) wrote :

This was tested and validate using MAAS 3.2.6 (Snap).

no longer affects: maas/3.3
tags: added: bug-council
tags: removed: bug-council
Revision history for this message
Adam Collard (adam-collard) wrote :

Ephemeral deployments should remove cloud-init's netplan configuration file to leave just the one MAAS configures

tags: added: easy-to-fix
Revision history for this message
Alan Baghumian (alanbach) wrote :

Would it be possible to back-port this to at least MAAS 3.2? This is affecting clients and would be nice to have it fixed on the 3.2 branch as well.

tags: removed: easy-to-fix
Changed in maas:
milestone: 3.3.0 → 3.3.0-beta3
Changed in maas:
status: Fix Committed → Fix Released
Revision history for this message
Alan Baghumian (alanbach) wrote :

Any word on back-porting this to MAAS 3.2? This would greatly help as we have some very large clients that will take them quite some time to move from 3.2 to 3.3. Since this was marked as "Easy to Fix" back porting it would be greatly appreciated.

Revision history for this message
Alan Baghumian (alanbach) wrote :

I just applied the patch from 3.3 to 3.2 branch and it fits completely fine!

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.