Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-35562

[RHEL-10] It leaves the ipv6 networking config as blank in NM keyfile when config dhcp ipv6 with customization spec

    • cloud-init-24.1.4-12.el10
    • None
    • None
    • 2
    • rhel-sst-virtualization-cloud
    • ssg_virtualization
    • 1
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • RHELOPC Sprint 17, RHELOPC Sprint 18
    • None

      Description:
      This is a bug on the cloud-init DatasourceVMware side where we convert dhcp ipv6 customization spec to cloud-init networking config, it leaves the ipv6 networking config as blank when it's dhcp ipv6. For ifcfg-rh plugin, it's ok, but for keyfile plugin, it will not set the [ipv6] section in the cloud-init-ens192.nmconnection file.

      # cat /etc/NetworkManager/system-connections/cloud-init-ens192.nmconnection
      # Generated by cloud-init. Changes will be lost.

      [connection]
      id=cloud-init ens192
      uuid=dfaf916e-1ddf-5437-bf6d-d2dbb171f650
      autoconnect-priority=120
      type=ethernet

      [user]
      org.freedesktop.NetworkManager.origin=cloud-init

      [ethernet]
      mac-address=00:50:56:A5:C7:65

      [ipv4]
      method=auto
      may-fail=false

      // Missing [ipv6] section here, it should be method=auto in [ipv6] section.

      Test Steps:
      1. Deploy VM-template rhel-10 on ESXi
      2. Configure VM Customization Specifications - huzhao-dhcp-ipv4v6, which enables both ipv4 and ipv6 as dhcp mode (Please refer to the attachment for the detail config)
      3. Clone VM-new from VM-template with Customized file huzhao-dhcp-ipv4v6
      4. Check network and NM keyfile

      Actual results:
      The [ipv6] section is missing in the NM keyfile.

      # nmcli -f NAME,FILENAME c show
      NAME FILENAME
      cloud-init ens192 /etc/NetworkManager/system-connections/cloud-init-ens192.nmconnection
      lo /run/NetworkManager/system-connections/lo.nmconnection
      ens192 /etc/NetworkManager/system-connections/ens192.nmconnection

      # cat /etc/NetworkManager/system-connections/cloud-init-ens192.nmconnection
      # Generated by cloud-init. Changes will be lost.

      [connection]
      id=cloud-init ens192
      uuid=dfaf916e-1ddf-5437-bf6d-d2dbb171f650
      autoconnect-priority=120
      type=ethernet

      [user]
      org.freedesktop.NetworkManager.origin=cloud-init

      [ethernet]
      mac-address=00:50:56:A5:C7:65

      [ipv4]
      method=auto
      may-fail=false

      // Missing [ipv6] section here, it should be method=auto in [ipv6] section.

      # cat /run/cloud-init/network-config.json
      {
      "config": [
      {
      "mac_address": "00:50:56:a5:c7:65",
      "name": "ens192",
      "subnets": [
      {
      "control": "auto",
      "type": "dhcp" // There is only one type dhcp here, there should be both types dhcp4 and dhcp6
      }
      ],
      "type": "physical"
      }
      ],
      "version": 1
      }

      Actual results:
      There should be both [ipv4] and [ipv6] section in NM keyfile per the customization spec.
      e.g.
      # cat /etc/NetworkManager/system-connections/cloud-init-ens192.nmconnection
      ...
      [ipv4]
      method=auto
      ...

      [ipv6]
      method=auto
      ...

      Additional info:
      1. When config customization file with cloud-init config data like below, no such issue.
      #cloud-metadata
      instance-id: cloud-vm-test1
      local-hostname: cloud-vm
      network:
      version: 2
      ethernets:
      ens192:
      match:
      name: ens*
      dhcp4: yes
      dhcp6: yes

      # cat /etc/NetworkManager/system-connections/cloud-init-ens192.nmconnection
      # Generated by cloud-init. Changes will be lost.

      [connection]
      id=cloud-init ens192
      uuid=dfaf916e-1ddf-5437-bf6d-d2dbb171f650
      autoconnect-priority=120
      type=ethernet
      interface-name=ens192

      [user]
      org.freedesktop.NetworkManager.origin=cloud-init

      [ethernet]

      [ipv4]
      method=auto

      [ipv6]
      method=auto

      # cat /run/cloud-init/network-config.json
      {
      "ethernets": {
      "ens192": {
      "dhcp4": true,
      "dhcp6": true,
      "match":

      { "name": "ens*" }

      }
      },
      "version": 2
      }

      2. No such issue on OpenStack/AWS/Azure
      3. This issue also exists in rhel-9.5, rhel-9.4, rhel-9.3, rhel-8.10, rhel-8.9

              rhn-support-xiachen Amy Chen
              rhn-support-huzhao Huijuan Zhao
              VMware Confidential Group
              virt-maint virt-maint
              Huijuan Zhao Huijuan Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: