placement unit test placement.tests.unit.cmd.test_manage.TestCommandParsers.test_commands_associated fails on CentOS 7
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Lee Yarwood |
Bug Description
Test placement.
I get the following:
placement.
-------
Captured stdout:
~~~~~~~~~~~~~~~~
usage: run db [-h] {sync,version} ...
optional arguments:
-h, --help show this help message and exit
subcommands:
database commands
{
sync Sync the datatabse to the current version.
version Report the current database version.
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "placement/
File "/placement/
raise AssertionError(msg)
AssertionError: Expected 'db_version' to be called once. Called 0 times.
This started to fail since https:/
tags: | added: placement testing |
no longer affects: | oslo.config |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
importance: | Undecided → High |
Changed in nova: | |
status: | Fix Committed → Fix Released |
I've attached a simple script to reproduce this behaviour outside of placement.
I'm struggling to find where but AFAICT the oslo.config code parsing the command line args is failing and defaulting to the default help func for the top level command parser.
# cat /etc/redhat-release
Fedora release 28 (Twenty Eight)
# python --version
Python 2.7.15
# pip freeze | grep oslo.config
oslo.config==6.7.0
# python reproduce.py cmd bar
<bound method Commands.bar of <__main__.Commands object at 0x7f50d187c110>>
# cat /etc/redhat-release Parser. print_help of _CachedArgument Parser( prog='reproduce cmd', usage=None, description=None, version=None, formatter_ class=< class 'argparse. HelpFormatter' >, conflict_ handler= 'error' , add_help=True)>
CentOS Linux release 7.5.1804 (Core)
# python --version
Python 2.7.5
# pip freeze | grep oslo.config
oslo.config==6.7.0
# python reproduce.py cmd bar
<bound method _CachedArgument