Neutron functional tests can't target both postgres and mysql in the same test run

Bug #1372981 reported by Ann Taraday
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Henry Gessau
neutron
Fix Released
Medium
Mark McClain

Bug Description

Devstack can't install both postgres and mysql in a given run, which prevents the Neutron functional test suite from validating db migrations against both dbs in the same run.

Once devstack support for installing both db servers has been added, the migration tests can be moved from the unittest suite (where the openstack_citest credentials are available by default) to the functional job.

Changed in python-neutronclient:
assignee: nobody → Ann Kamyshnikova (akamyshnikova)
Maru Newby (maru)
Changed in python-neutronclient:
importance: Undecided → Medium
affects: python-neutronclient → neutron
Changed in neutron:
status: New → Confirmed
summary: - ModelsMigrationsSync test should be moved to functional tests
+ Neutron db migration tests can't run via the functional job
summary: - Neutron db migration tests can't run via the functional job
+ Only one of (postgres, mysql) can be installed by devstack
summary: - Only one of (postgres, mysql) can be installed by devstack
+ Only one of (postgres, mysql) can be installed by devstack at a time
Maru Newby (maru)
summary: - Only one of (postgres, mysql) can be installed by devstack at a time
+ Neutron functional tests need to be able to target both postgres and
+ mysql in the same test run
summary: - Neutron functional tests need to be able to target both postgres and
- mysql in the same test run
+ Neutron functional tests can't target both postgres and mysql in the
+ same test run
description: updated
Henry Gessau (gessau)
Changed in devstack:
assignee: nobody → Henry Gessau (gessau)
status: New → Confirmed
Revision history for this message
Matthew Treinish (treinish) wrote :

So I'm not sure I understand the reason for wanting to move the migration tests there. Sure there is the consistency aspect where the migration tests are actually functional tests but aside from that what is the reason for wanting to do this?

Especially since neutron has a separate functional test suite that requires devstack it feels like the migration tests should remain independent of that, since they only require a running db. I can see why putting them in the unit test namespace could be confusing, and if that is the only reason for moving them maybe just put them in a separate place which is different.

Revision history for this message
Maru Newby (maru) wrote :

The consistency aspect may look superficial, but having unit tests require dependencies that can not be guaranteed by tox is dangerous. It requires that we put conditional skips around the tests so that the unit test suite pass without error in environments that have not been configured correctly. This has 2 consequences:

 - skips can be accidentally triggered in the gate if the node configuration changes to not include the required dependencies
 - running the tests requires potentially error-prone manual configuration on the part of developers

The functional suite relies on devstack to install dependencies and do so in a repeatable manner. Testing of db migration would seem an ideal use of such an environment. While this may seem like a lot of work to validate only db migration, we intend to do more db-specific testing in-tree in the future.

Changed in neutron:
assignee: Ann Kamyshnikova (akamyshnikova) → Henry Gessau (gessau)
status: Confirmed → In Progress
Revision history for this message
Henry Gessau (gessau) wrote :

Can be done without modifying devstack.

Changed in devstack:
status: Confirmed → Invalid
Revision history for this message
Henry Gessau (gessau) wrote :
Changed in neutron:
assignee: Henry Gessau (gessau) → Rossella Sblendido (rossella-o)
Changed in neutron:
assignee: Rossella Sblendido (rossella-o) → Henry Gessau (gessau)
Changed in neutron:
assignee: Henry Gessau (gessau) → Rossella Sblendido (rossella-o)
Changed in neutron:
assignee: Rossella Sblendido (rossella-o) → Henry Gessau (gessau)
Changed in neutron:
assignee: Henry Gessau (gessau) → Mark McClain (markmcclain)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/126175
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3e0745827f414ecc39a0b0a40349e3646a8e2db9
Submitter: Jenkins
Branch: master

commit 3e0745827f414ecc39a0b0a40349e3646a8e2db9
Author: Henry Gessau <email address hidden>
Date: Sun Oct 5 01:23:50 2014 -0400

    Move DB TestModelsMigrations from unit to functional

    The tests to check that DB migrations and models are in sync depends
    on the mysql and postgresql backends being available with a specific
    DB user and database created. This violates the principles for unit
    tests and therefore these tests should be moved to functional tests.

    For these tests to work in the functional job in the gate, the
    backends must be installed and the DB user and database created.
    We do this via the functional gate hook.

    Closes-bug: #1372981

    Change-Id: I7b89feef3f19ca07dbfb05acfaa30529a5bf683d

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: kilo-2 → 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.