Bug 787710 - [vdsm][setupNetworks] setupNetworks fails to attach network to an interface.
Summary: [vdsm][setupNetworks] setupNetworks fails to attach network to an interface.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Dan Kenigsberg
QA Contact:
URL:
Whiteboard: network
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-06 15:22 UTC by David Naori
Modified: 2012-10-09 19:56 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-09 19:56:25 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description David Naori 2012-02-06 15:22:26 UTC
Description of problem:
vdsm fails to attach network to an interface with the following error:

vdsm log:
ConfigNetworkError?: (24, "Setup attached more than one network to nic eth1, some of which aren't vlans")
while actually its configured to attach only one [nonvlan] network, and no other networks are already attached.
Thread-35999::DEBUG::2012-02-06 16:12:02,135::clientIF::76::vds::(wrapper) [10.35.97.87]::call setupNetworks with ({'ovirtmgmt': {'nic': 'eth0', 'BOOTPROTO': 'dhcp'}, 'david': {'nic': 'eth1'}}, {'bond4': {'remove': 'true'}, 'bond0': {'remove': 'true'}, 'bond1': {'remove': 'true'}, 'bond2': {'remove': 'true'}, 'bond3': {'remove': 'true'}}, {'connectivityCheck': 'false', 'connectivityTimeout': '0'}) {}
MainProcess?|Thread-35999::INFO::2012-02-06 16:12:02,151::configNetwork::809::setupNetworks::(setupNetworks) Setting up network
MainProcess?|Thread-35999::DEBUG::2012-02-06 16:12:02,151::configNetwork::810::setupNetworks::(setupNetworks) Setting up network according to configuration: networks:{'ovirtmgmt': {'nic': 'eth0', 'BOOTPROTO': 'dhcp'}, 'david': {'nic': 'eth1'}}, bondings:{'bond4': {'remove': 'true'}, 'bond0': {'remove': 'true'}, 'bond1': {'remove': 'true'}, 'bond2': {'remove': 'true'}, 'bond3': {'remove': 'true'}}, options:{'connectivityCheck': 'false', 'connectivityTimeout': '0'}
MainProcess?|Thread-35999::DEBUG::2012-02-06 16:12:02,152::configNetwork::814::root::(setupNetworks) Validating configuration
MainProcess?|Thread-35999::ERROR::2012-02-06 16:12:02,164::configNetwork::856::setupNetworks::(setupNetworks) (24, "Setup attached more than one network to nic eth1, some of which aren't vlans")
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 745, in _validateNetworkSetup
"Setup attached more than one network to nic %s, some of which aren't vlans"%(nic))
ConfigNetworkError?: (24, "Setup attached more than one network to nic eth1, some of which aren't vlans")
MainProcess?|Thread-35999::ERROR::2012-02-06 16:12:02,191::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 745, in _validateNetworkSetup
"Setup attached more than one network to nic %s, some of which aren't vlans"%(nic))
ConfigNetworkError?: (24, "Setup attached more than one network to nic eth1, some of which aren't vlans")
Thread-35999::ERROR::2012-02-06 16:12:02,194::clientIF::1207::vds::(setupNetworks) Setup attached more than one network to nic eth1, some of which aren't vlans
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?: (24, "Setup attached more than one network to nic eth1, some of which aren't vlans")
Thread-35999::DEBUG::2012-02-06 16:12:02,215::clientIF::81::vds::(wrapper) return setupNetworks with {'status': {'message': "Setup attached more than one network to nic eth1, some of which aren't vlans", 'code': 24}}

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-02-06 16:25:21 UTC
Would this solve the issue?

diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index d2c1326..666becc 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -757,7 +757,8 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False):
 
     # Step 4: Verify Setup
     for nic, nicAttrs in nics.iteritems():
-        if nicAttrs['networks'] and nicAttrs['bonding']:
+        networks = nicAttrs['networks']
+        if networks and nicAttrs['bonding']:
             raise ConfigNetworkError(ne.ERR_USED_NIC, "Setup attached both network and bonding to nic %s"%(nic))
         if len(networks) > 1:
             for network, networkAttrs in networks.iteritems():

Comment 2 David Naori 2012-02-07 12:41:33 UTC
(In reply to comment #1)
> Would this solve the issue?

Yes, repeated the same scenario with the patch, problem solved.

Comment 3 Dan Kenigsberg 2012-10-09 19:56:25 UTC
setupNetworks is working pretty well in oVirt-3.1.


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