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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-10.0
    • cloud-init
    • None
    • sst_virtualization_cloud
    • ssg_virtualization
    • QE ack
    • False
    • Hide

      None

      Show
      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

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

              Created:
              Updated: