db type could not be determined

Bug #1229445 reported by Kui Shi on 2013-09-23
132
This bug affects 29 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Undecided
Varun Gadiraju
Magnum
Fix Released
Undecided
Akhil jain
OpenStack Compute (nova)
Undecided
Maciej Szankin
Python client library for Sahara
Invalid
Undecided
Ngo Quoc Cuong
Testrepository
High
Unassigned
Zun
Undecided
jiangpengcheng
oslo.versionedobjects
Undecided
Sorin Sbarnea
tempest
Undecided
Unassigned

Bug Description

In openstack/python-novaclient project, run test in py27 env, then run test in py33 env, the following error will stop test:

db type could not be determined

But, if you run "tox -e py33" fist, then run "tox -e py27", it will be fine, no error.

workaround:
remove the file in .testrepository/times.dbm, then run py33 test, it will be fine.

Changed in testrepository:
status: New → Triaged
importance: Undecided → High

Thanks for the workaround. I met the same issue.

Ilya Pekelny (i159) wrote :

Affects oslo.messaging on Ubuntu 14.04 without side effects from `-e py27`. It falls even if `-e py27` have been started before.

Tom Cammann (tom-cammann) wrote :

Also got this for oslo.config, the workaround fixed the issue.

Tom Cammann (tom-cammann) wrote :

I don't think this is a duplicate of bug #1212909, this doesn't seem to be involved with bsddb and appears to be a much simpler problem.

Silvan Kaiser (2-silvan) wrote :

Issue persists until today, just hit it. Workaround helped me, too. I also agree this is likely not a duplicate of bug #1212909 ...

Travis Tripp (travis-tripp) wrote :

Just hit this. Used workaround:

 1299 rm .testrepository/times.dbm
 1300 tox -e py34
 1301 tox -e py27

Dane Fichter (dane-fichter) wrote :

I hit this bug as well. Removing times.db resolved it for me.

description: updated
yatin (yatinkarel) wrote :

I also hit the same bug, workaround works for me.

This issue was fixed in the openstack/ironic 6.1.0 release.

Changed in ironic:
assignee: nobody → Varun Gadiraju (varun-gadiraju)
status: New → Fix Released
Stenio Araujo (stenioaraujo) wrote :

I have just got to the same issue when running tox -epy35. The workaround worked for me.

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

Changed in nova:
assignee: nobody → Maciej Szankin (mszankin)
status: New → In Progress

Reviewed: https://review.openstack.org/435111
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=98cbf72e57e1d6950b3ea333b673c1c1c39a6cd7
Submitter: Jenkins
Branch: master

commit 98cbf72e57e1d6950b3ea333b673c1c1c39a6cd7
Author: Maciej Szankin <email address hidden>
Date: Thu Feb 16 20:52:41 2017 +0000

    Tests: remove .testrepository/times.dbm in tox.ini

    Existance of this file causes py3* tests to fail if
    run after py27. This patch adds cleaning up of this
    file before running py3* tests.

    Change-Id: I64ef1eac7f05f217674c73ddd2cc3af773dd75ce
    Closes-Bug: #1229445

Changed in nova:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/448266
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8c6e132966a7f3ca090a10459dc4eed07a4b3857
Submitter: Jenkins
Branch: master

commit 8c6e132966a7f3ca090a10459dc4eed07a4b3857
Author: Matt Riedemann <email address hidden>
Date: Tue Mar 21 16:06:41 2017 -0400

    Tests: remove .testrepository/times.dbm in tox.ini (functional)

    Change 98cbf72e57e1d6950b3ea333b673c1c1c39a6cd7 handled this for
    the py35 target but missed the functional-py35 target because
    that one doesn't inherit the commands from the root testenv.

    Change-Id: I018b809488f9e979f334c75415c15acb58dbd782
    Related-Bug: #1229445

Akhil jain (akhil.jain) on 2017-04-03
Changed in magnum:
assignee: nobody → Akhil jain (akhil.jain)

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

Changed in magnum:
status: New → In Progress
Akhil jain (akhil.jain) wrote :

Following magnum quickstart: https://docs.openstack.org/developer/magnum/dev/quickstart.html
The following step fails:
    # run all tests (unit and pep8)
    tox
with error
  py27 runtests: commands[1] | bash tools/pretty_tox.sh
    running testr
    No module named gdbm
    error: testr failed (3)
    running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
    OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
    OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-45} \
    ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./magnum/tests/unit} --list
    The test run didn't actually run any tests
    ERROR: InvocationError: '/bin/bash tools/pretty_tox.sh '

Reviewed: https://review.openstack.org/452678
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=20a5de74e7fb3a6e973b52e34dbba938b5e3000d
Submitter: Jenkins
Branch: master

commit 20a5de74e7fb3a6e973b52e34dbba938b5e3000d
Author: akhiljain23 <email address hidden>
Date: Mon Apr 3 09:51:46 2017 +0000

    Add 'rm -f .testrepository/times.dbm' command in testenv

    Running py2* post py3* tests results in error. Add
    'rm -f .testrepository/times.dbm' command in testenv to
    resolve this.

    Change-Id: I17f872b6169317de7c541a2ed77344ab1c313f94
    Closes-Bug: #1229445

Changed in magnum:
status: In Progress → Fix Released

This issue was fixed in the openstack/nova 16.0.0.0b1 development milestone.

Changed in zun:
assignee: nobody → jiangpengcheng (jiangpengcheng)

Reviewed: https://review.openstack.org/467105
Committed: https://git.openstack.org/cgit/openstack/zun/commit/?id=516127040eae162add5dcffe80d0d55be80a62d4
Submitter: Jenkins
Branch: master

commit 516127040eae162add5dcffe80d0d55be80a62d4
Author: jiangpengcheng <email address hidden>
Date: Tue May 23 06:01:49 2017 -0400

    Tests: remove .testrepository/times.dbm in tox.ini

    Existance of this file causes py3* tests to fail if
    run after py27. This patch adds cleaning up of this
    file before running py3* tests.

    Closes-Bug: #1229445

    Change-Id: I9e908f2520c39c2f97fc5a841d604a0cf4406621

Changed in zun:
status: New → Fix Released

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

Changed in tempest:
assignee: nobody → Jianghua Wang (wjh-fresh)
status: New → In Progress

Change abandoned by Jianghua Wang (<email address hidden>) on branch: master
Review: https://review.openstack.org/467828
Reason: See the above comment from Matthew.

Reviewed: https://review.openstack.org/473867
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=31b35c7b0a37ebaa522af9f2b428258193d5110d
Submitter: Jenkins
Branch: master

commit 31b35c7b0a37ebaa522af9f2b428258193d5110d
Author: Vladyslav Drok <email address hidden>
Date: Tue Jun 13 17:30:19 2017 +0300

    Remove times.dbm prior to test run

    It is a long known issue that tests for py3 can not be run after the
    tests for py2 were, unless times.dbm is removed.

    Related-Bug: #1229445
    Change-Id: I32b62e6d870364554ec20c1acce88fa59b85881d

Changed in tempest:
assignee: Jianghua Wang (wjh-fresh) → nobody
status: In Progress → New
Changed in tempest:
status: New → Incomplete
Ngo Quoc Cuong (cuongnq) on 2017-07-13
Changed in python-saharaclient:
assignee: nobody → Ngo Quoc Cuong (cuongnq)
Luigi Toscano (ltoscano) wrote :

Is there anyone would could help fixing this in testrepository, instead of a long stream of workarounds in each repository (which some maintainers rightfully don't want to apply)?

Changed in python-saharaclient:
status: New → Opinion

Change abandoned by Vitaly Gridnev (<email address hidden>) on branch: master
Review: https://review.openstack.org/483229

Vitalii Gridnev (vgridnev) wrote :

This not really an issue of saharaclient

Changed in python-saharaclient:
status: Opinion → Invalid
M V P Nitesh (m-nitesh) on 2017-07-13
Changed in testrepository:
assignee: nobody → M V P Nitesh (m-nitesh)
M V P Nitesh (m-nitesh) on 2017-07-13
Changed in testrepository:
assignee: M V P Nitesh (m-nitesh) → nobody

This issue was fixed in the openstack/zun 0.2.0 release.

This issue was fixed in the openstack/magnum 5.0.0 release.

Sorin Sbarnea (ssbarnea) on 2018-03-29
Changed in oslo.versionedobjects:
assignee: nobody → Sorin Sbârnea (sorin-sbarnea)
Sorin Sbarnea (ssbarnea) wrote :

I raised this bug on https://github.com/testing-cabal/testrepository/issues/33 is this looks as a more appropriate place to track testrepository bugs.

Matthew Treinish (treinish) wrote :

This bug actually shouldn't apply anymore with the updated pti specifying the use of stestr: https://governance.openstack.org/tc/reference/pti/python.html#python-test-running stestr fixes this bug and several others. We should just be migrating projects to use pti if they're not already.

Sorin Sbarnea (ssbarnea) wrote :

Matthew, I am not sure if switching from testr to stestr is a trivial change. I do have to suppoort 7 versions of OpenStack downstream, far after they reach EOL upstream.
I am wondering what would be easier: backporting stestr adoption or fixing one or two bugs in the old testrepository project. At least this one can be workarpunded with a simple rm line.

Luigi Toscano (ltoscano) wrote :

Older versions of OpenStack downstream probably do not need to run twice the py27 and then py3x unit tests in the same run (if they did support py3x at all), maybe.

Ben Nemec (bnemec) wrote :

I would prefer not to have to apply the workaround to all of the Olso projects when we need to migrate them to stestr anyway.

Changed in oslo.versionedobjects:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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