Bug 1501047 - Upgrading node brings back deleted network configuration files
Summary: Upgrading node brings back deleted network configuration files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node-ng
Version: 4.1.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.1.8
: ---
Assignee: Ryan Barry
QA Contact: Huijuan Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-12 05:59 UTC by Germano Veit Michel
Modified: 2021-03-11 17:34 UTC (History)
15 users (show)

Fixed In Version: imgbased-0.9.51
Doc Type: Bug Fix
Doc Text:
Previously, RHVH migrated all files in /etc to /etc on new layers, with an attempt to catch files which were incorrectly removed. Network configuration files which were deleted in an intermediate layer were erroneously copied from older layers. Now, network configuration files are no longer remediated, so deleted network files no longer reappear.
Clone Of:
Environment:
Last Closed: 2017-12-12 09:24:45 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3213461 0 None None None 2017-10-12 06:13:56 UTC
Red Hat Product Errata RHBA-2017:3431 0 normal SHIPPED_LIVE redhat-virtualization-host bug fix, and enhancement update for RHV 4.1.8 2017-12-12 14:17:28 UTC
oVirt gerrit 84272 0 master MERGED osupdater: don't remediate network configuration files 2017-11-16 20:49:01 UTC
oVirt gerrit 84279 0 ovirt-4.2 MERGED osupdater: don't remediate network configuration files 2017-11-16 20:49:15 UTC
oVirt gerrit 84280 0 ovirt-4.1 MERGED osupdater: don't remediate network configuration files 2017-11-16 20:49:47 UTC

Description Germano Veit Michel 2017-10-12 05:59:08 UTC
Description of problem:

Upgrading RHV-H restores some ifcfg files that have been previously removed. It mixes current with previous network configuration in the host.

See the details and reproduction:

1. Install RHV-H host with some previous version, 2 versions back.

# nodectl info | grep current
current_layer: rhvh-4.1-0.20170706.0+1

2. Add the host to the engine, configure 1 extra network (network-2, using vlan 50) via Hosts->Networks->Setup Host Networks

# ll /etc/sysconfig/network-scripts/ifcfg-*
-rw-rw-r--. 1 root root 134 Oct 12 14:11 /etc/sysconfig/network-scripts/ifcfg-eth0
-rw-rw-r--. 1 root root 146 Oct 12 14:12 /etc/sysconfig/network-scripts/ifcfg-eth0.50
-rw-r--r--. 1 root root 254 Sep 12  2016 /etc/sysconfig/network-scripts/ifcfg-lo
-rw-rw-r--. 1 root root 150 Oct 12 14:12 /etc/sysconfig/network-scripts/ifcfg-network-2
-rw-rw-r--. 1 root root 201 Oct 12 14:11 /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt

# ll /var/lib/vdsm/persistence/netconf/nets/
total 8
-rw-r--r--. 1 root root 224 Oct 12 14:12 network-2
-rw-r--r--. 1 root root 257 Oct 12 14:12 ovirtmgmt

2. Upgrade host, but not to very lastest (we need one more upgrade)

# yum install redhat-virtualization-host-image-update-4.1-20170808.0.el7_4
# reboot
# nodectl info | grep current
current_layer: rhvh-4.1-0.20170808.0+1

3. Remove the extra network from the host via Hosts->Networks->Setup Host Networks

# ll /etc/sysconfig/network-scripts/ifcfg-*
-rw-rw-r--. 1 root root 134 Oct 12 14:11 /etc/sysconfig/network-scripts/ifcfg-eth0
-rw-r--r--. 1 root root 254 May  3 20:17 /etc/sysconfig/network-scripts/ifcfg-lo
-rw-rw-r--. 1 root root 201 Oct 12 14:11 /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt

# ll /var/lib/vdsm/persistence/netconf/nets/
total 4
-rw-r--r--. 1 root root 257 Oct 12 15:15 ovirtmgmt

4. Upgrade host to very latest, then check networks. See who is back from the dead:

# nodectl info | grep current
current_layer: rhvh-4.1-0.20171002.0+1

# ll /etc/sysconfig/network-scripts/ifcfg-*
-rw-rw-r--. 1 root root 134 Oct 12 14:11 /etc/sysconfig/network-scripts/ifcfg-eth0
-rw-rw-r--. 1 root root 146 Oct 12 15:33 /etc/sysconfig/network-scripts/ifcfg-eth0.50
-rw-r--r--. 1 root root 254 May  3 20:17 /etc/sysconfig/network-scripts/ifcfg-lo
-rw-rw-r--. 1 root root 150 Oct 12 15:33 /etc/sysconfig/network-scripts/ifcfg-network-2
-rw-rw-r--. 1 root root 201 Oct 12 14:11 /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt

But persitence looks fine:

# ll /var/lib/vdsm/persistence/netconf/nets/
total 4
-rw-r--r--. 1 root root 257 Oct 12 15:15 ovirtmgmt

Still, this is enough to break host network config on reboot, it case it brings back some conflicting configurations.

This is the weird part (to me). Why it copies these files from the rhvh-4.1-0.20170808 if they should not even exist there as per step 3?

[DEBUG] (migrate_etc) Migrating etc (<LV 'rhvh_gsslab-24-125/rhvh-4.1-0.20170808.0+1' /> -> <LV 'rhvh_gsslab-24-125/rhvh-4.1-0.20171002.0+1' />)
[DEBUG] (migrate_etc) Calling binary: (['mount', u'/dev/rhvh_gsslab-24-125/rhvh-4.1-0.20171002.0+1', u'/tmp/mnt.qdl2d'],) {}
[DEBUG] (migrate_etc) Calling binary: (['mount', u'/dev/rhvh_gsslab-24-125/rhvh-4.1-0.20170808.0+1', u'/tmp/mnt.kG22U'],) {}

[DEBUG] (migrate_etc) Calling: (['cp', '-a', '-r', u'/tmp/mnt.kG22U///etc/sysconfig/network-scripts/ifcfg-eth0.50', u'/tmp/mnt.qdl2d///etc/sysconfig/network-scripts/ifcfg-eth0.50']
[DEBUG] (migrate_etc) Calling: (['cp', '-a', '-r', u'/tmp/mnt.kG22U///etc/sysconfig/network-scripts/ifcfg-network-2', u'/tmp/mnt.qdl2d///etc/sysconfig/network-scripts/ifcfg-network-2'],)

Version-Release number of selected component (if applicable):
redhat-virtualization-host-image-update-4.1-20171002

How reproducible:
100%, as above.

Comment 1 Ryan Barry 2017-10-12 10:29:51 UTC
I would guess this is a side effect of syncing /etc.

There was a similar bug about systemd services.

Comment 4 Huijuan Zhao 2017-11-09 12:45:34 UTC
QE can reproduce this issue.

Test versions:
Build1: rhvh-4.1-0.20170706.0
Build2: rhvh-4.1-0.20170808.0
Build3: rhvh-4.1-0.20171002.0

Test steps:
Same as comment 0

Actual results:
Same as comment 0

Comment 5 Huijuan Zhao 2017-12-06 10:09:59 UTC
Test versions:
Build1: rhvh-4.1-0.20170706.0
Build2: rhvh-4.1-0.20170808.0
Build3: rhvh-4.1-0.20171205.0

Test steps:
Same as comment 0

Test results:
After step4, same as step 3, deleted network configuration files are not back.

So this issue is fixed in rhvh-4.1-0.20171205.0, I will change the status to VERIFIED when the status is ON_QA

Comment 6 cshao 2017-12-08 01:38:41 UTC
Ryan,

Could you please help to change the bug to ON_QA status? then QE will verify it directly.

Thanks.

Comment 7 cshao 2017-12-08 01:43:54 UTC
Thanks Ryan for quick response, verify this bug according  #c5.

Comment 10 errata-xmlrpc 2017-12-12 09:24:45 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-2017:3431


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