Import of tempest.test has side-effect that config is parsed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Invalid
|
Undecided
|
Unassigned | ||
tempest |
Invalid
|
Undecided
|
Unassigned |
Bug Description
During implementation of tempest scenario for qos, it revealed that calling
from tempest import test
has a side-effect. It replaces oslo config object with a proxy object. Calling __getattr__ on this object has a side-effect of parsing the config which makes config object no longer capable of registering new CLI opts.
In [1]: from oslo_config import cfg
In [2]: from tempest import test
2016-06-14 10:21:46.063 7637 INFO tempest [-] Using tempest config file /etc/tempest/
^[[A^[[A
In [3]: cfg.CONF.
-------
ArgsAlreadyPars
<ipython-
----> 1 cfg.CONF.
/usr/lib/
2106 def __inner(self, *args, **kwargs):
2107 if kwargs.
-> 2108 result = f(self, *args, **kwargs)
2109 self.__
2110 return result
/usr/lib/
2290 """Register multiple CLI option schemas at once."""
2291 for opt in opts:
-> 2292 self.register_
2293
2294 def register_
/usr/lib/
2110 return result
2111 else:
-> 2112 return f(self, *args, **kwargs)
2113
2114 return __inner
/usr/lib/
2282 """
2283 if self._args is not None:
-> 2284 raise ArgsAlreadyPars
2285
2286 return self.register_
ArgsAlreadyPars
Changed in tempest: | |
status: | New → Confirmed |
Changed in tempest: | |
assignee: | nobody → Daniel Mellado (daniel-mellado) |
Changed in tempest: | |
assignee: | Daniel Mellado (daniel-mellado) → chandan kumar (chkumar246) |
Changed in tempest: | |
assignee: | chandan kumar (chkumar246) → nobody |
Changed in neutron: | |
status: | New → Invalid |
@jakub, I have tried the above steps, found the same traceback but i am not able to get where it is replacing the oslo config object. Please add some more information so that i can get into the issue?