tech:network:cml:2.1:issues:1aa5d9f1:cml2.1-refplat_p-20201020-fcs.iso-ubuntu-20.04-focal-has-wrong-interface-name

Issue: 1aa5d9f1 CML-P 2.1 refplat_p-20201020-fcs.iso Ubuntu 20.04(Focal) has wrong interface name

  1. ID: 1aa5d9f1-01c1-4923-b045-8649b35d09bc
  2. Status:
    1. CML-P 2.0 N/A
    2. CML-P 2.1 and refplat_p-20201020-fcs.iso not fixed

Symptom

Ubuntu 18.04 LTS (Bionic) image has interface name like a enp0s2 and CML-P 2.0 Lab Manager shows enp0s2 respective.
But, 20.04 LTS (Focal) image has interface name like a ens2 and CML-P 2.1 Dashboard display still enp0s2.

  1. enp0s2ens2
  2. enp0s3ens3

So, Ubuntu 18.04 LTS (Bionic) Netplan configuration not works on Ubuntu 20.04 LTS (Focal) because actual interface name is like a ens2 but not match enp0s2 that displayed on CML-P 2.1 Dashboard.

This problem cause IP network configuration not properly configured. ( Static IP, DNS, Static Routes, …,etc. )

Mitigation

  1. Change your cloud-init cloud-config User-Data interface name to use ens2.
  2. Use Ubuntu 18.04 LTS (Bionic) Image.

Change cloud-init cloud-config User-Data interface name to use ens2 Example

Essential part

# before
enp0s2:
   match:
      name: enp0s2
# after
ens2:
   match:
      name: ens2

Entire cloud-init cloud-config User-Data example.

#cloud-config
password: EgkhdSc5mwTu1cvrrk17zVC6NSKa7Y4AGSTDv2tHgfnwOVWvToCVDAHEKWKH1rl1
chpasswd: { expire: False }
hostname: ubuntu-0
ssh_pwauth: True
ssh_authorized_keys:
   - ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBIbn2VyO9Mby6BwkijQmGfH8O2+Uqewn0/oIOXOxMNgCZiztR3v2o5n1l9ET1GuN7iVMe9whoUiNuZMUVEv0INb+A6Yd0M/37tlWlC+qbIjjqL6UzJAqRISdGP1oVmnV2g== wnoguchi@lasthope.pg1x.net
package_upgrade: true
packages:
   - curl
   - ftp
   - iperf3
   - netcat-openbsd
   - bind-utils
write_files:
- path: /etc/netplan/51-cloud-init_static.yaml
  permissions: '0644'
  content: |
     network:
        version: 2
        ethernets:
           ens2:
              dhcp4: true
              dhcp6: true
              match:
                 name: ens2
           ens3:
              match:
                 name: ens3
              addresses:
                 - 10.1.1.200/24
              routes:
                 - to: 10.0.0.0/8
                   via: 10.1.1.1
                   metric: 0
              #gateway4: 198.168.255.1
              #nameservers:
              #   addresses:
              #      - 8.8.8.8
runcmd:
   - [ sudo, netplan, generate ]
   - [ sudo, netplan, apply ]
tech/network/cml/2.1/issues/1aa5d9f1/cml2.1-refplat_p-20201020-fcs.iso-ubuntu-20.04-focal-has-wrong-interface-name.txt · Last modified: 2020/11/30 18:07 by wnoguchi