Merge lp://qastaging/~gandelman-a/nova/lp839796 into lp://qastaging/~hudson-openstack/nova/trunk
Status: | Needs review |
---|---|
Proposed branch: | lp://qastaging/~gandelman-a/nova/lp839796 |
Merge into: | lp://qastaging/~hudson-openstack/nova/trunk |
Diff against target: |
23 lines (+13/-0) 1 file modified
nova/flags.py (+13/-0) |
To merge this branch: | bzr merge lp://qastaging/~gandelman-a/nova/lp839796 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nova Core security contacts | Pending | ||
Review via email:
|
Description of the change
It seems the original 'flagfile' specified in ARGV gets recursively loaded when glfags parses argv for the first time. We can do it once before and tack on any optional flagfiles only when they exist.
One drawback to note is that optional_flagfiles does not load recursivey from nested flagfiles like '--flagfiles'
Unmerged revisions
- 1611. By Adam Gandelman
-
nova/flags.py: Use '--optional_
flagfile' to specificy a flagfile that will be used
only if it exists.Pre-parse flagfiles from FlagValues.__call_ prior to the base class, so we can check
existence of any optional_flagfiles. If the file exists, append it to argv as a
regular '--flagfile' before gflags.FlagVlues does its parsing/loading. The
original '--optional_flagfile' is then later ignored as an unknown argument
its not declared anywhere.