The flag is actually is defined twice. I'm not sure why it is redefined in vmwareapi_net.py. I'm not sure if this is a naming conflict or the author was simply trying to change the default value of the flag. In any case, here is a possible fix: === modified file 'nova/network/vmwareapi_net.py' --- nova/network/vmwareapi_net.py 2011-05-11 19:24:01 +0000 +++ nova/network/vmwareapi_net.py 2011-05-25 18:13:39 +0000 @@ -30,9 +30,7 @@ FLAGS = flags.FLAGS -flags.DEFINE_string('vlan_interface', 'vmnic0', - 'Physical network adapter name in VMware ESX host for ' - 'vlan networking') +FLAGS['vlan_interface'].SetDefault('vmnic0') def ensure_vlan_bridge(vlan_num, bridge, net_attrs=None): Vish On May 25, 2011, at 8:51 AM, Edouard Thuleau wrote: > I try again with nova-compute rev1108 but the bug persists. > > -- > You received this bug notification because you are a member of Nova Bug > Team, which is subscribed to OpenStack Compute (nova). > https://bugs.launchpad.net/bugs/787657 > > Title: > VMware vlan_interface flag defined txice > > Status in OpenStack Compute (Nova): > Triaged > > Bug description: > Hi, > > I use Nova (bzr1101) with an ESXi 4.1 hypervisor. > I set the flag 'vlan_interface' inm y configuration file but Nova didn't start and log says : > > > 2011-05-24 18:10:38,728 ERROR nova [-] in Service.create() > (nova): TRACE: Traceback (most recent call last): > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 267, in serve > (nova): TRACE: services = [Service.create()] > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 164, in create > (nova): TRACE: report_interval, periodic_interval) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/service.py", line 69, in __init__ > (nova): TRACE: self.manager = manager_class(host=self.host, *args, **kwargs) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 132, in __init__ > (nova): TRACE: self.network_manager = utils.import_object(FLAGS.network_manager) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/utils.py", line 73, in import_object > (nova): TRACE: return cls() > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 123, in __init__ > (nova): TRACE: self.driver = utils.import_object(network_driver) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/utils.py", line 69, in import_object > (nova): TRACE: __import__(import_str) > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/network/vmwareapi_net.py", line 34, in > (nova): TRACE: 'Physical network adapter name in VMware ESX host for ' > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 215, in _wrapped > (nova): TRACE: func(*args, **kw) > (nova): TRACE: File "/usr/lib/python2.6/dist-packages/gflags.py", line 1808, in DEFINE_string > (nova): TRACE: DEFINE(parser, name, default, help, flag_values, serializer, **args) > (nova): TRACE: File "/usr/lib/python2.6/dist-packages/gflags.py", line 1701, in DEFINE > (nova): TRACE: flag_values) > (nova): TRACE: File "/usr/lib/python2.6/dist-packages/gflags.py", line 1716, in DEFINE_flag > (nova): TRACE: fv[flag.name] = flag > (nova): TRACE: File "/usr/lib/pymodules/python2.6/nova/flags.py", line 131, in __setitem__ > (nova): TRACE: gflags.FlagValues.__setitem__(self, name, flag) > (nova): TRACE: File "/usr/lib/python2.6/dist-packages/gflags.py", line 791, in __setitem__ > (nova): TRACE: raise DuplicateFlagError(name, self) > (nova): TRACE: DuplicateFlagError: The flag 'vlan_interface' is defined twice. First from nova.network.manager, Second from nova.network.vmwareapi_net > (nova): TRACE: > 2011-05-24 18:10:38,750 CRITICAL nova [-] The flag 'vlan_interface' is defined twice. First from nova.network.manager, Second from nova.network.vmwareapi_net > > If I comment lines in source file 'nova/network/vmwareapi_net.py', it works correctly: > flags.DEFINE_string('vlan_interface', 'vmnic0', > 'Physical network adapter name in VMware ESX host for ' > 'vlan networking')