ironic and cinder fail to run unit tests with master oslo.config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
New
|
Undecided
|
Unassigned | ||
Ironic |
Fix Released
|
High
|
Dmitry Tantsur | ||
Ironic Inspector |
In Progress
|
High
|
Dmitry Tantsur | ||
oslo.config |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Trying to run unit test for Cinder or Ironic with the current oslo.config master branch result in a failure. Checking commits, the cause seems to be in https:/
The error message in Cinder unit tests is:
=======
Failures during discovery
=======
--- import errors ---
Failed to import test module: cinder.
Traceback (most recent call last):
File "/tmp/cinder/
module = self._get_
File "/tmp/cinder/
__import_
File "cinder/
from cinder.
File "cinder/
CONF.
File "/tmp/cinder/
result = f(self, *args, **kwargs)
File "/tmp/cinder/
self.
File "/tmp/cinder/
return f(self, *args, **kwargs)
File "/tmp/cinder/
return group._
File "/tmp/cinder/
if _is_opt_
File "/tmp/cinder/
raise DuplicateOptErr
DuplicateOptError: duplicate option: zfssa_rest_timeout
In Ironic:
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/usr/lib/
return func(*args, **keywargs)
File "/builddir/
File "/usr/lib/
return mock.assert_
File "/usr/lib/
raise AssertionError(msg)
AssertionError: Expected 'exists' to be called once. Called 61 times.
Changed in ironic: | |
assignee: | nobody → Dmitry Tantsur (divius) |
Changed in ironic-inspector: | |
assignee: | nobody → Dmitry Tantsur (divius) |
Changed in ironic: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in ironic-inspector: | |
status: | New → Confirmed |
importance: | Undecided → High |
The DuplicateOptError is probably caused by reusing a ConfigOpts instance with a slightly different definition of the zfssa_rest_timeout option, and I do see at least 2 places that option is defined, in zfssaiscsi.py and zfssanfs.py:
$ git grep zfssa_rest_timeout tests/unit/ volume/ drivers/ test_zfssa. py: self.configurat ion.zfssa_ rest_timeout = 60 tests/unit/ volume/ drivers/ test_zfssa. py: self.configurat ion.zfssa_ rest_timeout = '30' volume/ drivers/ zfssa/zfssaiscs i.py: cfg.IntOpt( 'zfssa_ rest_timeout' , volume/ drivers/ zfssa/zfssaiscs i.py: self.zfssa. set_host( lcfg.san_ ip, timeout= lcfg.zfssa_ rest_timeout) volume/ drivers/ zfssa/zfssanfs. py: cfg.IntOpt( 'zfssa_ rest_timeout' , volume/ drivers/ zfssa/zfssanfs. py: self.zfssa. set_host( host, timeout= lcfg.zfssa_ rest_timeout) configuration/ tables/ cinder- zfssa-iscsi. inc: * - ``zfssa_ rest_timeout` ` = ``None`` configuration/ tables/ cinder- zfssa-nfs. inc: * - ``zfssa_ rest_timeout` ` = ``None``
cinder/
cinder/
cinder/
cinder/
cinder/
cinder/
doc/source/
doc/source/