RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1377550 - [Hyper-V][RHEL7.3]hypervkvpd service log display "[/etc/sysconfig/network-scripts/ifup-eth] Error adding address xxxx for eth0" after do IP injection with Hyper-V Replication
Summary: [Hyper-V][RHEL7.3]hypervkvpd service log display "[/etc/sysconfig/network-scr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: hyperv-daemons
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Eduardo Otubo
QA Contact: HuijingHei
URL:
Whiteboard:
Depends On:
Blocks: 1370511
TreeView+ depends on / blocked
 
Reported: 2016-09-20 05:47 UTC by HuijingHei
Modified: 2019-07-05 05:52 UTC (History)
15 users (show)

Fixed In Version: hyperv-daemons-0-0.31.20161211git.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 19:05:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1033 0 None None None 2018-04-10 19:05:51 UTC

Description HuijingHei 2016-09-20 05:47:04 UTC
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.

Comment 2 HuijingHei 2016-09-20 07:38:48 UTC
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.

Comment 4 Eduardo Otubo 2017-08-02 09:02:26 UTC
(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.

Comment 5 Eduardo Otubo 2017-08-03 09:00:25 UTC
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

Comment 6 HuijingHei 2017-08-04 02:44:49 UTC
(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

Comment 7 Eduardo Otubo 2017-08-07 09:06:33 UTC
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.

Comment 13 Eduardo Otubo 2017-12-08 14:08:46 UTC
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.

Comment 14 Vitaly Kuznetsov 2017-12-08 14:27:29 UTC
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.

Comment 18 Eduardo Otubo 2018-01-02 09:23:14 UTC
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.

Comment 19 Qiaowei Zheng 2018-01-02 09:30:47 UTC
(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 :-)

Comment 20 Qiaowei Zheng 2018-02-01 05:54:06 UTC
Verified with latest tree, kernel version 3.10.0-837.el7

Comment 23 errata-xmlrpc 2018-04-10 19:05:36 UTC
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


Note You need to log in before you can comment on or make changes to this bug.