netplan is not doing a daemon-reload afer writing unit configuration on Ubuntu Core

Bug #2067465 reported by Alfonso Sanchez-Beato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

When using this cloud.conf file in a gadget snap:

#cloud-config
datasource_list: [None]
users:
  - name: ubuntu
    sudo: "ALL=(ALL) NOPASSWD:ALL"
    lock_passwd: false
    shell: /bin/bash
    passwd: "..."
    ssh_authorized_keys:
      - "..."

On both UC22 and UC24, cloud-init shows this warning in /run/cloud-init/status.json:
...
    "WARNING": [
     "Running ['netplan', 'apply'] resulted in stderr output: Warning: The unit file, source configuration file or drop-ins of netplan-ovs-cleanup.service changed on disk. Run 'systemctl daemon-reload' to reload units.\nWARNING:root:Cannot call Open vSwitch: ovsdb-server.service is not running.\nFailed to connect system bus: Connection refused\nWARNING:root:Falling back to a hard restart of systemd-networkd.service\n"
    ]
...

doing "systemctl cat" for the affected units shows a similar error message.

There is a difference on behavior between UC22 and UC24 as in the former cloud-init finishes without error, but in the latter it finishes with a "recoverable error" code due to the netplan issue. However the same warning is shown.

Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

Do we know the Netplan versions used in those UC22 & UC24 images?

This might also be related to https://github.com/canonical/netplan/pull/421 which should be fixed as of Netplan v1.0 in Noble (and UC24?).

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

cloud-init=24.1.3-0ubuntu3 in UC24
cloud-init=24.1.3-0ubuntu1~22.04.1 in UC22

In general versions in base snaps should be the same as in classic, maybe with a bit of a delay on updates.

Revision history for this message
Brett Holman (holmanb) wrote :

To understand order of events with cloud-init, please run `cloud-init collect-logs` and attach the generated tarball.

Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

Tarball generated by "sudo cloud-init collect-logs"

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.