Trove tox tests now generate an error about some mongodb config_file

Bug #1495573 reported by Amrith Kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Amrith Kumar

Bug Description

My tox runs are now littered with errors that look like

Traceback (most recent call last):
  File "/opt/stack/trove/trove/tests/unittests/guestagent/test_backups.py", line 534, in test_backup_success
    with self.backup_runner(12345):
  File "trove/guestagent/strategies/backup/experimental/mongo_impl.py", line 46, in __init__
    self.app = mongo_service.MongoDBApp()
  File "trove/guestagent/datastore/experimental/mongodb/service.py", line 74, in __init__
    revision_dir = self._init_overrides_dir()
  File "trove/guestagent/datastore/experimental/mongodb/service.py", line 60, in _init_overrides_dir
    os.path.dirname(CONFIG_FILE),
  File "/opt/stack/trove/.tox/py27/lib/python2.7/posixpath.py", line 129, in dirname
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'

I have a change for this, will push it up

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

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

Changed in trove:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/223224
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=c1cecebdf654cf0e36c8c75ca0c3dbfdfb66e869
Submitter: Jenkins
Branch: master

commit c1cecebdf654cf0e36c8c75ca0c3dbfdfb66e869
Author: Amrith Kumar <email address hidden>
Date: Mon Sep 14 16:56:09 2015 +0000

    Properly patch _init_overrides_dir in MongoDB

    Since most of us don't have MongoDB installed on our
    desktop/development environment, tox tests will fail because some
    config paths for Mongo aren't available.

    The change proposed here is merely to mock the _init_overrides_dir
    properly in changes that would otherwise stub their toes on this.

    It is my understanding that this issue was introduced in Change-Id:
    Iaca9cc9e3ce1e6521839062fc9458c1b987f9464 which sought to address bug
    1485158.

    The reason this problem occurs on my machine (and likely on other
    developers workstation) is that I don't have MongoDB installed. The
    reason this doesn't impact the gate is that those machines have
    MongoDB installed (for ceiliometer).

    Change-Id: I0f3d24b95a7d2ef1e23a0f1fd8f60bc496261f70
    Closes-Bug: #1495573

Changed in trove:
status: In Progress → Fix Committed
Changed in trove:
milestone: none → liberty-rc1
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in trove:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: liberty-rc1 → 4.0.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.