This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 787709

Summary: [vdsm][setupNetworks] changing boot protocol from dhcp to static fails due to bad validation (IP address is already in use).
Product: [Community] oVirt Reporter: David Naori <dnaori>
Component: vdsmAssignee: Dan Kenigsberg <danken>
Status: CLOSED DUPLICATE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: abaron, acathrow, bazulay, dnaori, iheim, mgoldboi, ykaul, zfridler
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-09 16:06:32 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description David Naori 2012-02-06 10:19:30 EST
Description of problem:

vdsm fails to change boot-protocol from dhcp to static -
bad validation (IP address is already in use).

MainProcess?|Thread-4503::DEBUG::2012-02-06 12:17:20,082::configNetwork::810::setupNetworks::(setupNetworks) Setting up network according to configuration: networks:{'ovirtmgmt': {'nic': 'eth0', 'netmask': '255.
255.255.0', 'ipaddr': '10.35.116.1', 'gateway': '10.35.116.254'}}, bondings:{'bond4': {'remove': 'true'}, 'bond0': {'remove': 'true'}, 'bond1': {'remove': 'true'}, 'bond2': {'remove': 'true'}, 'bond3': {'remove
': 'true'}}, options:{'connectivityCheck': 'false', 'connectivityTimeout': '0'}
MainProcess?|Thread-4503::DEBUG::2012-02-06 12:17:20,082::configNetwork::814::root::(setupNetworks) Validating configuration
MainProcess?|Thread-4503::ERROR::2012-02-06 12:17:20,108::configNetwork::856::setupNetworks::(setupNetworks) (22, 'IP address is already in use')
Traceback (most recent call last):
File "/usr/share/vdsm/configNetwork.py", line 815, in setupNetworks
_validateNetworkSetup(dict(networks), dict(bondings), explicitBonding=options.get('explicitBonding', False))
File "/usr/share/vdsm/configNetwork.py", line 637, in _validateNetworkSetup
validateIpAddress(ipaddr)
File "/usr/share/vdsm/configNetwork.py", line 315, in validateIpAddress
raise ConfigNetworkError?(ne.ERR_BAD_ADDR, "IP address is already in use")
ConfigNetworkError?: (22, 'IP address is already in use')
MainProcess?|Thread-4503::ERROR::2012-02-06 12:17:20,109::supervdsmServer::50::SuperVdsm?.ServerCallback::(wrapper) Error in setupNetworks
Traceback (most recent call last):
File "/usr/share/vdsm/supervdsmServer.py", line 48, in wrapper
return func(*args, kwargs)

File "/usr/share/vdsm/supervdsmServer.py", line 100, in setupNetworks
return configNetwork.setupNetworks(networks, bondings, options)

File "/usr/share/vdsm/configNetwork.py", line 815, in setupNetworks
_validateNetworkSetup(dict(networks), dict(bondings), explicitBonding=options.get('explicitBonding', False))
File "/usr/share/vdsm/configNetwork.py", line 637, in _validateNetworkSetup
validateIpAddress(ipaddr)
File "/usr/share/vdsm/configNetwork.py", line 315, in validateIpAddress
raise ConfigNetworkError?(ne.ERR_BAD_ADDR, "IP address is already in use")
ConfigNetworkError?: (22, 'IP address is already in use')
Thread-4503::ERROR::2012-02-06 12:17:20,110::clientIF::1207::vds::(setupNetworks) IP address is already in use
Traceback (most recent call last):
File "/usr/share/vdsm/clientIF.py", line 1205, in setupNetworks
supervdsm.getProxy().setupNetworks(networks, bondings, options)
File "/usr/share/vdsm/supervdsm.py", line 49, in call
return callMethod()
File "/usr/share/vdsm/supervdsm.py", line 47, in <lambda>
callMethod = lambda : getattr(self._supervdsmProxy._svdsm, self._funcName)(*args, kwargs)

File "<string>", line 2, in setupNetworks
File "/usr/lib64/python2.7/multiprocessing/managers.py", line 773, in _callmethod
raise convert_to_error(kind, result)
ConfigNetworkError?: (22, 'IP address is already in use')
Thread-4503::DEBUG::2012-02-06 12:17:20,111::clientIF::81::vds::(wrapper) return setupNetworks with {'status': {'message': 'IP address is already in use', 'code': 22}}

Version-Release number of selected component (if applicable):
vdsm-4.9.3.2-0.fc16.x86_64

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Dan Kenigsberg 2012-04-10 17:12:57 EDT
*** Bug 784546 has been marked as a duplicate of this bug. ***
Comment 2 Dan Kenigsberg 2012-10-09 16:06:32 EDT
The
  raise ConfigNetworkError?(ne.ERR_BAD_ADDR, "IP address is already in use")
has been sheepishly dropped in

commit 69057b2a0659fc8593f6294f4ca5332ce14ba993
Author: Igor Lvovsky <ilvovsky@redhat.com>
Date:   Thu Mar 15 18:19:10 2012 +0200

    BZ#787709 - Do not validate IP existence during setup network
    
    Change-Id: I958298798c06446011dfc8f5cee54db2c0667136
    Reviewed-on: http://gerrit.ovirt.org/2841

It would be nicer if we could reintroduce this in an EAFP style, to avoid the likes of https://bugzilla.redhat.com/show_bug.cgi?id=856737#c16 .

*** This bug has been marked as a duplicate of bug 856737 ***