[vdsm] configNetwork issue
Hi, I'm trying to create a bridge adding as config bootproto='dhcp' but I've the following error: import sys sys.path.append('/usr/share/vdsm/') import configNetwork configNetwork.addNetwork(network='engine', nics=['em1'], bootproto='dhcp') TypeError: objectivizeNetwork() got multiple values for keyword argument 'bootproto' seems like objectivizeNetwork already take bootproto from **opts and fails. -- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com ___ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
Re: [vdsm] configNetwork issue
- Original Message - From: Sandro Bonazzola sbona...@redhat.com To: vdsm-devel@lists.fedorahosted.org Sent: Thursday, June 6, 2013 5:26:14 PM Subject: [vdsm] configNetwork issue Hi, I'm trying to c reate a bridge adding as config bootproto ='dhcp' but I've the following error: import sys sys.path.append('/usr/share/vdsm/') import configNetwork configNetwork.addNetwork(network='engine', nics=['em1'], bootproto='dhcp') TypeError: objectivizeNetwork() got multiple values for keyword argument 'bootproto' seems like objectivizeNetwork already take boo tproto from **opts and fails. Hi! I think you should follow the ovirt-host-deploy bridge.py, and use addNetwork utility: ['/usr/share/vdsm/addNetwork', 'ovirtmgmt', '', '', u'eth0', 'BOOTPROTO=dhcp', 'ONBOOT=yes', 'blockingdhcp=true'] ___ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
Re: [vdsm] configNetwork issue
Il 06/06/2013 16:29, Alon Bar-Lev ha scritto: /usr/share/vdsm/addNetwork', 'ovirtmgmt', '', '', u'eth0', 'BOOTPROTO=dhcp', 'ONBOOT=yes', 'blockingdhcp=true'] # /usr/share/vdsm/addNetwork ovirtmgmt '' '' em1 BOOTPROTO=dhcp ONBOOT=yes blockingdhcp=true WARNING:root:options BOOTPROTO is deprecated. Use bootproto instead WARNING:root:options ONBOOT is deprecated. Use onboot instead INFO:root:Adding network ovirtmgmt with vlan=, bonding=, nics=['em1'], bondingOptions=None, mtu=None, bridged=True, options={'bootproto': 'dhcp', 'blockingdhcp': 'true', 'onboot': 'yes'} Traceback (most recent call last): File /usr/lib64/python2.7/runpy.py, line 162, in _run_module_as_main __main__, fname, loader, pkg_name) File /usr/lib64/python2.7/runpy.py, line 72, in _run_code exec code in run_globals File /usr/share/vdsm/configNetwork.py, line 664, in module main() File /usr/share/vdsm/configNetwork.py, line 633, in main addNetwork(bridge, **kwargs) File /usr/share/vdsm/configNetwork.py, line 198, in addNetwork configurator, **options) TypeError: objectivizeNetwork() got multiple values for keyword argument 'bootproto' -- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com ___ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
Re: [vdsm] configNetwork issue
- Original Message - | From: Sandro Bonazzola sbona...@redhat.com | To: Alon Bar-Lev alo...@redhat.com | Cc: vdsm-devel@lists.fedorahosted.org | Sent: Thursday, June 6, 2013 4:38:41 PM | Subject: Re: [vdsm] configNetwork issue | | Il 06/06/2013 16:29, Alon Bar-Lev ha scritto: | /usr/share/vdsm/addNetwork', 'ovirtmgmt', '', '', u'eth0', | 'BOOTPROTO=dhcp', 'ONBOOT=yes', 'blockingdhcp=true'] | | # /usr/share/vdsm/addNetwork ovirtmgmt '' '' em1 BOOTPROTO=dhcp | ONBOOT=yes blockingdhcp=true | WARNING:root:options BOOTPROTO is deprecated. Use bootproto instead | WARNING:root:options ONBOOT is deprecated. Use onboot instead | INFO:root:Adding network ovirtmgmt with vlan=, bonding=, nics=['em1'], | bondingOptions=None, mtu=None, bridged=True, options={'bootproto': | 'dhcp', 'blockingdhcp': 'true', 'onboot': 'yes'} | Traceback (most recent call last): | File /usr/lib64/python2.7/runpy.py, line 162, in _run_module_as_main | __main__, fname, loader, pkg_name) | File /usr/lib64/python2.7/runpy.py, line 72, in _run_code | exec code in run_globals | File /usr/share/vdsm/configNetwork.py, line 664, in module | main() | File /usr/share/vdsm/configNetwork.py, line 633, in main | addNetwork(bridge, **kwargs) | File /usr/share/vdsm/configNetwork.py, line 198, in addNetwork | configurator, **options) | TypeError: objectivizeNetwork() got multiple values for keyword argument | 'bootproto' Hi Sandro, a very dirty and quick fix may be the following one. Inside configNetwork reach the addNetwork function and before the call to objectivizeNetwork: bootproto = options.get('bootproto') if bootproto: del options['bootproto'] netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding, bondingOptions, nics, mtu, ipaddr, netmask, gateway, bootproto, _netinfo, configurator, **options) Giuseppe | | -- | Sandro Bonazzola | Better technology. Faster innovation. Powered by community collaboration. | See how it works at redhat.com | | ___ | vdsm-devel mailing list | vdsm-devel@lists.fedorahosted.org | https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel | ___ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel
Re: [vdsm] configNetwork issue
Il 06/06/2013 17:10, Giuseppe Vallarelli ha scritto: - Original Message - | From: Sandro Bonazzola sbona...@redhat.com | To: Alon Bar-Lev alo...@redhat.com | Cc: vdsm-devel@lists.fedorahosted.org | Sent: Thursday, June 6, 2013 4:38:41 PM | Subject: Re: [vdsm] configNetwork issue | | Il 06/06/2013 16:29, Alon Bar-Lev ha scritto: | /usr/share/vdsm/addNetwork', 'ovirtmgmt', '', '', u'eth0', | 'BOOTPROTO=dhcp', 'ONBOOT=yes', 'blockingdhcp=true'] | | # /usr/share/vdsm/addNetwork ovirtmgmt '' '' em1 BOOTPROTO=dhcp | ONBOOT=yes blockingdhcp=true | WARNING:root:options BOOTPROTO is deprecated. Use bootproto instead | WARNING:root:options ONBOOT is deprecated. Use onboot instead | INFO:root:Adding network ovirtmgmt with vlan=, bonding=, nics=['em1'], | bondingOptions=None, mtu=None, bridged=True, options={'bootproto': | 'dhcp', 'blockingdhcp': 'true', 'onboot': 'yes'} | Traceback (most recent call last): | File /usr/lib64/python2.7/runpy.py, line 162, in _run_module_as_main | __main__, fname, loader, pkg_name) | File /usr/lib64/python2.7/runpy.py, line 72, in _run_code | exec code in run_globals | File /usr/share/vdsm/configNetwork.py, line 664, in module | main() | File /usr/share/vdsm/configNetwork.py, line 633, in main | addNetwork(bridge, **kwargs) | File /usr/share/vdsm/configNetwork.py, line 198, in addNetwork | configurator, **options) | TypeError: objectivizeNetwork() got multiple values for keyword argument | 'bootproto' Hi Sandro, a very dirty and quick fix may be the following one. Inside configNetwork reach the addNetwork function and before the call to objectivizeNetwork: bootproto =options.get('bootproto') if bootproto: del options['bootproto'] netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding, bondingOptions, nics, mtu, ipaddr, netmask, gateway, bootproto, _netinfo, configurator, **options) Giuseppe Thanks Giuseppe, that seems to fix the issue also if I don't really like using del as solution. This however is a workaround that fix it for me. | | -- | Sandro Bonazzola | Better technology. Faster innovation. Powered by community collaboration. | See how it works at redhat.com | | ___ | vdsm-devel mailing list | vdsm-devel@lists.fedorahosted.org | https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel | -- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com ___ vdsm-devel mailing list vdsm-devel@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-devel