[Bug 2116016] [NEW] cloud-init schema validation warnings - unexpected "id" property in network_config

Joao Andre Simioni 2116016 at bugs.launchpad.net
Sat Jul 5 23:48:49 UTC 2025


Public bug reported:

When deploying custom images in MAAS, based on RHEL (Rocky Linux),
Curtin is generating a network config that breaks the cloud-init schema
validation. 

These are the logs from a deployment:

cloud-init[1469]: start: cmd-install/stage-network: configuring network
cloud-init[1469]: start: cmd-install/stage-network/builtin: running 'curtin net-meta custom'
cloud-init[1469]: start: cmd-install/stage-network/builtin/cmd-net-meta: curtin command net-meta
cloud-init[1469]: net-meta mode is 'custom'.  devices=[]
cloud-init[1469]: writing to file /tmp/tmp8xr53mnm/state/network_config with network config: network:
cloud-init[1469]:   config:
cloud-init[1469]:   - id: ens3
cloud-init[1469]:     mac_address: 52:54:00:29:c0:c6
cloud-init[1469]:     mtu: 1500
cloud-init[1469]:     name: ens3
cloud-init[1469]:     subnets:
cloud-init[1469]:     - address: 192.168.50.12/24
cloud-init[1469]:       dns_nameservers:
cloud-init[1469]:       - 192.168.50.10
cloud-init[1469]:       dns_search:
cloud-init[1469]:       - maas
cloud-init[1469]:       gateway: 192.168.50.1
cloud-init[1469]:       type: static
cloud-init[1469]:     type: physical
cloud-init[1469]:   - address:
cloud-init[1469]:     - 192.168.50.10
cloud-init[1469]:     search:
cloud-init[1469]:     - maas
cloud-init[1469]:     type: nameserver
cloud-init[1469]:   version: 1


Output of the schema validation from cloud-init:
# cloud-init schema --system
Found cloud-config data types: user-data, vendor-data, network-config

1. user-data at /var/lib/cloud/instances/xm6cnq/cloud-config.txt:
Empty 'cloud-config' found at /var/lib/cloud/instances/xm6cnq/cloud-config.txt. Nothing to validate.

2. vendor-data at /var/lib/cloud/instances/xm6cnq/vendor-cloud-config.txt:
  Valid schema vendor-data

3. network-config at /var/lib/cloud/instances/xm6cnq/network-config.json:
  Invalid network-config /var/lib/cloud/instances/xm6cnq/network-config.json
  Error: Cloud config schema errors: config.0: Additional properties are not allowed ('id' was unexpected), config.0: {'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'} is not valid under any of the given schemas

Error: Invalid schema: network-config

And in /var/log/cloud-init.log, the following log is seen:
schema.py[WARNING]: Invalid network-config provided:
config.0: Additional properties are not allowed ('id' was unexpected)
config.0: {'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'} is not valid under any of the given schemas

Although the schema warning is displayed, networking is successfully configured:
networking.py[DEBUG]: net: all expected physical devices present
stages.py[DEBUG]: applying net config names for {'config': [{'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'}, {'address': ['192.168.50.10'], 'search': ['maas'], 'type': 'nameserver'}], 'version': 1}

subp.py[DEBUG]: Running command ['ip', '-6', 'addr', 'show', 'permanent', 'scope', 'global'] with allowed return codes [0] (shell=False, capture=True)
subp.py[DEBUG]: Running command ['ip', '-4', 'addr', 'show'] with allowed return codes [0] (shell=False, capture=True)
__init__.py[DEBUG]: Detected interfaces {'ens3': {'downable': False, 'device_id': '0x0001', 'driver': 'virtio_net', 'mac': '52:54:00:29:c0:c6', 'name': 'ens3', 'up': True}, 'lo': {'downable': False, 'device_id': None, 'driver': None, 'mac': '00:00:00:00:00:00', 'name': 'lo', 'up': True}}
__init__.py[DEBUG]: no work necessary for renaming of [['52:54:00:29:c0:c6', 'ens3', 'virtio_net', '0x0001']]
stages.py[INFO]: Applying network configuration from system_cfg bringup=True: {'config': [{'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'}, {'address': ['192.168.50.10'], 'search': ['maas'], 'type': 'nameserver'}], 'version': 1}
__init__.py[DEBUG]: Selected renderer 'sysconfig' from priority list: ['sysconfig', 'eni', 'netplan', 'network-manager', 'networkd']

** Affects: curtin
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to curtin.
https://bugs.launchpad.net/bugs/2116016

Title:
  cloud-init schema validation warnings - unexpected "id" property in
  network_config

Status in curtin:
  New

Bug description:
  When deploying custom images in MAAS, based on RHEL (Rocky Linux),
  Curtin is generating a network config that breaks the cloud-init schema
  validation. 

  These are the logs from a deployment:

  cloud-init[1469]: start: cmd-install/stage-network: configuring network
  cloud-init[1469]: start: cmd-install/stage-network/builtin: running 'curtin net-meta custom'
  cloud-init[1469]: start: cmd-install/stage-network/builtin/cmd-net-meta: curtin command net-meta
  cloud-init[1469]: net-meta mode is 'custom'.  devices=[]
  cloud-init[1469]: writing to file /tmp/tmp8xr53mnm/state/network_config with network config: network:
  cloud-init[1469]:   config:
  cloud-init[1469]:   - id: ens3
  cloud-init[1469]:     mac_address: 52:54:00:29:c0:c6
  cloud-init[1469]:     mtu: 1500
  cloud-init[1469]:     name: ens3
  cloud-init[1469]:     subnets:
  cloud-init[1469]:     - address: 192.168.50.12/24
  cloud-init[1469]:       dns_nameservers:
  cloud-init[1469]:       - 192.168.50.10
  cloud-init[1469]:       dns_search:
  cloud-init[1469]:       - maas
  cloud-init[1469]:       gateway: 192.168.50.1
  cloud-init[1469]:       type: static
  cloud-init[1469]:     type: physical
  cloud-init[1469]:   - address:
  cloud-init[1469]:     - 192.168.50.10
  cloud-init[1469]:     search:
  cloud-init[1469]:     - maas
  cloud-init[1469]:     type: nameserver
  cloud-init[1469]:   version: 1

  
  Output of the schema validation from cloud-init:
  # cloud-init schema --system
  Found cloud-config data types: user-data, vendor-data, network-config

  1. user-data at /var/lib/cloud/instances/xm6cnq/cloud-config.txt:
  Empty 'cloud-config' found at /var/lib/cloud/instances/xm6cnq/cloud-config.txt. Nothing to validate.

  2. vendor-data at /var/lib/cloud/instances/xm6cnq/vendor-cloud-config.txt:
    Valid schema vendor-data

  3. network-config at /var/lib/cloud/instances/xm6cnq/network-config.json:
    Invalid network-config /var/lib/cloud/instances/xm6cnq/network-config.json
    Error: Cloud config schema errors: config.0: Additional properties are not allowed ('id' was unexpected), config.0: {'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'} is not valid under any of the given schemas

  Error: Invalid schema: network-config

  And in /var/log/cloud-init.log, the following log is seen:
  schema.py[WARNING]: Invalid network-config provided:
  config.0: Additional properties are not allowed ('id' was unexpected)
  config.0: {'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'} is not valid under any of the given schemas

  Although the schema warning is displayed, networking is successfully configured:
  networking.py[DEBUG]: net: all expected physical devices present
  stages.py[DEBUG]: applying net config names for {'config': [{'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'}, {'address': ['192.168.50.10'], 'search': ['maas'], 'type': 'nameserver'}], 'version': 1}

  subp.py[DEBUG]: Running command ['ip', '-6', 'addr', 'show', 'permanent', 'scope', 'global'] with allowed return codes [0] (shell=False, capture=True)
  subp.py[DEBUG]: Running command ['ip', '-4', 'addr', 'show'] with allowed return codes [0] (shell=False, capture=True)
  __init__.py[DEBUG]: Detected interfaces {'ens3': {'downable': False, 'device_id': '0x0001', 'driver': 'virtio_net', 'mac': '52:54:00:29:c0:c6', 'name': 'ens3', 'up': True}, 'lo': {'downable': False, 'device_id': None, 'driver': None, 'mac': '00:00:00:00:00:00', 'name': 'lo', 'up': True}}
  __init__.py[DEBUG]: no work necessary for renaming of [['52:54:00:29:c0:c6', 'ens3', 'virtio_net', '0x0001']]
  stages.py[INFO]: Applying network configuration from system_cfg bringup=True: {'config': [{'id': 'ens3', 'mac_address': '52:54:00:29:c0:c6', 'mtu': 1500, 'name': 'ens3', 'subnets': [{'address': '192.168.50.12/24', 'dns_nameservers': ['192.168.50.10'], 'dns_search': ['maas'], 'gateway': '192.168.50.1', 'type': 'static'}], 'type': 'physical'}, {'address': ['192.168.50.10'], 'search': ['maas'], 'type': 'nameserver'}], 'version': 1}
  __init__.py[DEBUG]: Selected renderer 'sysconfig' from priority list: ['sysconfig', 'eni', 'netplan', 'network-manager', 'networkd']

To manage notifications about this bug go to:
https://bugs.launchpad.net/curtin/+bug/2116016/+subscriptions




More information about the foundations-bugs mailing list