Univention Bugzilla – Bug 48622
"ip address flush" also removes the IPv6 link-local adress - breaks ucs-test
Last modified: 2019-02-07 12:24:52 CET
Created attachment 9831 [details] Hacked FlushOldAddresses.py with additional debug output /usr/lib/univention-system-setup/scripts/setup-join.sh:202 > run-parts -v -a --network-only -a --appliance-mode -- /usr/lib/univention-system-setup/scripts/30_net ... /usr/lib/univention-system-setup/scripts/30_net/10interfaces ... /usr/share/pyshared/univention/management/console/modules/setup/netconf/modules/FlushOldAddresses.py:14 > self.call(["ip", "addr", "flush", iface.name]) This also flushes the IPv6 link-local address, which breaks ucs-kvm-create which is no longer able to connect to the VM. I verified this using the attached version of FlushOldAddresses.py: > ERROR:uss.network.phase.FlushOldAddresses:pre > 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 > link/ether 52:54:00:80:ed:f9 brd ff:ff:ff:ff:ff:ff > inet6 fe80::5054:ff:fe80:edf9/64 scope link ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > valid_lft forever preferred_lft forever > ERROR:uss.network.phase.FlushOldAddresses:post > 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 > link/ether 52:54:00:80:ed:f9 brd ff:ff:ff:ff:ff:ff From <man:ip-address(8)>: > ip address flush dev eth4 scope global > Removes all global IPv4 and IPv6 addresses from device eth4. Without 'scope global' it would remove all addresses including IPv6 link-local ones. We should just add that "scope global" to "FlushOldAddresses.py": diff --git a/base/univention-system-setup/umc/python/setup/netconf/modules/FlushOldAddresses.py b/base/univention-system-setup/umc/python/setup/netconf/modules/FlushOldAddresses.py index 27cd55b87c..ed8954ec1b 100644 --- a/base/univention-system-setup/umc/python/setup/netconf/modules/FlushOldAddresses.py +++ b/base/univention-system-setup/umc/python/setup/netconf/modules/FlushOldAddresses.py @@ -11,4 +11,4 @@ class PhaseFlushOldAddresses(Phase): def pre(self): super(PhaseFlushOldAddresses, self).pre() for _name, iface in self.changeset.old_interfaces.all_interfaces: - self.call(["ip", "addr", "flush", iface.name]) + self.call(["ip", "addr", "flush", iface.name, "scope", "global"])
This change was at least in our images starting with UCS 4.3-3, there are no problems to create UCS Appliances and App Appliances to my knowledge. In which scenario does this break? The change to flush the interfaces also in appliance mode was done in Bug #47767, git show 31d208400e7f6c2e3afb41689540e3f1016e1713
(In reply to Erik Damrose from comment #1) > This change was at least in our images starting with UCS 4.3-3, there are no > problems to create UCS Appliances and App Appliances to my knowledge. > In which scenario does this break? # umc-client -U Administrator -P univention command setup/net/apply -e -o '{"values":{"interfaces":{"eth0":{"name":"eth0","interfaceType":"Ethernet","ip4dynamic":True},"eth1":{"name":"eth1","interfaceType":"Ethernet"}}}}' # ip --color address show eth1 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 52:54:00:80:ed:f9 brd ff:ff:ff:ff:ff:ff Happened to me while writing a test for Bug #48427