[Bug 1869155] Re: When installing with subiquity, the generated network config uses the macaddress keyword on s390x (where MAC addresses are not necessarily stable across reboots)

Frank Heimes 1869155 at bugs.launchpad.net
Wed Apr 1 07:09:12 UTC 2020


I retried with a fresh installation.

Prior to the 'Network connection' subiquity step/screen there is no
network yaml config in /etc/cloud/cloud.cfg.d/, but in /etc/netplan:

root at ubuntu-server:/# ls -l /etc/cloud/cloud.cfg.d/
total 4
-rw-r--r-- 1 root root 2057 Mar 10 14:22 05_logging.cfg
-rw-r--r-- 1 root root  285 Mar 30 07:55 90_dpkg.cfg
-rw-r--r-- 1 root root  167 Mar 10 14:22 README
root at ubuntu-server:/#

root at ubuntu-server:/# ls -l /etc/netplan/
total 8
-rw-r--r-- 1 root root 364 Apr  4 05:52 00-installer-config.yaml
-rw-r--r-- 1 root root 645 Apr  4 05:32 50-cloud-init.yaml.dist-subiquity
root at ubuntu-server:/#

And the content is:

root at ubuntu-server:/# cat /etc/netplan/50-cloud-init.yaml.dist-subiquity
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
    version: 2
    ethernets:
        encc000.2653:
            addresses:
            - 10.245.236.15/24
            gateway4: 10.245.236.1
            match:
                macaddress: ea:59:2f:d3:f2:08
            nameservers:
                addresses:
                - 10.245.236.1
            set-name: encc000.2653
root at ubuntu-server:/#
root at ubuntu-server:/# cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    encc000:
      match:
        macaddress: ea:59:2f:d3:f2:08
      nameservers:
        addresses:
        - 10.245.236.1
      set-name: encc000.2653
  version: 2
  vlans:
    encc000.2653:
      id: 2653
      link: encc000
      nameservers:
        addresses:
        - 10.245.236.1
root at ubuntu-server:/#

The 50-cloud-init.yaml.dist-subiquity looks incorrect to me, since it
doesn't define the base interface 'encc000', I already mentioned that
match macaddresses shouldn't be there on this platform and are actually
not needed imho (and d-i does not set it either), and I also don't know
the reason for "set-name: encc000.2653".

The 00-installer-config.yaml looks different - it defines the base interface encc000, but afaik neame server settings should only be at the vlan interface encc000.2653, right? (Maybe it doesn't harm to have them twice, but look weird and unneeded). But here is not gateway(4) set!
The 'match: macaddress' entry is here, too as well as 'set-name: encc000.2653', but the latter one is here part of the base interface, and in the cloud init version it is part of the vlan interface.

And since I'm not able to correctly configure a working VLAN (with base and VLAN interface) via the subiquity UI, I can't provide more valuable information.
My next step would be to rewrite the one of the two netplan yaml files (or replace it with an own one) that I know is working, and I think that is finally copied to /etc/cloud/cloud.cfg.d/.

I attached the full steps/sequence ...

Btw. I found now the following block in the boot messages (I don't
remember seeing that before):

...
"[   31.245347] cloud-init[1139]: 2020-04-04 06:02:30,261 - stages.py[WARNING]: F"
"ailed to rename devices: [unknown] Error performing rename('encc000', 'encc000.2"
"653') for 06:1b:99:08:98:c7, encc000.2653: Unexpected error while running comman"
d.
"[   31.245381] cloud-init[1139]: Command: ['ip', 'link', 'set', 'encc000', 'name"
"', 'encc000.2653']"
"[   31.245414] cloud-init[1139]: Exit code: 2"
"[   31.245446] cloud-init[1139]: Reason: -"
"[   31.245478] cloud-init[1139]: Stdout:"
"[   31.245510] cloud-init[1139]: Stderr: RTNETLINK answers: File exists"
"[   31.245545] cloud-init[1139]: [unknown] Error performing up('encc000.2653',)"
"for 06:1b:99:08:98:c7, encc000.2653: Unexpected error while running command."
"[   31.245578] cloud-init[1139]: Command: ['ip', 'link', 'set', 'encc000.2653',"
'up']
"[   31.245611] cloud-init[1139]: Exit code: 2"
"[   31.245642] cloud-init[1139]: Reason: -"
"[   31.245674] cloud-init[1139]: Stdout:"
"[   31.245708] cloud-init[1139]: Stderr: RTNETLINK answers: Network is down"
...


** Attachment added: "subiquity test - focal live 01042020 - network.txt"
   https://bugs.launchpad.net/cloud-init/+bug/1869155/+attachment/5344136/+files/subiquity%20test%20-%20focal%20live%2001042020%20-%20network.txt

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

Title:
  When installing with subiquity, the generated network config uses the
  macaddress keyword on s390x (where MAC addresses are not necessarily
  stable across reboots)

Status in cloud-init:
  Incomplete
Status in subiquity:
  New
Status in Ubuntu on IBM z Systems:
  New
Status in initramfs-tools package in Ubuntu:
  New

Bug description:
  While performing a subiquity focal installation on an s390x LPAR (where the LPAR is connected to a VLAN trunk) I saw a section like this:
     match:
          macaddress: 02:28:0b:00:00:53
  So the macaddress keyword is used, but on several s390x machine generation MAC addresses are
  not necessarily stable and uniquie across reboots.
  (z14 GA2 and newer system have in between a modified firmware that ensures that MAC addresses are stable and uniquire across reboots, but for z14 GA 1 and older systems, incl. the z13 that I used this is not the case - and a backport of the firmware modification is very unlikely)

  The configuration that I found is this:

  $ cat /etc/netplan/50-cloud-init.yaml
  # This file is generated from information provided by the datasource. Changes
  # to it will not persist across an instance reboot. To disable cloud-init's
  # network configuration capabilities, write a file
  # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  # network: {config: disabled}
  network:
      ethernets:
          enc600:
              addresses:
              - 10.245.236.26/24
              gateway4: 10.245.236.1
              match:
                  macaddress: 02:28:0b:00:00:53
              nameservers:
                  addresses:
                  - 10.245.236.1
              set-name: enc600
      version: 2

  (This is a spin-off of ticket LP 1868246.)

  It's understood that the initial idea for the MAC addresses was to have a unique identifier, but
  I think with the right tooling (ip, ifconfig, ethtool or even the network-manager UI) you can even change MAC addresses today on other platforms.

  Nowadays interface names are based on their underlying physical
  device/address (here in this case '600' or to be precise '0600' -
  leading '0' are removed), which makes the interface and it's name
  already quite unique - since it is not possible to have two devices
  (in one system) with the exact same address.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1869155/+subscriptions



More information about the foundations-bugs mailing list