Hide Forgot
Description of problem: After do IP injection with Hyper-V Replication, check hypervkvpd service log and find "Error: [/etc/sysconfig/network-scripts/ifup-eth] Error adding address xxxx for eth0". When check ip address, find the network adapter has been configured with injected ip, and can ping successfully to other vm in the same network Version-Release number of selected component (if applicable): Host: Hyper-V 2016RTM, Gen1 kernel: 3.10.0-506.el7.x86_64 selinux-policy: 3.13.1-99.el7.noarch hyperv-daemons: 0-0.29.20160216git.el7.x86_64 How reproducible:100% Steps to Reproduce: 1. HostA is a Hyper-V Replication Server, will have replicated VM from other host, you should configure hostA by 'Hyper-V Settings' - ' Replication Configuration' -> Enable this computer as a Replica Server. Same config for Host B. 2. HostB has a VM 1)configure hostB by 'Hyper-V Settings' - 'Replication Configuration' -> Enable this computer as a Replica Server. 2)check the VM with hypervkvpd service start # service hypervkvpd status 3)configure the VM, right click, select "Enable Replication" - Before you Begin ->Next->Replica Server as Host A-> Next, view that sending Initial Replica progress showings. 4)you can see HostA with a replicated VM as the same on HostB 3. HostA, choose the replicated VM, set ip injection by editing 'Settings' - 'Network Adapter' - 'Failover TCP/IP', setting the IPv4/IPv6 address, subnet, gateway, DNS e.g. IPV4: 192.168.1.16 NETMASK: 255.255.255.0 GATEWAY: 192.168.1.1 DNS: 192.168.1.2 IPV6:2001::de45:1234:de00:9876 prifix len: 64 4. On hostB, turn off the VM, and right click the VM - 'Replication' - 'Planned Failover' 5. Check the VM hypervkvpd service on hostA after boot up by command # systemctl status hypervkvpd Actual results: After do IP injection with Hyper-V Replication, check hypervkvpd service # systemctl status hypervkvpd Active: active (running) ....................... hypervkvpd(637): Error: [/etc/sysconfig/network-scripts/ifup-eth] Error adding address 192.168.1.16 for eth0. Expected results: No error log display Additional info: 1. After do IP injection with Hyper-V Replication, check ip address and find the network adapter has been configured with injected ip, and can ping successfully to other vm in the same network 2. Check selinux state: # getenforce Enforcing 3. Gen2 vm aslo has the same issue.
I have tried hyperv-daemons-0-0.28.20160216git.el7.x86_64, hypervkvpd worked well and there is no error log, but found the error log in network service. The network adapter has been configured with injected ip, and can ping successfully to other vm in the same network # systemctl status network ...... Active: active (exited) ...... network[1240]: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Error adding address 192.168.1.15 for eth0. /etc/sysconfig/network-scripts/ifup-eth[1531]: Error adding address 192.168.1.15 for eth0.
(In reply to HuijingHei from comment #2) > I have tried hyperv-daemons-0-0.28.20160216git.el7.x86_64, hypervkvpd worked > well and there is no error log, but found the error log in network service. > The network adapter has been configured with injected ip, and can ping > successfully to other vm in the same network > > # systemctl status network > ...... > Active: active (exited) > ...... > network[1240]: ERROR : [/etc/sysconfig/network-scripts/ifup-eth] Error > adding address 192.168.1.15 for eth0. > /etc/sysconfig/network-scripts/ifup-eth[1531]: Error adding address > 192.168.1.15 for eth0. I'm not sure hyperv-daemons is related to this, perhaps a coincidence that newer version partially fixes the issue? Perhaps you change something else? Reading the code a little bit, hypervkvpd only writes a config file (i.e. ifcfg-eth0) and calls a script that calls ifdown and ifup. Configuration file looks ok to me. I'll debug a little more to see if I can find the root cause.
After some more debugging I found out that hypervkvpd was trying to set the IP right after the network service started -- and thus, already set the ip on the interface, hence returning RTNETLINK error. This is the first version of the patch that fixes the issue. I shall include support for IPv6 in the next iteration, probably this week. Feel free to test it. https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13772602
(In reply to Eduardo Otubo from comment #5) > After some more debugging I found out that hypervkvpd was trying to set the > IP right after the network service started -- and thus, already set the ip > on the interface, hence returning RTNETLINK error. > > This is the first version of the patch that fixes the issue. I shall include > support for IPv6 in the next iteration, probably this week. Feel free to > test it. > > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13772602 After do IP injection with Hyper-V Replication, check hypervkvpd service log does not have the error msg. # systemctl status hypervkvpd ... Aug 04 10:17:22 bootp-73-131-227.rhts.eng.pek2.redhat.com systemd[1]: Started Hyper-V KVP daemon. Aug 04 10:17:22 bootp-73-131-227.rhts.eng.pek2.redhat.com systemd[1]: Starting Hyper-V KVP daemon... Aug 04 10:17:22 bootp-73-131-227.rhts.eng.pek2.redhat.com KVP[1137]: KVP starting; pid is:1137 Aug 04 10:17:23 bootp-73-131-227.rhts.eng.pek2.redhat.com KVP[1137]: KVP LIC Version: 3.1 Aug 04 10:17:28 bootp-73-131-227.rhts.eng.pek2.redhat.com hypervkvpd[1137]: INFO : [ipv6_wait_tentative] Waiting for interface eth0 IPv6 address(es) to leave the 'tentative' state Aug 04 10:17:29 bootp-73-131-227.rhts.eng.pek2.redhat.com hypervkvpd[1137]: INFO : [ipv6_wait_tentative] Waiting for interface eth0 IPv6 address(es) to leave the 'tentative' state
Final version with ipv6 suppport is here: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=13787833 Please run for a round of tests, if no bug is detected I'll send to Vitaly for review and push.
This version only makes hypervkvpd start after networkmaneger, nothing else. It would a downstream-only fix. Please take a look: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=14717766 It should be enough to fix this. K.Y. himself told me the script is just a base for distros to adapt as they need, and not actually a general upstream solution.
The change is After=network.target in hypervkvpd.service, right? Systemd unit files are distro specific indeed, in case this works for all configurations (we may or may not have NetworkManager) and all scenarios (normal boot, enabling/disabling service host-side, ip failover,...) I'm all for it.
No this is not on purpose, looks like I forgot to update the snapver on the spec file. My appologies. This is the correct build: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=14854410 I'll send the patch to Vitaly right away.
(In reply to Eduardo Otubo from comment #18) > No this is not on purpose, looks like I forgot to update the snapver on the > spec file. My appologies. > > This is the correct build: > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=14854410 > > I'll send the patch to Vitaly right away. Thanks for the quick fix :-)
Verified with latest tree, kernel version 3.10.0-837.el7
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, 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-2018:1033