main interface renamed from ens160 to eth0 after AIO VM restart

Bug #1896589 reported by Ilya Popov
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
High
Dmitriy Rabotyagov

Bug Description

Ubuntu release:

root@aio1:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

Openstack ansible release:

stable/ussuri on tag 21.0.1

HOW TO REPRODUCE:

Use official documentation from:
https://docs.openstack.org/openstack-ansible/ussuri/user/aio/quickstart.html

After script bootstrap-aio.sh will be finished, check the existing interfaces:

$ ip -4 a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 9000 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    inet x.x.x.x/24 brd 10.8.27.255 scope global dynamic ens160
       valid_lft 775552sec preferred_lft 775552sec
3: lxcbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    inet 10.255.255.1/24 brd 10.255.255.255 scope global lxcbr0
       valid_lft forever preferred_lft forever
52: br-vlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    inet 172.29.248.1/22 brd 172.29.251.255 scope global br-vlan
       valid_lft forever preferred_lft forever
    inet 172.29.248.100/22 brd 172.29.251.255 scope global secondary br-vlan
       valid_lft forever preferred_lft forever
53: br-storage: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    inet 172.29.244.100/22 brd 172.29.247.255 scope global br-storage
       valid_lft forever preferred_lft forever
54: br-vxlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    inet 172.29.240.100/22 brd 172.29.243.255 scope global br-vxlan
       valid_lft forever preferred_lft forever
55: br-mgmt: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    inet 172.29.236.100/22 brd 172.29.239.255 scope global br-mgmt
       valid_lft forever preferred_lft forever
66: br-lbaas: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    inet 172.29.252.100/22 brd 172.29.255.255 scope global br-lbaas
       valid_lft forever preferred_lft forever
67: br-dbaas: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc noqueue state UP group default qlen 1000
    inet 172.29.232.100/22 brd 172.29.235.255 scope global br-dbaas
       valid_lft forever preferred_lft forever

ls -alh /sys/class/net/
...
ens160 -> ../../devices/pci0000:00/0000:00:15.0/0000:03:00.0/net/ens160
...

Than try to reboot VM. Network initialisation during boot will take much longer. Connectivity to VM via LAN will be broken. Open console to VM, check interfaces again:

ls -alh /sys/class/net/
...
lrwxrwxrwx 1 root root 0 Sep 22 12:12 eth0 -> ../../devices/pci0000:00/0000:00:15.0/0000:03:00.0/net/eth0
...

If we will remove configuration files created by bootstrap-aio.sh:

mv /etc/systemd/network/*osa* /root

and reboot VM, network connectivity will be restored. It looks like system network config is not compatible with installed by bootstrap-aio.sh into /etc/systemd/network

Revision history for this message
Ilya Popov (ilya-p) wrote :

By the way:

1.
root@aio1:~# udevadm test-builtin net_setup_link /lib/systemd/network/99-default.link
calling: test-builtin
Load module index
Parsed configuration file /lib/systemd/network/99-default.link
/etc/systemd/network/0-osa_testing-dummy-mgmt.link:2: Unknown lvalue 'Name' in section 'Match'
...

2. According to man 5 systemd.link there is no "Name" option in "Match" section

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Dmitriy Rabotyagov (noonedeadpunk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-role-systemd_networkd (master)
Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-role-systemd_networkd (master)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-systemd_networkd/+/907527
Committed: https://opendev.org/openstack/ansible-role-systemd_networkd/commit/b9c7d79089478d115e18d29c9ae9de0cbd49d58d
Submitter: "Zuul (22348)"
Branch: master

commit b9c7d79089478d115e18d29c9ae9de0cbd49d58d
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri Feb 2 12:16:14 2024 +0100

    Use OriginalName instead of Name in systemd.link

    Name option is not a valid one for systemd.link [1] while it is for systemd.network [2]
    though having same meaning.

    This basically resulted in link files being just ignored by udevadm
    and were not loaded properly after reboot

    [1] https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#OriginalName=
    [2] https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#Name=

    Closes-Bug: #1896589
    Change-Id: If82946b7f5ad3c618606110576c586632f9bbd08

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-role-systemd_networkd (stable/2023.2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-role-systemd_networkd (stable/2023.1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-role-systemd_networkd (stable/zed)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-role-systemd_networkd (unmaintained/yoga)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-role-systemd_networkd (stable/2023.1)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-systemd_networkd/+/908814
Committed: https://opendev.org/openstack/ansible-role-systemd_networkd/commit/6e6c93d0d05f80346f4035dab5b27316b48faa3e
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit 6e6c93d0d05f80346f4035dab5b27316b48faa3e
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri Feb 2 12:16:14 2024 +0100

    Use OriginalName instead of Name in systemd.link

    Name option is not a valid one for systemd.link [1] while it is for systemd.network [2]
    though having same meaning.

    This basically resulted in link files being just ignored by udevadm
    and were not loaded properly after reboot

    [1] https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#OriginalName=
    [2] https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#Name=

    Closes-Bug: #1896589
    Change-Id: If82946b7f5ad3c618606110576c586632f9bbd08
    (cherry picked from commit b9c7d79089478d115e18d29c9ae9de0cbd49d58d)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-role-systemd_networkd (stable/2023.2)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-systemd_networkd/+/908813
Committed: https://opendev.org/openstack/ansible-role-systemd_networkd/commit/aafc7ba7085410c80a28b02be5c612da11a4e805
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit aafc7ba7085410c80a28b02be5c612da11a4e805
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri Feb 2 12:16:14 2024 +0100

    Use OriginalName instead of Name in systemd.link

    Name option is not a valid one for systemd.link [1] while it is for systemd.network [2]
    though having same meaning.

    This basically resulted in link files being just ignored by udevadm
    and were not loaded properly after reboot

    [1] https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#OriginalName=
    [2] https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#Name=

    Closes-Bug: #1896589
    Change-Id: If82946b7f5ad3c618606110576c586632f9bbd08
    (cherry picked from commit b9c7d79089478d115e18d29c9ae9de0cbd49d58d)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-role-systemd_networkd (stable/zed)

Reviewed: https://review.opendev.org/c/openstack/ansible-role-systemd_networkd/+/908815
Committed: https://opendev.org/openstack/ansible-role-systemd_networkd/commit/44c8f3d5332970603271358177f512340877e806
Submitter: "Zuul (22348)"
Branch: stable/zed

commit 44c8f3d5332970603271358177f512340877e806
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri Feb 2 12:16:14 2024 +0100

    Use OriginalName instead of Name in systemd.link

    Name option is not a valid one for systemd.link [1] while it is for systemd.network [2]
    though having same meaning.

    This basically resulted in link files being just ignored by udevadm
    and were not loaded properly after reboot

    [1] https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#OriginalName=
    [2] https://www.freedesktop.org/software/systemd/man/latest/systemd.network.html#Name=

    Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-tests/+/911064
    Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/911050
    Closes-Bug: #1896589
    Change-Id: If82946b7f5ad3c618606110576c586632f9bbd08
    (cherry picked from commit b9c7d79089478d115e18d29c9ae9de0cbd49d58d)

tags: added: in-stable-zed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.