Bug 2109536 - Import error for 'os_vif.internal'
Summary: Import error for 'os_vif.internal'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-os-vif
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: OSP Team
QA Contact: nlevinki
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-21 13:50 UTC by Jose Silva
Modified: 2023-09-18 04:42 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-01 18:42:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-17779 0 None None None 2022-07-21 13:57:12 UTC

Description Jose Silva 2022-07-21 13:50:45 UTC
Description of problem:
The [Run tox] task fails due to an import error

Version-Release number of selected component (if applicable): 17.0


Actual results:
2022-07-21 12:53:34.929217 | container | =========================
2022-07-21 12:53:34.929230 | container | Failures during discovery
2022-07-21 12:53:34.929240 | container | =========================
2022-07-21 12:53:34.929250 | container | --- import errors ---
2022-07-21 12:53:34.929259 | container | Failed to import test module: os_vif.internal
2022-07-21 12:53:34.929269 | container | Traceback (most recent call last):
2022-07-21 12:53:34.929278 | container |   File "/usr/lib64/python3.9/unittest/loader.py", line 470, in _find_test_path
2022-07-21 12:53:34.929288 | container |     package = self._get_module_from_name(name)
2022-07-21 12:53:34.929298 | container |   File "/usr/lib64/python3.9/unittest/loader.py", line 377, in _get_module_from_name
2022-07-21 12:53:34.929307 | container |     __import__(name)
2022-07-21 12:53:34.929318 | container |   File "/root/src/code.engineering.redhat.com/python-os-vif/os_vif/internal/__init__.py", line 25, in <module>
2022-07-21 12:53:34.929328 | container |     raise exception.ExternalImport()
2022-07-21 12:53:34.929338 | container | os_vif.exception.ExternalImport: Use of this module outside of os_vif is not allowed. It must not be imported in os-vif plugins that are out of tree as it is not a public interface of os-vif.
2022-07-21 12:53:34.929348 | container |
2022-07-21 12:53:34.929363 | container | ================================================================================
2022-07-21 12:53:34.929373 | container | The above traceback was encountered during test discovery which imports all the found test modules in the specified test_path.
2022-07-21 12:53:34.965722 | container | ERROR: InvocationError for command /usr/bin/stestr run --black-regex .tests.functional (exited with code 100)

Expected results:


Additional info:

Comment 1 smooney 2022-07-26 14:42:08 UTC
this does not apprear to be installed correctly.

can you provide a link to how your are running the tests.
/root/src/code.engineering.redhat.com/python-os-vif/os_vif/internal/__init__.py
is obviously not a normal install location.

we do not allow anything in the internal module to be imported from outside of the os_vif package.
if the source repo has been installed into the tox eve correctly by tox and you run tox form the git repo root this should not happen.
so this looks like you are perhaps running it in a non standard way.

with out reviewing the way the job triggered this there si not really much more i can say.

Comment 2 smooney 2022-07-26 15:11:40 UTC
sorry ment to set needinfo can you provide a link to the job definition so we can try and determine why this is happening.

this requirement is not new, it was there in 16 and i belive 13, so it must be related to how the test is being run.

Comment 3 Jose Silva 2022-07-27 06:59:37 UTC
Our goal is to import everything from rpms instead of pip.

For this case, I installed the package python3-os-vif

Here is the build where I encountered the error:
https://sf.hosted.upshift.rdu2.redhat.com/zuul/t/osp-internal/build/b4f8bb39ed26472298f1bb27fb81d799

Please let me know if you need more information

Comment 4 smooney 2022-08-03 11:03:35 UTC
I believe to be able to run the tests when installed form an rpm you will have to change directory into the install location and run the tests from there.
the import exception is by design so this is not a bug or defect in the python3-os-vif

looking at the job you are instead running the tests form the src directory not the install directory so os-vif considers the test import to be an out of tree import
which we intentionally block.

im not 100% sure where the package is installing it but I assume its in a sub directory of /usr/lib64/python3.9/ or similar.


if we really really need to we could perhaps add a environmental variable to disable the import check but that would be a pretty low priority to address.

Comment 6 smooney 2022-08-24 15:02:37 UTC
have you had time to test my suggestion form comment 4 https://bugzilla.redhat.com/show_bug.cgi?id=2109536#c4

i will leave this open for another week but then close it we don't get a repocne so ill also set a need info

Comment 7 Szymon Datko 2022-10-11 15:08:48 UTC
Hey, sorry for missing the bugzilla earier. Recently I started to review the issues in Component CI and we still observe the issue, both for OSP 17.0 and OSP 17.1

What we do in the job, is:
– we fetch the spec file and install the RPM dependencies listed there,
– we install some missing RPMs identified (that should be in spec file probably, but they are not) [NOTE: nothing currently for python-os-vif],
– we run the tests defined in tox.

So, in essence, this is a tox job but with truncated requirement.txt and site-packages enabled.

And ideas and hints what we can do to make it passing are welcome.
I will be following this bug report from now on.

You can use this change for debugging the issue.
https://code.engineering.redhat.com/gerrit/c/python-os-vif/+/420991

Comment 8 smooney 2022-10-12 14:33:47 UTC
this looks like the same issue
the tests are being run like this form the source repo

/home/zuul/src/code.engineering.redhat.com/python-os-vif$ /usr/bin/stestr run --black-regex .tests.functional

but you have installed  it from rpm which may change how the package is reported


if i pull the tip of 17.0 and run it locally the tests pass

/repos/downstream/python-os-vif on  rhos-17.0-trunk-patches via 🐍 v3.8.13 (.venv) 
[15:30:48]➜ tox -e py3
py3 create: /home/sean/repos/downstream/python-os-vif/.tox/py3
py3 installdeps: -chttps://releases.openstack.org/constraints/upper/master, -r/home/sean/repos/downstream/python-os-vif/requirements.txt, -r/home/sean/repos/downstream/python-os-vif/test-requirements.txt
py3 develop-inst: /home/sean/repos/downstream/python-os-vif
py3 installed: amqp==5.1.1,attrs==22.1.0,autopage==0.5.1,bcrypt==4.0.0,cachetools==5.2.0,certifi==2022.9.24,cffi==1.15.1,charset-normalizer==2.1.1,cliff==4.0.0,cmd2==2.4.2,coverage==6.4.4,debtcollector==2.5.0,dnspython==2.2.1,eventlet==0.33.1,extras==1.0.0,fasteners==0.17.3,fixtures==4.0.1,future==0.18.2,futurist==2.4.1,greenlet==1.1.3,idna==3.3,importlib-metadata==4.12.0,iso8601==1.0.2,Jinja2==3.1.2,kombu==5.2.4,MarkupSafe==2.1.1,msgpack==1.0.4,netaddr==0.8.0,netifaces==0.11.0,-e git+ssh://smooney.redhat.com/python-os-vif@313bcd28625ad68f511a838c1582a754e8c99577#egg=os_vif,oslo.concurrency==5.0.1,oslo.config==9.0.0,oslo.context==5.0.0,oslo.i18n==5.1.0,oslo.log==5.0.0,oslo.messaging==14.0.0,oslo.metrics==0.5.0,oslo.middleware==5.0.0,oslo.privsep==3.0.1,oslo.serialization==5.0.0,oslo.service==3.0.0,oslo.utils==6.0.1,oslo.versionedobjects==3.0.1,oslotest==4.5.0,ovs==2.17.1.post1,ovsdbapp==2.1.0,packaging==21.3,Paste==3.5.2,PasteDeploy==2.1.1,pbr==5.10.0,prettytable==3.4.1,prometheus-client==0.14.1,pycparser==2.21,pyinotify==0.9.6,pyparsing==3.0.9,pyperclip==1.8.2,pyroute2==0.7.2,python-dateutil==2.8.2,python-subunit==1.4.0,pytz==2022.2.1,PyYAML==6.0,repoze.lru==0.7,requests==2.28.1,rfc3986==1.5.0,Routes==2.5.1,six==1.16.0,sortedcontainers==2.4.0,statsd==3.3.0,stestr==3.2.1,stevedore==4.0.0,testscenarios==0.5.0,testtools==2.5.0,urllib3==1.26.12,vine==5.0.0,voluptuous==0.13.1,wcwidth==0.2.5,WebOb==1.8.7,wrapt==1.14.1,yappi==1.3.6,zipp==3.8.1
py3 run-test-pre: PYTHONHASHSEED='3074407813'
py3 run-test: commands[0] | stestr run --black-regex .tests.functional
NetlinkError was raised, code 40, message: (40, 'Error message')
{1} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_exit_code [0.003200s] ... ok
NetlinkError was raised, code 40, message: (40, 'Error message')
{1} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_delete_exit_code [0.002632s] ... ok
{1} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_delete_no_interface_found [0.001865s] ... ok
{1} os_vif.tests.unit.internal.ip.test_api.TestIpApi.test_get_impl_windows [0.000925s] ... ok
{1} os_vif.tests.unit.test_exception.VIFExceptionTestCase.test_error_msg [0.000328s] ... ok
{1} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_8021qbh_backport_1_0 [0.000599s] ... ok
{1} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_dpdk_k8s_backport_1_0 [0.000660s] ... ok
{1} os_vif.tests.unit.test_vif.TestVIFS.test_vif_host_dev_vepa_qbh [0.000791s] ... ok
{1} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_addbr_exception [0.002569s] ... ok
{0} os_vif.tests.unit.test_exception.VIFExceptionTestCase.test_default_error_msg [0.000211s] ... ok
{0} os_vif.tests.unit.test_host_info.TestHostInfo.test_plugin_existance [0.000526s] ... ok
{0} os_vif.tests.unit.test_objects.TestObjectVersions.test_vif_vhost_user_obj_make_compatible [0.000346s] ... ok
{0} os_vif.tests.unit.test_os_vif.TestOSVIF.test_initialize [0.009673s] ... ok
{0} os_vif.tests.unit.test_os_vif.TestOSVIF.test_plug_not_initialized [0.000742s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_ovs_backport_1_0 [0.000545s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_backport_1_1 [0.000972s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_vif_generic [0.000755s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_vif_host_dev_plain [0.000647s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user [0.000727s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_fp_lb [0.001100s] ... ok
{0} vif_plug_noop.tests.unit.test_plugin.PluginTest.test_plug_noop [0.000171s] ... ok
{5} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_set [0.002120s] ... ok
{5} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_set_no_interface_found [0.002285s] ... ok
{5} os_vif.tests.unit.internal.ip.test_api.TestIpApi.test_get_impl_linux [0.000907s] ... ok
{0} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__ovs_supports_mtu_requests_not_supported [0.005346s] ... ok
{5} os_vif.tests.unit.internal.ip.windows.test_impl_netifaces.TestIPDevice.test_exists [0.001623s] ... ok
{5} os_vif.tests.unit.test_base.TestVersionedObjectPrintable.test_import_non_ovo_class [0.000502s] ... ok
{5} os_vif.tests.unit.test_base.TestVersionedObjectPrintable.test_print_object [0.000595s] ... ok
{5} os_vif.tests.unit.test_host_info.TestHostInfo.test_common_version_ok [0.000742s] ... ok
{1} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_vhostuser_not_supports_mtu_req [0.026646s] ... ok
{5} os_vif.tests.unit.test_os_vif.TestOSVIF.test_load_plugin [0.000573s] ... ok
{0} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_update_ovs_vif_port [0.004501s] ... ok
{5} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_representor_backport_1_0 [0.000601s] ... ok
{0} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_port_name_not_found [0.001095s] ... ok
{5} os_vif.tests.unit.test_vif.TestVIFS.test_vif_direct_plain [0.000801s] ... ok
{0} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_delete_interface_not_present [0.001860s] ... ok
{5} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_set_device_invalid_mtu [0.002477s] ... ok
{0} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_is_switchdev_ioerror [0.000928s] ... ok
NetlinkError was raised, code 40, message: (40, 'Error message')
{0} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_parse_pf_number [0.000468s] ... ok
{0} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs [0.002074s] ... ok
{5} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_mtu_from_config [0.003343s] ... ok
{5} vif_plug_noop.tests.unit.test_plugin.PluginTest.test_describe_noop [0.000241s] ... ok
{5} vif_plug_noop.tests.unit.test_plugin.PluginTest.test_unplug_noop [0.000121s] ... ok
{2} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_veth [0.002314s] ... ok
{0} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_bridge [0.003353s] ... ok
{2} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_set_exit_code [0.003119s] ... ok
{2} os_vif.tests.unit.test_host_info.TestHostInfo.test_common_version_no_version [0.000899s] ... ok
{4} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_delete [0.005012s] ... ok
{5} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__ovs_supports_mtu_requests [0.007002s] ... ok
{2} os_vif.tests.unit.test_host_info.TestHostInfo.test_vif_existance [0.000705s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_bridge_backport_1_0 [0.000446s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_vif_direct_vepa_qbh [0.000945s] ... ok
{4} os_vif.tests.unit.test_host_info.TestHostInfo.test_plugin_fetch [0.000912s] ... ok
{4} os_vif.tests.unit.test_host_info.TestHostInfo.test_serialization [0.001726s] ... ok
{5} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_switch_id [0.003111s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_fp_tap [0.001748s] ... ok
{5} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_delete_bridge_exists [0.003302s] ... ok
{5} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_vf_num_by_pci_address_exception [0.002895s] ... ok
{1} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_create_ovs_vif_port [0.023717s] ... ok
{4} os_vif.tests.unit.test_host_info.TestHostInfo.test_vif_fetch [0.007528s] ... ok
{2} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_priv_mtu_not_called [0.007605s] ... ok
{5} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vhostuser [0.004300s] ... ok
{2} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_vlan_mtu_from_config [0.003140s] ... ok
{2} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_vlan_mtu_in_model [0.002782s] ... ok
{5} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_vif_ovs_smart_nic [0.003008s] ... ok
{4} os_vif.tests.unit.test_objects.TestObjectVersions.test_versions [0.007614s] ... ok
{1} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_create_ovs_vif_port_type_dpdk [0.014873s] ... ok
{3} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_vlan_no_interface_found [0.002855s] ... ok
{2} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_ensure_ovs_bridge [0.007065s] ... ok
{2} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port [0.002683s] ... ok
{6} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_bridge [0.004218s] ... ok
{6} os_vif.tests.unit.test_exception.VIFExceptionTestCase.test_default_error_msg_with_kwargs [0.000181s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_pending_warnings_emitted_class_direct [0.000209s] ... ok
{2} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_2_pfs [0.003104s] ... ok
{1} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_delete_ovs_vif_port_no_delete_netdev [0.005195s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_add_bridge_port [0.001295s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_backport_1_2 [0.001134s] ... ok
{3} os_vif.tests.unit.internal.ip.windows.test_impl_netifaces.TestIPDevice.test_exists_not_found [0.003042s] ... ok
{3} os_vif.tests.unit.internal.ip.windows.test_impl_netifaces.TestIPDevice.test_exists_os_error_exception [0.002421s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_representor_backport_1_1 [0.000850s] ... ok
{2} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_exception_io_error [0.002790s] ... ok
{3} os_vif.tests.unit.test_host_info.TestHostInfo.test_common_version_no_obj [0.000878s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_vif_bridge_ovs [0.001392s] ... ok
{2} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_is_switchdev_positive [0.000936s] ... ok
{3} os_vif.tests.unit.test_host_info.TestHostInfo.test_filtering [0.001286s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_vif_host_dev_ovs_offload [0.001745s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_fp_ovs [0.001552s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_bridge_windows [0.003832s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_ovs_representor [0.001719s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_not_found [0.003096s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_vf_dpdk [0.002569s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_is_switchdev_empty [0.001351s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name_with_switchdev [0.002094s] ... ok
{6} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_vlan [0.006036s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_vf_passthrough [0.004510s] ... ok
{1} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test__get_vif_datapath_type [0.000566s] ... ok
{6} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_set_device_mtu [0.002300s] ... ok
{1} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_create_vif_port_isolate [0.001930s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_windows [0.002320s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_vif_generic [0.001833s] ... ok
{1} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_bridge_windows [0.002376s] ... ok
{3} os_vif.tests.unit.test_os_vif.TestOSVIF.test_host_info_filtered [0.018355s] ... ok
{6} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__ovs_supports_mtu_requests_other_error [0.005174s] ... ok
{3} os_vif.tests.unit.test_os_vif.TestOSVIF.test_load_plugin_no_config [0.000199s] ... ok
{3} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_8021qbg_backport_1_0 [0.000913s] ... ok
{3} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_base_backport_1_0 [0.000509s] ... ok
{3} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_backport_1_0 [0.000471s] ... ok
{6} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_not_vhostuser_windows [0.003763s] ... ok
{3} os_vif.tests.unit.test_vif.TestVIFS.test_vif_nested_dpdk_k8s [0.001107s] ... ok
{4} os_vif.tests.unit.test_os_vif.TestOSVIF.test_plug [0.042583s] ... ok
{3} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_parse_vf_number [0.000203s] ... ok
{3} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name [0.001660s] ... ok
{7} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_bridge_with_ageing [0.003303s] ... ok
{3} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name_with_fallback_To_first_netdev [0.002817s] ... ok
{4} os_vif.tests.unit.test_os_vif.TestOSVIF.test_unplug [0.005289s] ... ok
{4} os_vif.tests.unit.test_os_vif.TestOSVIF.test_unplug_not_initialized [0.000198s] ... ok
{6} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_delete_ovs_vif_port [0.006689s] ... ok
{7} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_other_type [0.001861s] ... ok
{3} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name_with_representors [0.002143s] ... ok
{4} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_tap_backport_1_0 [0.001031s] ... ok
{4} os_vif.tests.unit.test_vif.TestVIFS.test_vif_bridge_plain [0.000748s] ... ok
{7} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_vlan [0.002331s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__disable_ipv6 [0.004510s] ... ok
{7} os_vif.tests.unit.test_base.TestVersionedObjectPrintable.test_serialize_object [0.002673s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_port_name [0.002866s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vf_passthrough [0.005976s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_vif_generic [0.002035s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_exists [0.004142s] ... ok
{4} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_priv_mtu_order [0.010208s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_vif_ovs_smart_nic [0.003094s] ... ok
{7} os_vif.tests.unit.test_os_vif.TestOSVIF.test_host_info_all [0.006865s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_vf_number_not_found [0.001890s] ... ok
{7} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_ovs_backport_1_1 [0.001226s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_hybrid_bridge [0.002336s] ... ok
{7} os_vif.tests.unit.test_vif.TestVIFS.test_vif_direct_vepa_qbg [0.001702s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vhostuser_client [0.002930s] ... ok
{7} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_generic_representor [0.001641s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs [0.003660s] ... ok
{4} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__set_mtu_request [0.007600s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_windows [0.003825s] ... ok
{7} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test__disable_ipv6 [0.005716s] ... ok
{7} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge [0.004622s] ... ok
{4} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_not_vhostuser_linux [0.011343s] ... ok
{7} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge [0.002347s] ... ok
{4} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_switch_id_not_found [0.001078s] ... ok
{4} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_delete_bridge_none [0.001546s] ... ok
{7} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_mtu_in_model [0.003123s] ... ok
{4} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge [0.005683s] ... ok
{4} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_vf_number_found [0.001794s] ... ok
{7} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_vhostuser_supports_mtu_req [0.007652s] ... ok
{4} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vf_dpdk [0.005758s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__arp_filtering [0.008815s] ... ok
{4} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_no_lb [0.002341s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_ifname_by_pci_address_exception [0.001272s] ... ok
{4} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_vhostuser [0.001990s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_exception_value_error [0.002791s] ... ok
{7} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_create_vif_port [0.002063s] ... ok
{7} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_create_vif_port_mtu_in_model [0.001675s] ... ok
{7} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_bridge [0.009330s] ... ok

======
Totals
======
Ran: 159 tests in 0.2046 sec.
 - Passed: 159
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 0.5347 sec.

==============
Worker Balance
==============
 - Worker 0 (20 tests) => 0:00:00.042462
 - Worker 1 (20 tests) => 0:00:00.115912
 - Worker 2 (20 tests) => 0:00:00.061931
 - Worker 3 (20 tests) => 0:00:00.063125
 - Worker 4 (20 tests) => 0:00:00.130948
 - Worker 5 (20 tests) => 0:00:00.047776
 - Worker 6 (20 tests) => 0:00:00.063243
 - Worker 7 (19 tests) => 0:00:00.079195
__________________________________________________________________________________________ summary ___________________________________________________________________________________________
  py3: commands succeeded
  congratulations :)



so this is down to how you are installing it in the ci and executing the tests

Comment 9 smooney 2022-10-12 16:01:03 UTC
if i install the package into the venv

its installed where i would expect it to be

creating /home/sean/repos/downstream/python-os-vif/.venv/lib/python3.8/site-packages/vif_plug_ovs
creating /home/sean/repos/downstream/python-os-vif/.venv/lib/python3.8/site-packages/vif_plug_linux_bridge
creating /home/sean/repos/downstream/python-os-vif/.venv/lib/python3.8/site-packages/vif_plug_linux_bridge/tests
creating /home/sean/repos/downstream/python-os-vif/.venv/lib/python3.8/site-packages/os_vif
creating /home/sean/repos/downstream/python-os-vif/.venv/lib/python3.8/site-packages/os_vif/tests

and importing the modules have the expected behaviour
no error if i import os_vif


~/repos/downstream/python-os-vif on  rhos-17.0-trunk-patches [?] via 🐍 v3.8.13 (.venv) 
[16:57:57]❯ python3 -c "import os_vif"

and an error if i import the internal module

~/repos/downstream/python-os-vif on  rhos-17.0-trunk-patches [?] via 🐍 v3.8.13 (.venv) 
[16:58:17]❯ python3 -c "import os_vif.internal"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/sean/repos/downstream/python-os-vif/os_vif/internal/__init__.py", line 25, in <module>
    raise exception.ExternalImport()
os_vif.exception.ExternalImport: Use of this module outside of os_vif is not allowed. It must not be imported in os-vif plugins that are out of tree as it is not a public interface of os-vif.


running the test then works too as run in the API

~/repos/downstream/python-os-vif on  rhos-17.0-trunk-patches [?] via 🐍 v3.8.13 (.venv) 
[16:59:09]❯ stestr run --exclude-regex .tests.functional
NetlinkError was raised, code 40, message: (40, 'Error message')
{5} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_delete_exit_code [0.005350s] ... ok
{5} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_set [0.001749s] ... ok
NetlinkError was raised, code 40, message: (40, 'Error message')
{5} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_set_exit_code [0.002209s] ... ok
{5} os_vif.tests.unit.internal.ip.windows.test_impl_netifaces.TestIPDevice.test_exists_not_found [0.002501s] ... ok
{5} os_vif.tests.unit.test_base.TestVersionedObjectPrintable.test_import_non_ovo_class [0.000459s] ... ok
{5} os_vif.tests.unit.test_base.TestVersionedObjectPrintable.test_serialize_object [0.002319s] ... ok
{5} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_base_backport_1_0 [0.000548s] ... ok
{5} os_vif.tests.unit.test_vif.TestVIFS.test_vif_generic [0.000653s] ... ok
{5} os_vif.tests.unit.test_vif.TestVIFS.test_vif_host_dev_vepa_qbh [0.001012s] ... ok
{5} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_fp_lb [0.001105s] ... ok
{1} os_vif.tests.unit.internal.ip.test_api.TestIpApi.test_get_impl_linux [0.002428s] ... ok
{0} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_delete_no_interface_found [0.002056s] ... ok
{0} os_vif.tests.unit.test_host_info.TestHostInfo.test_vif_fetch [0.000669s] ... ok
{1} os_vif.tests.unit.test_host_info.TestHostInfo.test_common_version_no_version [0.001575s] ... ok
{5} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_priv_mtu_order [0.007975s] ... ok
{5} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_vlan [0.005408s] ... ok
{1} os_vif.tests.unit.test_host_info.TestHostInfo.test_vif_existance [0.000485s] ... ok
{1} os_vif.tests.unit.test_os_vif.TestOSVIF.test_load_plugin [0.000388s] ... ok
{1} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_ovs_backport_1_0 [0.000375s] ... ok
{1} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_fp_ovs [0.001691s] ... ok
{1} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_mtu_from_config [0.005000s] ... ok
{4} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_bridge [0.001750s] ... ok
{6} os_vif.tests.unit.test_base.TestVersionedObjectPrintable.test_print_object [0.000491s] ... ok
{6} os_vif.tests.unit.test_host_info.TestHostInfo.test_common_version_no_obj [0.000702s] ... ok
{6} os_vif.tests.unit.test_objects.TestObjectVersions.test_versions [0.007760s] ... ok
{6} os_vif.tests.unit.test_os_vif.TestOSVIF.test_plug_not_initialized [0.000217s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_vif_direct_vepa_qbh [0.000945s] ... ok
{6} os_vif.tests.unit.test_vif.TestVIFS.test_vif_host_dev_ovs_offload [0.001724s] ... ok
{0} os_vif.tests.unit.test_os_vif.TestOSVIF.test_host_info_filtered [0.009585s] ... ok
{0} os_vif.tests.unit.test_os_vif.TestOSVIF.test_initialize [0.003097s] ... ok
NetlinkError was raised, code 40, message: (40, 'Error message')
{0} os_vif.tests.unit.test_os_vif.TestOSVIF.test_load_plugin_no_config [0.000156s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_pending_warnings_emitted_class_direct [0.000211s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_backport_1_1 [0.000480s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_representor_backport_1_0 [0.000359s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_representor_backport_1_1 [0.000488s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_vif_bridge_ovs [0.001154s] ... ok
{4} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_other_type [0.002726s] ... ok
{4} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_vlan_no_interface_found [0.001521s] ... ok
{4} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_set_no_interface_found [0.001710s] ... ok
{4} os_vif.tests.unit.test_exception.VIFExceptionTestCase.test_error_msg [0.000129s] ... ok
{4} os_vif.tests.unit.test_host_info.TestHostInfo.test_common_version_ok [0.000605s] ... ok
{5} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_set_device_invalid_mtu [0.001510s] ... ok
{5} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_create_ovs_vif_port [0.010781s] ... ok
{0} os_vif.tests.unit.test_vif.TestVIFS.test_vif_direct_vepa_qbg [0.003172s] ... ok
{2} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_delete [0.006141s] ... ok
{1} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_vhostuser_not_supports_mtu_req [0.005074s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__disable_ipv6 [0.004643s] ... ok
{2} os_vif.tests.unit.internal.ip.windows.test_impl_netifaces.TestIPDevice.test_exists_os_error_exception [0.002637s] ... ok
{0} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_mtu_in_model [0.003086s] ... ok
{2} os_vif.tests.unit.test_exception.VIFExceptionTestCase.test_default_error_msg_with_kwargs [0.000185s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_port_name_not_found [0.001353s] ... ok
{4} os_vif.tests.unit.test_host_info.TestHostInfo.test_plugin_fetch [0.000825s] ... ok
{5} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_ensure_ovs_bridge [0.004786s] ... ok
{6} vif_plug_noop.tests.unit.test_plugin.PluginTest.test_plug_noop [0.000194s] ... ok
{6} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__ovs_supports_mtu_requests [0.007643s] ... ok
{2} os_vif.tests.unit.test_host_info.TestHostInfo.test_serialization [0.002258s] ... ok
{2} os_vif.tests.unit.test_objects.TestObjectVersions.test_vif_vhost_user_obj_make_compatible [0.000533s] ... ok
{5} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_switch_id [0.002926s] ... ok
{5} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_is_switchdev_empty [0.000938s] ... ok
{5} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_parse_vf_number [0.000148s] ... ok
{0} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__ovs_supports_mtu_requests_other_error [0.004746s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_delete_bridge_exists [0.003088s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_ifname_by_pci_address_exception [0.000870s] ... ok
{6} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__ovs_supports_mtu_requests_not_supported [0.004322s] ... ok
{5} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_vf_number_not_found [0.001568s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port [0.003186s] ... ok
{4} os_vif.tests.unit.test_os_vif.TestOSVIF.test_plug [0.008149s] ... ok
{0} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_exception_value_error [0.002901s] ... ok
{4} os_vif.tests.unit.test_os_vif.TestOSVIF.test_unplug [0.003062s] ... ok
{2} os_vif.tests.unit.test_os_vif.TestOSVIF.test_host_info_all [0.006330s] ... ok
{6} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_not_vhostuser_linux [0.004371s] ... ok
{3} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_veth [0.002984s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_2_pfs [0.002857s] ... ok
{4} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_bridge_backport_1_0 [0.000429s] ... ok
{4} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_tap_backport_1_0 [0.000328s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_8021qbh_backport_1_0 [0.000661s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_dpdk_k8s_backport_1_0 [0.000420s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_fp_ovs_backport_1_1 [0.000652s] ... ok
{0} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name_with_fallback_To_first_netdev [0.002333s] ... ok
{5} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs [0.002474s] ... ok
{5} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_bridge_windows [0.002695s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_is_switchdev_ioerror [0.000706s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user [0.001783s] ... ok
{3} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_vlan [0.007403s] ... ok
{4} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_backport_1_0 [0.000271s] ... ok
{4} os_vif.tests.unit.test_vif.TestVIFS.test_vif_bridge_plain [0.000709s] ... ok
{4} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_set_device_mtu [0.002967s] ... ok
{0} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vf_dpdk [0.004860s] ... ok
{3} os_vif.tests.unit.internal.ip.test_api.TestIpApi.test_get_impl_windows [0.001013s] ... ok
{1} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name_with_representors [0.003959s] ... ok
{2} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_fp_tap [0.001297s] ... ok
{2} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_addbr_exception [0.002970s] ... ok
{0} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_vf_dpdk [0.002435s] ... ok
{6} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_create_ovs_vif_port_type_dpdk [0.008661s] ... ok
{3} os_vif.tests.unit.internal.ip.windows.test_impl_netifaces.TestIPDevice.test_exists [0.001566s] ... ok
{3} os_vif.tests.unit.test_host_info.TestHostInfo.test_plugin_existance [0.000549s] ... ok
{2} vif_plug_noop.tests.unit.test_plugin.PluginTest.test_unplug_noop [0.000167s] ... ok
{3} os_vif.tests.unit.test_os_vif.TestOSVIF.test_unplug_not_initialized [0.000231s] ... ok
{1} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_vf_passthrough [0.004625s] ... ok
{3} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_ovs_backport_1_2 [0.000709s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_port_name [0.003403s] ... ok
{3} os_vif.tests.unit.test_vif.TestVIFS.test_vif_host_dev_plain [0.001019s] ... ok
{4} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_delete_ovs_vif_port [0.007423s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__get_phys_switch_id_not_found [0.001110s] ... ok
{3} os_vif.tests.unit.test_vif.TestVIFS.test_vif_nested_dpdk_k8s [0.001635s] ... ok
{1} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_vif_ovs_smart_nic [0.003175s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_vf_num_by_pci_address_exception [0.001651s] ... ok
{2} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_vhostuser_supports_mtu_req [0.006074s] ... ok
{6} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_vf_number_found [0.001772s] ... ok
{4} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_update_ovs_vif_port [0.004357s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test__get_vif_datapath_type [0.000756s] ... ok
{3} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test__disable_ipv6 [0.005959s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs [0.002352s] ... ok
{2} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test_delete_ovs_vif_port_no_delete_netdev [0.005503s] ... ok
{4} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_exists [0.004735s] ... ok
{7} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_bridge_with_ageing [0.002398s] ... ok
{2} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_not_found [0.002924s] ... ok
{4} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_get_representor_port_exception_io_error [0.002921s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_windows [0.005374s] ... ok
{2} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name_with_switchdev [0.002235s] ... ok
{7} os_vif.tests.unit.internal.ip.linux.test_impl_pyroute2.TestIpCommand.test_add_exit_code [0.003386s] ... ok
{3} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge_priv_mtu_not_called [0.007247s] ... ok
{7} os_vif.tests.unit.test_exception.VIFExceptionTestCase.test_default_error_msg [0.000359s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_vif_generic [0.002113s] ... ok
{4} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_physical_function_interface_name [0.003560s] ... ok
{7} os_vif.tests.unit.test_host_info.TestHostInfo.test_filtering [0.001086s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_create_vif_port_isolate [0.001943s] ... ok
{7} os_vif.tests.unit.test_vif.TestVIFS.test_port_profile_8021qbg_backport_1_0 [0.000687s] ... ok
{7} os_vif.tests.unit.test_vif.TestVIFS.test_vif_direct_plain [0.000801s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_vif_ovs_smart_nic [0.002955s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vhostuser [0.002875s] ... ok
{7} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_generic_representor [0.001517s] ... ok
{4} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_bridge_windows [0.003818s] ... ok
{6} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_vif_generic [0.001701s] ... ok
{2} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_vhostuser [0.001865s] ... ok
{4} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_hybrid_bridge [0.002541s] ... ok
{3} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge [0.005947s] ... ok
{7} os_vif.tests.unit.test_vif.TestVIFS.test_vif_vhost_user_ovs_representor [0.003002s] ... ok
{3} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_vlan_mtu_from_config [0.003807s] ... ok
{7} vif_plug_linux_bridge.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge [0.005038s] ... ok
{3} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__update_device_mtu_interface_not_vhostuser_windows [0.005223s] ... ok
{7} vif_plug_linux_bridge.tests.unit.test_plugin.PluginTest.test_plug_bridge_create_br_vlan_mtu_in_model [0.003623s] ... ok
{3} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_delete_interface_not_present [0.002351s] ... ok
{7} vif_plug_noop.tests.unit.test_plugin.PluginTest.test_describe_noop [0.001041s] ... ok
{3} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_ensure_bridge [0.005624s] ... ok
{7} vif_plug_ovs.tests.unit.ovsdb.test_ovsdb_lib.BaseOVSTest.test__set_mtu_request [0.006329s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_create_vif_port [0.002023s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vhostuser_client [0.004923s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test__arp_filtering [0.008454s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_add_bridge_port [0.001592s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_delete_bridge_none [0.002798s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_no_lb [0.007244s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_is_switchdev_positive [0.001174s] ... ok
{7} vif_plug_ovs.tests.unit.test_linux_net.LinuxNetTest.test_parse_pf_number [0.000151s] ... ok
{3} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_windows [0.002722s] ... ok
{7} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_create_vif_port_mtu_in_model [0.002428s] ... ok
{7} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_bridge [0.013179s] ... ok
{7} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_plug_ovs_vf_passthrough [0.005287s] ... ok
{7} vif_plug_ovs.tests.unit.test_plugin.PluginTest.test_unplug_ovs_bridge [0.003894s] ... ok

======
Totals
======
Ran: 159 tests in 0.1600 sec.
 - Passed: 159
 - Skipped: 0
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 0
Sum of execute time for each test: 0.4490 sec.

==============
Worker Balance
==============
 - Worker 0 (17 tests) => 0:00:00.045913
 - Worker 1 (18 tests) => 0:00:00.052028
 - Worker 2 (20 tests) => 0:00:00.055386
 - Worker 3 (20 tests) => 0:00:00.077352
 - Worker 4 (21 tests) => 0:00:00.061104
 - Worker 5 (21 tests) => 0:00:00.066445
 - Worker 6 (21 tests) => 0:00:00.068806
 - Worker 7 (21 tests) => 0:00:00.075736
~/repos/downstream/python-os-vif on  rhos-17.0-trunk-patches [?] via 🐍 v3.8.13 (.venv) took 2s 

this is when the package is install with setup tools

so this seam like an issue with the rpm spec or how the ci is modifying the tox env.

Comment 12 Szymon Datko 2022-10-12 20:43:13 UTC
Minor note: don't use -t for podman when calling script with heredoc, so in the comment #11 it should be:

```
podman run -i registry.access.redhat.com/ubi9/ubi bash << 'FFF'
  (...)
```

Comment 13 Szymon Datko 2022-10-12 21:07:14 UTC
Ok, during playing, I noticed that the issue does not occur when we install stestr within the tox environment.

```
echo 'stestr' > test-requirements.txt
```

Then with all other deps from system packages it works properly.

Would this be acceptable workaround we can implement within the job?


BTW I just noticed that in tox.ini in branch for OSP 17.0 there is specified upper-constraints file for master release, not for wallaby.
Upstream uses wallaby (https://github.com/openstack/os-vif/blob/stable/wallaby/tox.ini) so probably repo should be synced?
(This may result in an issue in pep8 job, that still relies on pypi deps, in the future).

Comment 14 Szymon Datko 2022-10-12 21:41:10 UTC
Proposed fix&workaround for now: https://github.com/RedHatCRE/znoyder/pull/103

Comment 15 smooney 2022-10-26 13:05:31 UTC
yes i have no issue with you installing stestr in the tox venv

yes the repo likely needs to be synced to pick that up too however I'm not really sure why that is not happening already.

its probably because we have not done a release on stable wallaby upstream in a while.
i think lib like os-vif only update when we do that 
we typically only update the upperconstrats after we create the stable branch so that patch likely is not in the initial release.
ill try and verify that upstream and propose a release.


since https://github.com/RedHatCRE/znoyder/pull/103 is merged can we close this?

ill look into the repo sync seperately.

Comment 16 Szymon Datko 2022-10-28 10:11:18 UTC
(In reply to smooney from comment #15)
> yes i have no issue with you installing stestr in the tox venv
> (...)
> since https://github.com/RedHatCRE/znoyder/pull/103 is merged can we close
> this?

As long as there is no objection for the in-job workaround I introduced (stestr installed), IMO we can close this report as resolved.

Comment 17 smooney 2022-11-01 18:42:46 UTC
ok ill close this for now and do a new release of os-vif async

we don't actually use the upper constraints the way you are testing via rpms anyway so having the wrong default won't break anything especially since we support setting it via an ENV var.

Comment 18 Red Hat Bugzilla 2023-09-18 04:42:35 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.