Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Debugging this issue in the lab where it is seen revealed the following:
- nmstate 0.3 and up is determining the OVS capability by checking if the NM plugin is in place and that the openvswitch is running.
- The check for the OVS running is performed using `systemctl`.
- There is a bug it the logic when collecting the interfaces data: If there are OVS interface but the capability shows as if there is no OVS support, the OVS interfaces, including the `ovs-port` are still collected and reported without and processing.
- In the case of the lab setup, nmstate is installed in a container without systemd active. Therefore, the detection of the running OVS fails despite the fact it is actually running.
There seem to be a need to adjust the current nmstate logic to support such a scenario and have alternatives on detecting OVS availability.
My first thought about it is to check if an OVS bridge is detected in the devices list, hinting that OVS is indeed running.
Created attachment 1732878[details]
vagrant config to startup centos8 with NetworkManager 1.22 and ovs
To make reproduction easy this vagrant file configure the needed centos image to run containrized pod in top of it.
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 (nmstate bug fix and enhancement update), 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-2021:1748
When running nmstatectl show over a system with an ovs bridge and an internal ovs port nmstate fails with the following error: jsonschema.exceptions.ValidationError: {'name': 'vxlan0', 'type': 'ovs-port', 'state': 'down', 'ipv4': {'enabled': False}, 'ipv6': {'enabled': False}, 'lldp': {'enabled': False}} is not valid under any of the given schemas Failed validating 'oneOf' in schema['properties']['interfaces']['items']['allOf'][5]: {'oneOf': [{'$ref': '#/definitions/interface-unknown/rw'}, {'$ref': '#/definitions/interface-ethernet/rw'}, {'$ref': '#/definitions/interface-bond/rw'}, {'$ref': '#/definitions/interface-linux-bridge/all'}, {'$ref': '#/definitions/interface-ovs-bridge/all'}, {'$ref': '#/definitions/interface-ovs-interface/rw'}, {'$ref': '#/definitions/interface-dummy/rw'}, {'$ref': '#/definitions/interface-vlan/rw'}, {'$ref': '#/definitions/interface-vxlan/rw'}, {'$ref': '#/definitions/interface-team/rw'}, {'$ref': '#/definitions/interface-other/rw'}]} On instance['interfaces'][39]: {'ipv4': {'enabled': False}, 'ipv6': {'enabled': False}, 'lldp': {'enabled': False}, 'name': 'vxlan0', 'state': 'down', 'type': 'ovs-port'} Version-Release number of selected component (if applicable): nmstate 0.3.4 How reproducible: Always Steps to reproduce: On a centos8 as root do the following dnf copr enable -y networkmanager/NetworkManager-1.22 dnf copr enable nmstate/ovs-el8 -y dnf install -y NetworkManager dnf install -y podman dnf install -y openvswitch2.11 systemctl enable openvswitch systemctl start openvswitch systemctl restart NetworkManager ovs-vsctl add-br br0 ovs-vsctl add-port br0 vxlan1 -- set interface vxlan1 type=vxlan options:remote_ip=192.168.1.2 options:key=flow options:dst_port=8472 podman run --network=host --privileged -it --volume /run/dbus/system_bus_socket:/run/dbus/system_bus_socket centos:8 bash -c "dnf install -b -y dnf-plugins-core && dnf copr enable -y networkmanager/NetworkManager-1.26 && dnf copr enable nmstate/nmstate-0.3 -y && dnf install -y nmstate && nmstatectl show" Actual results: Traceback (most recent call last): File "/usr/bin/nmstatectl", line 11, in <module> load_entry_point('nmstate==0.3.6', 'console_scripts', 'nmstatectl')() File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 69, in main return args.func(args) File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 250, in show state = _filter_state(libnmstate.show(), args.only) File "/usr/lib/python3.6/site-packages/libnmstate/netinfo.py", line 35, in show return show_with_plugins(plugins, include_status_data) File "/usr/lib/python3.6/site-packages/libnmstate/nmstate.py", line 90, in show_with_plugins validator.schema_validate(report) File "/usr/lib/python3.6/site-packages/libnmstate/validator.py", line 42, in schema_validate js.validate(data, validation_schema) File "/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 541, in validate cls(schema, *args, **kwargs).validate(instance) File "/usr/lib/python3.6/site-packages/jsonschema/validators.py", line 130, in validate raise error jsonschema.exceptions.ValidationError: {'name': 'vxlan1', 'type': 'ovs-port', 'state': 'down', 'ipv4': {'enabled': False}, 'ipv6': {'enabled': False}, 'lldp': {'enabled': False}} is not valid under any of the given schemas Failed validating 'oneOf' in schema['properties']['interfaces']['items']['allOf'][5]: {'oneOf': [{'$ref': '#/definitions/interface-unknown/rw'}, {'$ref': '#/definitions/interface-ethernet/rw'}, {'$ref': '#/definitions/interface-bond/rw'}, {'$ref': '#/definitions/interface-linux-bridge/all'}, {'$ref': '#/definitions/interface-ovs-bridge/all'}, {'$ref': '#/definitions/interface-ovs-interface/rw'}, {'$ref': '#/definitions/interface-dummy/rw'}, {'$ref': '#/definitions/interface-vlan/rw'}, {'$ref': '#/definitions/interface-vxlan/rw'}, {'$ref': '#/definitions/interface-team/rw'}, {'$ref': '#/definitions/interface-other/rw'}]} On instance['interfaces'][3]: {'ipv4': {'enabled': False}, 'ipv6': {'enabled': False}, 'lldp': {'enabled': False}, 'name': 'vxlan1', 'state': 'down', 'type': 'ovs-port'} Expected results: Yaml showing the ovs bridge and port. Additional info: This was discovered running kubernetes-nmstate at OCP 4.7