generate_sample.sh does not generate sample configuration for modules using "_" builtin.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Undecided
|
Ann Taraday |
Bug Description
If we use generate_sample.sh for modules that contains "_" builtin and has configuration declaration, it won't gererate samlpe configuration for such module.
generate_sample.sh calls extract_opts.py, so the problem is in the extract_opts.py.
For example,
akamyshnikova@
#######
# cinder.conf sample #
#######
[DEFAULT]
# Total option count: 0
akamyshnikova@
If we use debug for this command we see that
/opt/stack/
-> mod_obj = importutils.
(Pdb) n
NameError: "name '_' is not defined"
So, if we add to extract_opts.py
import __builtin__
setattr(
everything works correctly:
akamyshnikova@
#######
# cinder.conf sample #
#######
[DEFAULT]
#
# Options defined in cinder.
#
# Service to use for backups. (string value)
#backup_
# Total option count: 1
Changed in cinder: | |
assignee: | nobody → Ann Kamyshnikova (akamyshnikova) |
status: | New → In Progress |
Changed in cinder: | |
milestone: | none → havana-1 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | havana-1 → 2013.2 |
Reviewed: https:/ /review. openstack. org/30235 github. com/openstack/ cinder/ commit/ 9cdccf36c6d8a07 cfdc3ee0e974736 951317005b
Committed: http://
Submitter: Jenkins
Branch: master
commit 9cdccf36c6d8a07 cfdc3ee0e974736 951317005b
Author: Ann Kamyshnikova <email address hidden>
Date: Thu May 23 13:33:30 2013 +0400
Add "_" builtin method for config generation
extract_opts.py fails to generate config without this
bug 1183731
Change-Id: Icf3b45d5d72626 07336f5d5e7a0a1 4b0dee9741d