Bug 1564912

Summary: Functional test 'TestModelsMigrationsMysql.test_models_sync' fails
Product: Red Hat OpenStack Reporter: Arie Bregman <abregman>
Component: python-networking-ovnAssignee: Lucas Alvares Gomes <lmartins>
Status: CLOSED ERRATA QA Contact: Arie Bregman <abregman>
Severity: low Docs Contact:
Priority: low    
Version: 13.0 (Queens)CC: abregman, amuller, apevec, ekuris, joflynn, jschluet, lhh, lmartins, majopela, nyechiel
Target Milestone: z2Keywords: AutomationBlocker, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-networking-ovn-4.0.2-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-29 16:20:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Arie Bregman 2018-04-08 21:23:50 UTC
Description of problem:

The following test fails:

networking_ovn.tests.functional.db.test_migrations.TestModelsMigrationsMysql.test_models_sync


Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/home/cloud-user/networking-ovn/.tox/dsvm-functional/src/neutron/neutron/tests/base.py", line 140, in func
        return f(self, *args, **kwargs)
      File "/home/cloud-user/networking-ovn/.tox/dsvm-functional/lib/python2.7/site-packages/oslo_db/sqlalchemy/test_migrations.py", line 619, in test_models_sync
        "Models and migration scripts aren't in sync:\n%s" % msg)
      File "/home/cloud-user/networking-ovn/.tox/dsvm-functional/lib/python2.7/site-packages/unittest2/case.py", line 690, in fail
        raise self.failureException(msg)
    AssertionError: Models and migration scripts aren't in sync:
    [ [ ( 'modify_nullable',
          None,
          'ovn_revision_numbers',
          'created_at',
          { 'existing_server_default': False,
            'existing_type': DATETIME()},
          False,
          True)],
      [ ( 'modify_default',
          None,
          'ovn_revision_numbers',
          'revision_number',
          { 'existing_nullable': False,
            'existing_type': BIGINT(display_width=20)},
          None,
          DefaultClause('0', for_update=False))]]


How reproducible: 100%


Steps to Reproduce:
1. Clone networking-ovn
2. Checkout OSP 13 branch
3. Run networking_ovn/tests/contrib/gate_hook.sh
4. Run dsvm-functional tests

Comment 1 Lucas Alvares Gomes 2018-04-24 15:33:44 UTC
Thanks for reporting this Arie, can you let me know where did you run those reproducible steps please? Did you clone networking-ovn in one of the controllers ?

Currently networking-ovn does not run the database migration tests in the gate upstream which is a problem. I've reported it at https://bugs.launchpad.net/networking-ovn/+bug/1766639.

In the bug description I also lay down the steps about how one can manually configure a DevStack environment to run the tests, but, the tests are currently broken.

This patch should fix them: https://review.openstack.org/#/c/563994, can you please try it out in your setup ?

Cheers,
Lucas

Comment 2 Lucas Alvares Gomes 2018-04-25 10:39:53 UTC
Just an update. I've put up a patch upstream now to properly configure the environment for the functional tests so we don't skip those migration tests anymore: https://review.openstack.org/564152

2018-04-25 10:17:11.163806 | primary | 2018-04-25 10:17:11.163 | {0} networking_ovn.tests.functional.db.test_migrations.TestModelsMigrationsMysql.test_models_sync [28.038068s] ... ok

Comment 16 Joanne O'Flynn 2018-08-13 14:17:25 UTC
This bug is marked for inclusion in the errata but does not currently contain draft documentation text. To ensure the timely release of this advisory please provide draft documentation text for this bug as soon as possible.

If you do not think this bug requires errata documentation, set the requires_doc_text flag to "-".


To add draft documentation text:

* Select the documentation type from the "Doc Type" drop down field.

* A template will be provided in the "Doc Text" field based on the "Doc Type" value selected. Enter draft text in the "Doc Text" field.

Comment 17 Lucas Alvares Gomes 2018-08-13 14:21:35 UTC
(In reply to Joanne O'Flynn from comment #16)
> This bug is marked for inclusion in the errata but does not currently
> contain draft documentation text. To ensure the timely release of this
> advisory please provide draft documentation text for this bug as soon as
> possible.
> 
> If you do not think this bug requires errata documentation, set the
> requires_doc_text flag to "-".
> 
> 
> To add draft documentation text:
> 
> * Select the documentation type from the "Doc Type" drop down field.
> 
> * A template will be provided in the "Doc Text" field based on the "Doc
> Type" value selected. Enter draft text in the "Doc Text" field.

Thanks Joanne,

This bug is only related to a test run so I don't think it needs any documentation about it. I've set the requires_doc_text flag to "-" as requested for this case.

Comment 19 errata-xmlrpc 2018-08-29 16:20:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2596