magnum-db-manage fails with "ValueError: invalid literal for int() with base 10: 'magnum.sqlite'" (incorrect use of oslo_db.options)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magnum |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Current stable/ocata comes with a magnum-db-manage that immediately appears to fail:
(magnum-15.1.16) root@alice-
Traceback (most recent call last):
File "/openstack/
from magnum.
File "/openstack/
from magnum.db import migration
File "/openstack/
import magnum.conf
File "/openstack/
database.
File "/openstack/
options.
File "/openstack/
conf.
File "/openstack/
result = f(self, *args, **kwargs)
File "/openstack/
opt_
File "/openstack/
return self._convert_
File "/openstack/
return opt.type(value)
File "/openstack/
value = self.num_
ValueError: invalid literal for int() with base 10: 'magnum.sqlite'
As far as i can tell, this is due to an incorrect use of set_defaults in conf.database.
def register_
conf.
conf.
options.
The signature for set_defaults does indeed expect a numerical value for the third argument:
def set_defaults(conf, connection=None, max_pool_size=None,
Clearly, 'magnum.sqlite' isn't a valid value for max_pool_size. It looks to me like that argument can simply be dropped from the set_defaults() invocation in register_opts() to make things work.
Fix proposed to branch: stable/ocata /review. openstack. org/544807
Review: https:/