Bug 1279824

Summary: Vdsm keeps reporting dhcp due to existing lease right after setting to static
Product: Red Hat Enterprise Virtualization Manager Reporter: Dan Kenigsberg <danken>
Component: vdsmAssignee: Ondřej Svoboda <osvoboda>
Status: CLOSED ERRATA QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: 3.5.6CC: bazulay, bugs, danken, ecohen, eedri, elevi, gklein, lsurette, mburman, mgoldboi, myakove, osvoboda, rbalakri, ycui, yeylon, ylavi
Target Milestone: ovirt-3.5.7Keywords: Regression, ZStream
Target Release: 3.5.7   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1184497 Environment:
Last Closed: 2016-01-12 20:34:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1184497    
Bug Blocks:    
Attachments:
Description Flags
Logs none

Description Dan Kenigsberg 2015-11-10 12:11:12 UTC
Apparently, this bug exists on 3.5.6 as well.

+++ This bug was initially created as a clone of Bug #1184497 +++

Description of problem:
SetupNetworks> Can't change 'ovirtmgmt' from dhcp to static ip.
When trying to change 'ovirtmgmt' from dhcp to static ip via SN, i get in the event log:
Network changes were saved on host orchid-vds1.qa.lab.tlv.redhat.com

But, when checking -
cat /etc/sysconfig/network-scripts/ifcfg-ovirtmgmt
BOOTPROTO=dhcp

And in SN ovirtmgmt stays with dhcp, even if the event log shows that network changes were saved on host.

Version-Release number of selected component (if applicable):
3.6.0-0.0.master.20150105124153.git669ddc1.el6
vdsm-4.17.0-304.gitf191666.el7.x86_64

How reproducible:
100

Steps to Reproduce:
1. Hosts>SN> edit 'ovirtmgmt'(with pencil)
2. Change the Boot Protocol from dhcp to static ip
3. Approve operation

Actual results:
'ovirtmgmt' stays with dhcp BootProto, in SN and in ifcfg-ovirtmgmt

Expected results:
Should succeed to change 'ovirtmgmt' from dhcp to static ip

--- Additional comment from Michael Burman on 2015-10-11 17:08:04 IDT ---

On 3.6 if changing manually the bootproto, vdsm will not recognize the change(not reading from cfg).
It means this bug can be verified.

Changing network state from dhcp to static ip and vise versa via setup networks working now as expected. vdsCaps and ifcfg-* files reporting as expected.

Tested and verified on - 3.6.0-0.18.el6 with vdsm-4.17.8-1.el7ev.noarch

--- Additional comment from Ondřej Svoboda on 2015-10-11 17:18:59 IDT ---

Thank you, Michael!

The logic we adapted in the end doesn't watch dhclient instances as that would be probably too intrusive for a backport. Instead, the currently active ("running") network configuration is queried and reported also for network devices that represent a given network (most often, bridges).

There is some refactoring work to be merged later, but the behaviour will stay the same.

Inspection of running dhclient instances' cmdlines were actually the first idea I had more than year and half ago. For 4.0 it will be reconsidered.

--- Additional comment from Sandro Bonazzola on 2015-11-04 14:58:59 IST ---

oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.

Comment 1 Red Hat Bugzilla Rules Engine 2015-11-10 12:11:16 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Michael Burman 2015-11-10 12:25:32 UTC
rhevm-3.5.6.2-0.1.el6ev.noarch

Changing the bootproto of the management network from DHCP >> static ip(via UI) and caps report:

'rhevm': {'addr': '10.35.128.22',
                              'bootproto4': 'dhcp',
                              'bridged': True,
                              'cfg': {'BOOTPROTO': 'none',
ifcfg report bootproto=none
UI report static ip.

- It's a bit different from the original report on 3.6.z ^^

Comment 3 Michael Burman 2015-11-11 06:09:31 UTC
Created attachment 1092586 [details]
Logs

Comment 5 Yaniv Kaul 2015-12-03 14:49:15 UTC
Dan, why is this bug still on POST?

Comment 6 Dan Kenigsberg 2015-12-04 07:30:25 UTC
I suppose that Ondra did not notice yet that his ovirt-3.5.7 patch was merged 3 days ago.

Comment 7 Michael Burman 2015-12-22 13:00:49 UTC
Verified on - 3.5.7-0.1.el6ev and vdsm-4.16.31-1.el7ev.x86_64

Comment 9 errata-xmlrpc 2016-01-12 20:34:49 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://rhn.redhat.com/errata/RHBA-2016-0034.html