OVN functional test_impl_idl tests fail if OVN/OVS schemas are not in default locations

Bug #1855903 reported by Jakub Libosvar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
networking-ovn
New
Undecided
Jakub Libosvar

Bug Description

If OVN database schemas are not in /usr/local/share/ovn/ location, the tests are gonna fail and there is no way how to override it.

=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: networking_ovn.tests.functional.test_impl_idl
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/fixtures/fixture.py", line 197, in setUp
    self._setUp()
  File "/usr/local/lib/python3.6/site-packages/ovsdbapp/venv.py", line 80, in _setUp
    self.setup_dbs()
  File "/usr/local/lib/python3.6/site-packages/ovsdbapp/venv.py", line 166, in setup_dbs
    self.create_db('ovnsb.db', self.ovnsb_schema)
  File "/usr/local/lib/python3.6/site-packages/ovsdbapp/venv.py", line 111, in create_db
    return self.call(['ovsdb-tool', '-v', 'create', name, schema])
  File "/usr/local/lib/python3.6/site-packages/ovsdbapp/venv.py", line 116, in call
    cmd, *args, env=self.env, cwd=cwd, **kwargs)
  File "/usr/lib64/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ovsdb-tool', '-v', 'create', 'ovnsb.db', '/usr/local/share/ovn/ovn-sb.ovsschema']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.6/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/home/cloud-user/networking-ovn/networking_ovn/tests/functional/test_impl_idl.py", line 18, in <module>
    from ovsdbapp.tests.functional import base
  File "/usr/local/lib/python3.6/site-packages/ovsdbapp/tests/functional/base.py", line 23, in <module>
    class FunctionalTestCase(base.TestCase):
  File "/usr/local/lib/python3.6/site-packages/ovsdbapp/tests/functional/base.py", line 30, in FunctionalTestCase
    ovsvenv.setUp()
  File "/usr/lib/python3.6/site-packages/fixtures/fixture.py", line 212, in setUp
    raise MultipleExceptions(*errors)
testtools.runtest.MultipleExceptions: ((<class 'subprocess.CalledProcessError'>, CalledProcessError(1, ['ovsdb-tool', '-v', 'create', 'ovnsb.db', '/usr/local/share/ovn/ovn-sb.ovsschema']), <traceback object at 0x7fc6c1623908>), (<class 'fixtures.fixture.SetupError'>, SetupError({},), <traceback object at 0x7fc6c1623888>))

================================================================================
The above traceback was encountered during test discovery which imports all the found test modules in the specified test_path.
ERROR: InvocationError for command /home/cloud-user/networking-ovn/tools/ostestr_compat_shim.sh (exited with code 100)
___________________________________ summary ____________________________________
ERROR: dsvm-functional: commands failed

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to networking-ovn (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/698293

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (stable/train)

Reviewed: https://review.opendev.org/698293
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=0d603a7e105d2cbe8ca21a1ee752e1f3c81879e0
Submitter: Zuul
Branch: stable/train

commit 0d603a7e105d2cbe8ca21a1ee752e1f3c81879e0
Author: Jakub Libosvar <email address hidden>
Date: Tue Dec 10 17:36:49 2019 +0100

    tox: Pass OVN and OVS source directories

    Some of networking-ovn functional tests inherit from ovsdbapp base
    class. ovsdbapp uses environment variables to define directories
    containing database schemas. This patch passes environment variable to
    tox if it's defined. If it's not defined, an empty string is used and
    code later uses its own defaults.

    This patch doesn't go to master as it's frozen now because of the code
    being merged to Neutron. The patch will be sent to master Neutron once
    code migration is finished.

    Change-Id: I5ccfc625352505c5b53f18e051e4d18598d5e286
    Closes-bug: #1855903

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn 7.1.0

This issue was fixed in the openstack/networking-ovn 7.1.0 release.

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.