Hide Forgot
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:
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():
(In reply to comment #1) > Would this solve the issue? Yes, repeated the same scenario with the patch, problem solved.
setupNetworks is working pretty well in oVirt-3.1.