Bug 2124443
| Summary: | Host ip changed when start vm | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | aihua liang <aliang> | ||||
| Component: | NetworkManager | Assignee: | Beniamino Galvani <bgalvani> | ||||
| Status: | CLOSED ERRATA | QA Contact: | David Jaša <djasa> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | urgent | ||||||
| Version: | 8.7 | CC: | bgalvani, coli, djasa, gshan, jinzhao, juzhang, leiyang, lrintel, mdeng, nanliu, qinwang, rkhan, sfaye, sukulkar, till, toneata, vbenes, virt-maint, xuwei, yihyu | ||||
| Target Milestone: | rc | Keywords: | Triaged, ZStream | ||||
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | NetworkManager-1.40.4-1.el8 | Doc Type: | No Doc Update | ||||
| Doc Text: |
If this bug requires documentation, please select an appropriate Doc Type value.
|
Story Points: | --- | ||||
| Clone Of: | |||||||
| : | 2132285 (view as bug list) | Environment: | |||||
| Last Closed: | 2023-05-16 09:05:00 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 2132285 | ||||||
| Attachments: |
|
||||||
4.18.0-393.el8.x86_64 with qemu-kvm-6.2.0-14.module+el8.7.0+15289+26b4351e don't hit this issue. (In reply to aihua liang from comment #1) > 4.18.0-393.el8.x86_64 with qemu-kvm-6.2.0-14.module+el8.7.0+15289+26b4351e > don't hit this issue. Test again with the kernel and qemu version for many times, also hit this issue. (In reply to aihua liang from comment #3) > (In reply to aihua liang from comment #1) > > 4.18.0-393.el8.x86_64 with qemu-kvm-6.2.0-14.module+el8.7.0+15289+26b4351e > > don't hit this issue. > > Test again with the kernel and qemu version for many times, also hit this > issue. This look like a NetworkManager issues, so changed the coponent to "NetworkManager". Please correct me if I'm wrong. Thanks Lei Please set level=TRACE in the [logging] section of /etc/NetworkManager/NetworkManager.conf, execute "systemctl restart NetworkManager", reproduce the problem and then attach the output of "journalctl -u NetworkManager -b". Thank you What happens is that when the VM is started, a tap interface is added to the bridge. A bridge always gets the lowest MAC address of all ports attached to it, and so the MAC of the bridge changes. To fix bug 2110000, now NM restarts DHCP when the MAC changes, therefore the IP changes. RHEL9.2 has the issue either. Yihuang and I hit the issue on RHEL9.2. Bridge's MAC address is assigned like comment#7 explained. Yihuang and I sorted out the workaround, not blocking the testing at least. (1) before guest is started br0's MAC addr: f4:6b:8c:55:68:3d (2) start guest with command line -netdev tap,id=net0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown \ -device e1000e,bus=pcie.5,netdev=net0, mac=52:54:00:f1:26:a0 (3) after guest is started br0's MAC addr: 7e:bc:c5:79:d2:96 <<< br0 and tap0 have same MAC address tap0's MAC addr: 7e:bc:c5:79:d2:96 In /etc/qemu-ifup, to specify tap0's MAC address, which is high enough. The bridge's MAC and IP address aren't changed after guest boots up. #!/bin/sh ip link set dev $1 address f4:6b:8c:55:68:80 <<< to have high MAC address for 'tap0' ip link set $1 up ip link set dev $1 master br0 ip link set br0 type bridge forward_delay 0 ip link set br0 type bridge stp_state 0 I don't think this is expected from NM. We decided that we want to revert the patch for bug 2110000 to go back to the previous behavior. Created attachment 1914537 [details]
Reproducer with iproute2
The reproducer in attachment shows that the IP address of the bridge changes when a new port is attached:
dnsmasq-dhcp: DHCPDISCOVER(veth1) 4a:37:01:56:9d:ae
dnsmasq-dhcp: DHCPOFFER(veth1) 172.25.1.150 4a:37:01:56:9d:ae
dnsmasq-dhcp: DHCPREQUEST(veth1) 172.25.1.150 4a:37:01:56:9d:ae
dnsmasq-dhcp: DHCPACK(veth1) 172.25.1.150 4a:37:01:56:9d:ae
* Initial address:
83: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 4a:37:01:56:9d:ae brd ff:ff:ff:ff:ff:ff
inet 172.25.1.150/24 brd 172.25.1.255 scope global dynamic noprefixroute br0
valid_lft 111sec preferred_lft 111sec
dnsmasq-dhcp: DHCPDISCOVER(veth1) 172.25.1.150 00:00:00:00:22:44
dnsmasq-dhcp: DHCPOFFER(veth1) 172.25.1.151 00:00:00:00:22:44
dnsmasq-dhcp: DHCPDISCOVER(veth1) 172.25.1.150 00:00:00:00:22:44
dnsmasq-dhcp: DHCPOFFER(veth1) 172.25.1.151 00:00:00:00:22:44
dnsmasq-dhcp: DHCPREQUEST(veth1) 172.25.1.151 00:00:00:00:22:44
dnsmasq-dhcp: DHCPACK(veth1) 172.25.1.151 00:00:00:00:22:44
* Final address:
83: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:00:00:00:22:44 brd ff:ff:ff:ff:ff:ff
inet 172.25.1.151/24 brd 172.25.1.255 scope global dynamic noprefixroute br0
This seems a serious regression, I think we should fix this in 8.7.z. I hit this issue on
root@dell-per440-11 /home $ rpm -qa|grep Network
NetworkManager-adsl-1.40.2-1.el8.x86_64
NetworkManager-wwan-1.40.2-1.el8.x86_64
NetworkManager-1.40.2-1.el8.x86_64
NetworkManager-wifi-1.40.2-1.el8.x86_64
NetworkManager-tui-1.40.2-1.el8.x86_64
NetworkManager-config-server-1.40.2-1.el8.noarch
NetworkManager-team-1.40.2-1.el8.x86_64
NetworkManager-libnm-1.40.2-1.el8.x86_64
NetworkManager-bluetooth-1.40.2-1.el8.x86_64
Red Hat Enterprise Linux release 8.8 Beta (Ootpa)
4.18.0-437.el8.x86_64
qemu-kvm-6.2.0-22.module+el8.8.0+16816+1d3555ec.x86_64
seabios-bin-1.16.0-3.module+el8.8.0+16781+9f4724c2.noarch
cmd line:
/usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1' \
-machine q35,memory-backend=mem-machine_mem \
-device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \
-device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0 \
-nodefaults \
-device VGA,bus=pcie.0,addr=0x2 \
-m 8g \
-object memory-backend-ram,size=8g,id=mem-machine_mem \
-smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2 \
-cpu 'Cascadelake-Server',ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,rdctl-no=on,ibrs-all=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,tsx-ctrl=on,hle=off,rtm=off,kvm_pv_unhalt=on \
-device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \
-device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \
-device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \
-object '{"qom-type": "iothread", "id": "iothread0"}' \
-object '{"qom-type": "iothread", "id": "iothread1"}' \
-blockdev '{"node-name": "file_image1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kvm_autotest_root/images/rhel880-64-virtio.qcow2", "cache": {"direct": true, "no-flush": false}}' \
-blockdev '{"node-name": "drive_image1", "driver": "qcow2", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_image1"}' \
-device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \
-device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,write-cache=on,bus=pcie-root-port-2,addr=0x0,iothread=iothread0 \
-device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \
-device virtio-net-pci,mac=9a:ae:3b:5d:65:a9,id=iddrLgMU,netdev=idhOgMai,bus=pcie-root-port-3,addr=0x0 \
-netdev tap,id=idhOgMai \
-vnc :5 \
-monitor stdio \
-qmp tcp:0:5955,server,nowait \
-rtc base=utc,clock=host,driftfix=slew \
-boot menu=off,order=cdn,once=c,strict=off \
-enable-kvm \
-device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5 \
\
-chardev socket,id=socket-serial,path=/var/tmp/socket-serial,logfile=/var/tmp/file-serial.log,mux=on,server=on,wait=off \
-serial chardev:socket-serial \
-chardev file,path=/var/tmp/file-bios.log,id=file-bios \
-device isa-debugcon,chardev=file-bios,iobase=0x402 \
Hi, this was incorrectly marked as fixed in NetworkManager-1.40.2-1.el8, but is actually fixed in 1.40.4-1.el8. Sorry for the inconvenience; can you please test the new version? (In reply to Beniamino Galvani from comment #21) > Hi, this was incorrectly marked as fixed in NetworkManager-1.40.2-1.el8, but > is actually fixed in 1.40.4-1.el8. > > Sorry for the inconvenience; can you please test the new version? Boot VM 10 times it does not make host IP change. root@dell-per440-11 /home/vbugs/bug/2141964 $ rpm -qa|grep -i networkm NetworkManager-wifi-1.40.4-1.el8.x86_64 NetworkManager-bluetooth-1.40.4-1.el8.x86_64 NetworkManager-adsl-1.40.4-1.el8.x86_64 NetworkManager-ovs-1.40.4-1.el8.x86_64 NetworkManager-config-server-1.40.2-1.el8.noarch NetworkManager-wwan-1.40.4-1.el8.x86_64 NetworkManager-tui-1.40.4-1.el8.x86_64 NetworkManager-1.40.4-1.el8.x86_64 NetworkManager-team-1.40.4-1.el8.x86_64 NetworkManager-ppp-1.40.4-1.el8.x86_64 NetworkManager-libnm-devel-1.40.4-1.el8.x86_64 NetworkManager-cloud-setup-1.40.4-1.el8.x86_64 NetworkManager-libnm-1.40.4-1.el8.x86_64 1.40.4-1.el8: IPv4 and IPv6 addresses stay the same even after DHCP and SLAAC would force their change after a port interface with lowest possible MAC address had been added to the bridge. As per this and results by Quing in comment 23, I'm marking the bug as VERIFIED. Tested by NM CI scenarios: bridge_new_lower_mac_port_unchanged_ip_addresses_v4 bridge_new_lower_mac_port_unchanged_ip_addresses_v6 (In reply to David Jaša from comment #24) > 1.40.4-1.el8: IPv4 and IPv6 addresses stay the same even after DHCP and > SLAAC would force their change after a port interface with lowest possible > MAC address had been added to the bridge. > > As per this and results by Quing in comment 23, I'm marking the bug as > VERIFIED. > > Tested by NM CI scenarios: > bridge_new_lower_mac_port_unchanged_ip_addresses_v4 > bridge_new_lower_mac_port_unchanged_ip_addresses_v6 Actually flipping the bug. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (NetworkManager bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2023:2968 |
Description of problem: Host ip changed when start vm Version-Release number of selected component (if applicable): kernel version:4.18.0-423.el8.x86_64 qemu-kvm version:qemu-kvm-6.2.0-15.module+el8.7.0+15644+189a21f6 How reproducible: 80% Steps to Reproduce: 1.Check host ip #ifconfig switch: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.73.196.25 netmask 255.255.252.0 broadcast 10.73.199.255 inet6 2620:52:0:49c4:a79b:ccbe:c89e:b188 prefixlen 64 scopeid 0x0<global> inet6 fe80::453:8a33:4921:f92 prefixlen 64 scopeid 0x20<link> ether 4c:d9:8f:65:b4:ba txqueuelen 1000 (Ethernet) RX packets 10404346 bytes 10401367211 (9.6 GiB) RX errors 0 dropped 46142 overruns 0 frame 0 TX packets 3186746 bytes 284596535 (271.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 2.Start guest with qemu cmdline /usr/libexec/qemu-kvm \ -name 'avocado-vt-vm1' \ -sandbox on \ -machine q35,memory-backend=mem-machine_mem \ -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \ -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0 \ -nodefaults \ -device VGA,bus=pcie.0,addr=0x2 \ -m 30720 \ -object memory-backend-ram,size=30720M,id=mem-machine_mem \ -smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2 \ -cpu 'Cascadelake-Server',ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,rdctl-no=on,ibrs-all=on,skip-l1dfl-vmentry=on,mds-no=on,pschange-mc-no=on,tsx-ctrl=on,hle=off,rtm=off,kvm_pv_unhalt=on \ -chardev socket,wait=off,id=qmp_id_qmpmonitor1,server=on,path=/tmp/monitor-qmpmonitor1-20220601-053115-5q30Md4A \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,wait=off,id=qmp_id_catch_monitor,server=on,path=/tmp/monitor-catch_monitor-20220601-053115-5q30Md4A \ -mon chardev=qmp_id_catch_monitor,mode=control \ -device pvpanic,ioport=0x505,id=idtsFTaW \ -chardev socket,wait=off,id=chardev_serial0,server=on,path=/tmp/serial-serial0-20220601-053115-5q30Md44 \ -device isa-serial,id=serial0,chardev=chardev_serial0 \ -chardev socket,id=seabioslog_id_20220601-053115-5q30Md44,path=/tmp/seabios-20220601-053115-5q30Md44,server=on,wait=off \ -device isa-debugcon,chardev=seabioslog_id_20220601-053115-5q30Md44,iobase=0x402 \ -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \ -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \ -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie-root-port-2,addr=0x0 \ -blockdev node-name=file_image1,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/system,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_image1,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \ -device scsi-hd,id=image1,drive=drive_image1,write-cache=on \ -blockdev node-name=file_data1,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/data1,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_data1,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_data1 \ -device scsi-hd,id=data1,drive=drive_data1,write-cache=on \ -blockdev node-name=file_data2,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/data2,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_data2,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_data2 \ -device scsi-hd,id=data2,drive=drive_data2,write-cache=on \ -blockdev node-name=file_data3,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/data3,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_data3,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_data3 \ -device scsi-hd,id=data3,drive=drive_data3,write-cache=on \ -blockdev node-name=file_data4,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/data4,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_data4,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_data4 \ -device scsi-hd,id=data4,drive=drive_data4,write-cache=on \ -blockdev node-name=file_data5,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/data5,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_data5,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_data5 \ -device scsi-hd,id=data5,drive=drive_data5,write-cache=on \ -blockdev node-name=file_data6,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/data6,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_data6,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_data6 \ -device scsi-hd,id=data6,drive=drive_data6,write-cache=on \ -blockdev node-name=file_data7,driver=host_device,auto-read-only=on,discard=unmap,aio=threads,filename=/dev/test/data7,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_data7,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_data7 \ -device scsi-hd,id=data7,drive=drive_data7,write-cache=on \ -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \ -device virtio-net-pci,mac=9a:a9:2a:81:61:2c,id=idBtjxwg,netdev=idq30r4N,bus=pcie-root-port-3,addr=0x0 \ -netdev tap,id=idq30r4N,vhost=on \ -vnc :0 \ -rtc base=utc,clock=host,driftfix=slew \ -boot menu=off,order=cdn,once=c,strict=off \ -enable-kvm \ -device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5 \ -monitor stdio 3. Check host ip #ifconfig switch: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.73.199.205 netmask 255.255.252.0 broadcast 10.73.199.255 inet6 2620:52:0:49c4:a79b:ccbe:c89e:b188 prefixlen 64 scopeid 0x0<global> inet6 fe80::453:8a33:4921:f92 prefixlen 64 scopeid 0x20<link> ether 02:00:9b:82:9c:5b txqueuelen 1000 (Ethernet) RX packets 10408914 bytes 10401717970 (9.6 GiB) RX errors 0 dropped 46169 overruns 0 frame 0 TX packets 3186938 bytes 284628167 (271.4 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 Note: If not reproduce this issue, quit vm after step3, restart vm then check host ip. After times of repeate, the bug will occure. Actual results: Host ip changed after times of start vm. Expected results: Host IP not changed after start vms Additional info: