cloud-init in degraded state on Oracle instance with "Invalid network-config provided"

Bug #2056460 reported by Fabio Augusto Miranda Martins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
High
Unassigned

Bug Description

When booting a Noble Numbat (Ubuntu 24.04) instance on Oracle Cloud, clout-init ends up in a degraded state reporting "Invalid network-config provided". Details are displayed below:

ubuntu@fabio-noble-baremetal-benjaminfix:~$ sudo cloud-init status -l
status: done
extended_status: degraded done
boot_status_code: enabled-by-generator
last_update: Thu, 07 Mar 2024 14:42:12 +0000
detail: DataSourceOracle
errors: []
recoverable_errors:
WARNING:
 - Invalid network-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.

ubuntu@fabio-noble-baremetal-benjaminfix:~$ sudo cloud-init schema --system
Found cloud-config data types: user-data, network-config

1. user-data at /var/lib/cloud/instances/ocid1.instance.oc1.sa-saopaulo-1.antxeljrniwq6syclo77iwfs2fznvqcipuenlp4bkdjw2aqocj65dvmdmnkq/cloud-config.txt:
Empty 'cloud-config' found at /var/lib/cloud/instances/ocid1.instance.oc1.sa-saopaulo-1.antxeljrniwq6syclo77iwfs2fznvqcipuenlp4bkdjw2aqocj65dvmdmnkq/cloud-config.txt. Nothing to validate.

2. network-config at /var/lib/cloud/instances/ocid1.instance.oc1.sa-saopaulo-1.antxeljrniwq6syclo77iwfs2fznvqcipuenlp4bkdjw2aqocj65dvmdmnkq/network-config.json:
  Invalid network-config /var/lib/cloud/instances/ocid1.instance.oc1.sa-saopaulo-1.antxeljrniwq6syclo77iwfs2fznvqcipuenlp4bkdjw2aqocj65dvmdmnkq/network-config.json
  Error: Cloud config schema errors: config.0.subnets.0: Additional properties are not allowed ('broadcast' was unexpected)

Error: Invalid schema: network-config

ubuntu@fabio-noble-baremetal-benjaminfix:~$ sudo jq . /var/lib/cloud/instances/ocid1.instance.oc1.sa-saopaulo-1.antxeljrniwq6syclo77iwfs2fznvqcipuenlp4bkdjw2aqocj65dvmdmnkq/network-config.json
{
  "config": [
    {
      "mac_address": "b8:3f:d2:c3:fd:7c",
      "name": "ens300f0np0",
      "subnets": [
        {
          "broadcast": "10.0.0.255",
          "control": "manual",
          "dns_nameservers": [
            "169.254.169.254"
          ],
          "gateway": "10.0.0.1",
          "netmask": "255.255.255.0",
          "type": "dhcp"
        }
      ],
      "type": "physical"
    }
  ],
  "version": 1
}

ubuntu@fabio-noble-baremetal-benjaminfix:~$ sudo cloud-init --version
/usr/bin/cloud-init 24.1-0ubuntu1

Attaching the logs.

Revision history for this message
Fabio Augusto Miranda Martins (fabio.martins) wrote :
James Falcon (falcojr)
Changed in cloud-init (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
James Falcon (falcojr) wrote :

In cloud-init 23.4, we added network config schema checking[1] to ensure that any network config provided adheres to network configuration v1 format[2]. The cloud-init code to translate Oracle's networking information into network v1[3] incorrectly includes a broadcast address in the rendered configuration.

While this is wrong, it has been wrong for the lifetime of the Oracle datasource. We're now just complaining that it's wrong. Regardless, I'm treating this as high priority so as to avoid spurious warnings in the log files.

[1]: https://github.com/canonical/cloud-init/pull/4482
[2]: https://cloudinit.readthedocs.io/en/latest/reference/network-config-format-v1.html
[3]: https://github.com/canonical/cloud-init/blob/main/cloudinit/net/cmdline.py#L161

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 24.1.1-0ubuntu1

---------------
cloud-init (24.1.1-0ubuntu1) noble; urgency=medium

  * Upstream snapshot based on 24.1.1.
    List of changes from upstream can be found at
    https://raw.githubusercontent.com/canonical/cloud-init/24.1.1/ChangeLog
    - Bugs fixed in this snapshot: (LP: #2056439, #2056460, #2055077)
      (LP: #2056194)

 -- Brett Holman <email address hidden> Mon, 11 Mar 2024 21:09:37 -0600

Changed in cloud-init (Ubuntu):
status: Triaged → Fix Released
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.