[openstack-dev] [oslo.config] Sample generation error

Zhongyue Luo zhongyue.nah at intel.com
Mon Oct 28 12:49:40 UTC 2013


Hi Endre,

The "demon" option is being registered inside the function
'add_common_opts' hence the generator script cannot find the group it is
being registered in.

https://github.com/stackforge/libra/blob/master/libra/common/options.py#L100

The generator script has been relying on the global config object where all
options were registered in global scope.

c.f) https://github.com/openstack/nova/blob/master/nova/cells/opts.py#L61

This is an obsolete convention which the generator should not rely on as
all projects except nova are showing the same error message you have pasted.

We will have a chat about this topic at the summit.

http://summit.openstack.org/cfp/details/258

Thanks.




On Mon, Oct 28, 2013 at 7:13 PM, Endre Karlson <endre.karlson at gmail.com>wrote:

> https://review.openstack.org/54101 < is a change to introduce sample
> generation for Libra LBaaS.
>
> I run the command as: "./tools/config/generate_sample.sh -b ./ -p libra -o
> etc"
>
> I keep getting:
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
>     "__main__", fname, loader, pkg_name)
>   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
>     exec code in run_globals
>   File
> "/home/karlsone/projects/libra/libra/openstack/common/config/generator.py",
> line 268, in <module>
>     main()
>   File
> "/home/karlsone/projects/libra/libra/openstack/common/config/generator.py",
> line 265, in main
>     generate(sys.argv[1:])
>   File
> "/home/karlsone/projects/libra/libra/openstack/common/config/generator.py",
> line 99, in generate
>     for group, opts in _list_opts(mod_obj):
>   File
> "/home/karlsone/projects/libra/libra/openstack/common/config/generator.py",
> line 163, in _list_opts
>     ret.setdefault(_guess_groups(opt, obj), []).append(opt)
>   File
> "/home/karlsone/projects/libra/libra/openstack/common/config/generator.py",
> line 143, in _guess_groups
>     % opt.name
> RuntimeError: Unable to find group for option daemon, maybe it's defined
> twice in the same group?
>
> I don't get it why it's wrong?
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>


-- 
*Intel SSG/STOD/DCST/CIT*
880 Zixing Road, Zizhu Science Park, Minhang District, 200241, Shanghai,
China
+862161166500
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131028/5b197e77/attachment.html>


More information about the OpenStack-dev mailing list