[openstack-dev] [neutron][db] Need help resolving a strange error with db connections in tests

Anna Kamyshnikova akamyshnikova at mirantis.com
Fri Sep 12 09:15:42 UTC 2014


This is implementing ModelsMigrationsSync test from oslo [1]. For running
it locally on Postgres you have to do the following things (it is mentioned
in comments to test):

For the opportunistic testing you need to set up a db named
    'openstack_citest' with user 'openstack_citest' and password
    'openstack_citest' on localhost.
    The test will then use that db and user/password combo to run the tests.

For PostgreSQL on Ubuntu this can be done with the following commands::

        sudo -u postgres psql
        postgres=# create user openstack_citest with createdb login password
                  'openstack_citest';
        postgres=# create database openstack_citest with owner
                   openstack_citest;

For MySQL on Ubuntu this can be done with the following commands::

        mysql -u root
        >create database openstack_citest;
        >grant all privilleges on openstack_citest.* to
         openstack_citest at localhost identified by 'opensatck_citest';

As I said this error appeared only three weeks ago, although I'm working on
this test since 29 of April, it passed Jenkins in August without any
problems. Postgres is available there.

[1] -
https://github.com/openstack/oslo.db/blob/master/oslo/db/sqlalchemy/test_migrations.py#L277

On Fri, Sep 12, 2014 at 12:28 PM, Kevin Benton <blak111 at gmail.com> wrote:

> Can you explain a bit about that test? I'm having trouble reproducing it.
> On the system (upstream Jenkins) that it's failing on, is postgres
> available with that database?
>
> On Thu, Sep 11, 2014 at 7:07 AM, Anna Kamyshnikova <
> akamyshnikova at mirantis.com> wrote:
>
>> Hello everyone!
>>
>> I'm working on implementing test in Neutron that checks that models are
>> synchronized with database state [1] [2]. This is very important change as
>> during Juno cycle big changes of database structure were done.
>>
>> I was working on it for rather long time but about three weeks ago
>> strange error appeared [3], using AssertionPool shows [4]. The problem is
>> that somehow there are more than one connection to database from each test.
>> I tried to use locks from lockutils, but it didn’t help. On db meeting we
>> decided to add TestCase just for one Ml2 plugin for starters, and then
>> continue working on this strange error, that is why there are two change
>> requests [1] and [2]. But I found out that somehow even one testcase fails
>> with the same error [5] from time to time.
>>
>> I’m asking for any suggestions that could be done in this case. It is
>> very important to get at least [1] merged in Juno.
>>
>> [1] - https://review.openstack.org/76520
>>
>> [2] - https://review.openstack.org/120040
>>
>> [3] - http://paste.openstack.org/show/110158/
>>
>> [4] - http://paste.openstack.org/show/110159/
>>
>> [5] -
>> http://logs.openstack.org/20/76520/68/check/gate-neutron-python27/63938f9/testr_results.html.gz
>>
>> Regards,
>>
>> Ann
>>
>>
>>
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>>
>
>
> --
> Kevin Benton
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140912/e968fd2d/attachment.html>


More information about the OpenStack-dev mailing list