NoSuchOptError: no such option in group database: backend

Bug #1396703 reported by Johannes Erdfelt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Johannes Erdfelt

Bug Description

When running any of the database specific test classes in nova.tests.unit.db.test_migrations, each individual test will fail with a traceback similar to this:

Traceback (most recent call last):
  File "/home/johannes/openstack/nova/nova/tests/unit/db/test_migrations.py", line 164, in test_compare_schema_alembic
    self.walk_versions(snake_walk=False, downgrade=False)
  File "/home/johannes/virtualenvs/migrations/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/test_migrations.py", line 187, in walk_versions
    self.INIT_VERSION)
  File "/home/johannes/openstack/nova/nova/tests/unit/db/test_migrations.py", line 73, in INIT_VERSION
    return migration.db_initial_version()
  File "/home/johannes/openstack/nova/nova/db/migration.py", line 44, in db_initial_version
    return IMPL.db_initial_version()
  File "/home/johannes/openstack/nova/nova/utils.py", line 427, in __getattr__
    backend = self.__get_backend()
  File "/home/johannes/openstack/nova/nova/utils.py", line 410, in __get_backend
    backend_name = CONF[self.__config_group][self.__pivot]
  File "/home/johannes/virtualenvs/migrations/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 2313, in __getitem__
    return self.__getattr__(key)
  File "/home/johannes/virtualenvs/migrations/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 2309, in __getattr__
    return self._conf._get(name, self._group)
  File "/home/johannes/virtualenvs/migrations/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 2043, in _get
    value = self._do_get(name, group, namespace)
  File "/home/johannes/virtualenvs/migrations/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 2061, in _do_get
    info = self._get_opt_info(name, group)
  File "/home/johannes/virtualenvs/migrations/local/lib/python2.7/site-packages/oslo/config/cfg.py", line 2189, in _get_opt_info
    raise NoSuchOptError(opt_name, group)
NoSuchOptError: no such option in group database: backend

This appears to be because of an incorrect use of conf_fixture

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/137425

Changed in nova:
assignee: nobody → Johannes Erdfelt (johannes.erdfelt)
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/137425
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=9496c6517b4378b16c9c041080eb9e252ff9dc28
Submitter: Jenkins
Branch: master

commit 9496c6517b4378b16c9c041080eb9e252ff9dc28
Author: Johannes Erdfelt <email address hidden>
Date: Wed Nov 26 09:16:12 2014 -0800

    Fix use of conf_fixture

    As the name implies, conf_fixture.ConfFixture is a fixture. It should
    be used by calling self.useFixture() instead of calling it directly.
    This ensures that the setUp() method is called correctly.

    If the test classes are executed individually, the database config
    options are not registered correctly and could result in this failure
    for each test case:

    NoSuchOptError: no such option in group database: backend

    Closes-bug: 1396703

    Change-Id: Iaf7e1aedaacf24508e55f4d6975946f83ef833a6

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.