Description of problem: os-net-config file is not updating the local_interface during undercloud upgrade and cause failure. Failure log +++ TASK [take new os-net-config parameters into account now] ************************************************************************************************************************************************************************************ Friday 02 April 2021 05:21:38 -0400 (0:00:00.287) 0:04:24.274 ********** fatal: [undercloud-0]: FAILED! => {"changed": false, "cmd": ["os-net-config", "--no-activate", "-c", "/etc/os-net-config/config.json", "-v", "--detailed-exit-codes"], "delta": "0:00:01.096396", "end": "2021-04-02 05:21:39.464402", "failed_when_result": true, "msg": "non-zero return code", "rc": 1, "start": "2021-04-02 05:21:38.368006", "stderr": "[2021/04/02 05:21:39 AM] [INFO] Using config file at: /etc/os-net-config/config.json\n[2021/04/02 05:21:39 AM] [INFO] Ifcfg net config provider created.\n[2021/04/02 05:21:39 AM] [INFO] Not using any mapping file.\n[2021/04/02 05:21:39 AM] [INFO] Finding active nics\n[2021/04/02 05:21:39 AM] [INFO] br-ctlplane is not an active nic\n[2021/04/02 05:21:39 AM] [INFO] em2 is an embedded active nic\n[2021/04/02 05:21:39 AM] [INFO] em0 is an embedded active nic\n[2021/04/02 05:21:39 AM] [INFO] lo is not an active nic\n[2021/04/02 05:21:39 AM] [INFO] br-int is not an active nic\n[2021/04/02 05:21:39 AM] [INFO] em1 is an embedded active nic\n[2021/04/02 05:21:39 AM] [INFO] ovs-system is not an active nic\n[2021/04/02 05:21:39 AM] [INFO] No DPDK mapping available in path (/var/lib/os-net-config/dpdk_mapping.yaml)\n[2021/04/02 05:21:39 AM] [INFO] Active nics are ['em0', 'em1', 'em2']\n[2021/04/02 05:21:39 AM] [INFO] nic1 mapped to: em0\n[2021/04/02 05:21:39 AM] [INFO] nic3 mapped to: em2\n[2021/04/02 05:21:39 AM] [INFO] nic2 mapped to: em1\n[2021/04/02 05:21:39 AM] [INFO] adding bridge: br-ctlplane\n[2021/04/02 05:21:39 AM] [ERROR] Unable to read mac address: eth0\nTraceback (most recent call last):\n File \"/bin/os-net-config\", line 10, in <module>\n sys.exit(main())\n File \"/usr/lib/python3.6/site-packages/os_net_config/cli.py\", line 343, in main\n provider.add_object(obj)\n File \"/usr/lib/python3.6/site-packages/os_net_config/__init__.py\", line 64, in add_object\n self.add_bridge(obj)\n File \"/usr/lib/python3.6/site-packages/os_net_config/impl_ifcfg.py\", line 802, in add_bridge\n data = self._add_common(bridge)\n File \"/usr/lib/python3.6/site-packages/os_net_config/impl_ifcfg.py\", line 470, in _add_common\n mac = utils.interface_mac(base_opt.primary_interface_name)\n File \"/usr/lib/python3.6/site-packages/os_net_config/utils.py\", line 120, in interface_mac\n with open(_SYS_CLASS_NET + '/%s/address' % name, 'r') as f:\nFileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/eth0/address'", "stderr_lines": ["[2021/04/02 05:21:39 AM] [INFO] Using config file at: /etc/os-net-config/config.json", "[2021/04/02 05:21:39 AM] [INFO] Ifcfg net config provider created.", "[2021/04/02 05:21:39 AM] [INFO] Not using any mapping file.", "[2021/04/02 05:21:39 AM] [INFO] Finding active nics", "[2021/04/02 05:21:39 AM] [INFO] br-ctlplane is not an active nic", "[2021/04/02 05:21:39 AM] [INFO] em2 is an embedded active nic", "[2021/04/02 05:21:39 AM] [INFO] em0 is an embedded active nic", "[2021/04/02 05:21:39 AM] [INFO] lo is not an active nic", "[2021/04/02 05:21:39 AM] [INFO] br-int is not an active nic", "[2021/04/02 05:21:39 AM] [INFO] em1 is an embedded active nic", "[2021/04/02 05:21:39 AM] [INFO] ovs-system is not an active nic", "[2021/04/02 05:21:39 AM] [INFO] No DPDK mapping available in path (/var/lib/os-net-config/dpdk_mapping.yaml)", "[2021/04/02 05:21:39 AM] [INFO] Active nics are ['em0', 'em1', 'em2']", "[2021/04/02 05:21:39 AM] [INFO] nic1 mapped to: em0", "[2021/04/02 05:21:39 AM] [INFO] nic3 mapped to: em2", "[2021/04/02 05:21:39 AM] [INFO] nic2 mapped to: em1", "[2021/04/02 05:21:39 AM] [INFO] adding bridge: br-ctlplane", "[2021/04/02 05:21:39 AM] [ERROR] Unable to read mac address: eth0", "Traceback (most recent call last):", " File \"/bin/os-net-config\", line 10, in <module>", " sys.exit(main())", " File \"/usr/lib/python3.6/site-packages/os_net_config/cli.py\", line 343, in main", " provider.add_object(obj)", " File \"/usr/lib/python3.6/site-packages/os_net_config/__init__.py\", line 64, in add_object", " self.add_bridge(obj)", " File \"/usr/lib/python3.6/site-packages/os_net_config/impl_ifcfg.py\", line 802, in add_bridge", " data = self._add_common(bridge)", " File \"/usr/lib/python3.6/site-packages/os_net_config/impl_ifcfg.py\", line 470, in _add_common", " mac = utils.interface_mac(base_opt.primary_interface_name)", " File \"/usr/lib/python3.6/site-packages/os_net_config/utils.py\", line 120, in interface_mac", " with open(_SYS_CLASS_NET + '/%s/address' % name, 'r') as f:", "FileNotFoundError: [Errno 2] No such file or directory: '/sys/class/net/eth0/address'"], "stdout": "", "stdout_lines": []} +++ +++ [stack@undercloud-0 ~]$ ip a 2: em0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master ovs-system state UP group default qlen 1000 link/ether 52:54:00:c1:f1:53 brd ff:ff:ff:ff:ff:ff 8: br-ctlplane: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000 link/ether 52:54:00:c1:f1:53 brd ff:ff:ff:ff:ff:ff inet 192.168.24.1/24 brd 192.168.24.255 scope global br-ctlplane valid_lft forever preferred_lft forever inet 192.168.24.3/32 scope global br-ctlplane valid_lft forever preferred_lft forever inet 192.168.24.2/32 scope global br-ctlplane valid_lft forever preferred_lft forever +++ In undercloud.conf, local_interface is update +++ [stack@undercloud-0 ~]$ grep local_interface undercloud.conf local_interface = em0 +++ But /etc/os-net-config/config.json is still had old interface name +++ [stack@undercloud-0 ~]$ cat /etc/os-net-config/config.json {"network_config": [{"addresses": [{"ip_netmask": "192.168.24.1/24"}], "dns_servers": [], "domain": [], "members": [{"mtu": 1500, "name": "eth0", "primary": true, "type": "interface"}], "name": "br-ctlplane", "ovs_extra": ["br-set-external-id br-ctlplane bridge-id br-ctlplane"], "routes": [], "type": "ovs_bridge", "use_dhcp": false}]} +++ Version-Release number of selected component (if applicable): RedHat Openstack Platform 16.1 How reproducible: Steps to Reproduce: 1. Change the nic name 2. And run openstack undercloud upgrade 3.
We update the /etc/os-net-config/config.json manually and re-run the upgrade and pass the issue.
*** Bug 1949753 has been marked as a duplicate of this bug. ***
This bugzilla is being handled via docs BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1948536 Documentation needs to be updated including the replacement of the old non-predictable interface name in undercloud.conf and /etc/os-net-config/config.json https://bugzilla.redhat.com/show_bug.cgi?id=1948536#c4 Assigning it as duplicate of BZ#1948536 *** This bug has been marked as a duplicate of bug 1948536 ***