Description of problem: When using openvswitch3.1 provided in CentOS NFV SIG, the external-id.hostname is overwritten on each service restart. This has changed the behavior of previous versions of ovs from 2.15: https://github.com/openvswitch/ovs/commit/2221e8b034298bd77dc9282895c4b32fd11583e8 Version-Release number of selected component (if applicable): openvswitch3.1-3.1.0-3.el9s.x86_64 How reproducible: Always Actual results: example (note i'm setting short name amoralej3 and it overwrites it to amoralej3.example.com fqdn on restart) [root@amoralej3 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=amoralej3.example.com, rundir="/var/run/openvswitch", system-id="b0bf030c-70a5-4ee7-8fb6-aa295f61a767"} [root@amoralej3 ~]# sudo ovs-vsctl set open_vswitch . external-ids:hostname=amoralej3 [root@amoralej3 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=amoralej3, rundir="/var/run/openvswitch", system-id="b0bf030c-70a5-4ee7-8fb6-aa295f61a767"} [root@amoralej3 ~]# systemctl restart openvswitch [root@amoralej3 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=amoralej3.example.com, rundir="/var/run/openvswitch", system-id="b0bf030c-70a5-4ee7-8fb6-aa295f61a767"} [root@amoralej3 ~]# Expected results: external-id.hostname should be preserved once it's set initially. Same example as previous one with openvswitch2.17: [root@amoralej3 ~]# rpm -q openvswitch2.17 openvswitch2.17-2.17.0-72.el9s.x86_64 [root@amoralej3 ~]# systemctl start openvswitch [root@amoralej3 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=amoralej3.example.com, rundir="/var/run/openvswitch", system-id="b0bf030c-70a5-4ee7-8fb6-aa295f61a767"} [root@amoralej3 ~]# [root@amoralej3 ~]# sudo ovs-vsctl set open_vswitch . external-ids:hostname=amoralej3 [root@amoralej3 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=amoralej3, rundir="/var/run/openvswitch", system-id="b0bf030c-70a5-4ee7-8fb6-aa295f61a767"} [root@amoralej3 ~]# systemctl restart openvswitch [root@amoralej3 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=amoralej3, rundir="/var/run/openvswitch", system-id="b0bf030c-70a5-4ee7-8fb6-aa295f61a767"} [root@amoralej3 ~]# Additional info:
Reverting b8bf410a5 fixes the issue. The offending patch is: https://github.com/openvswitch/ovs/commit/b8bf410a5c94173da02279b369d75875c4035959 Which is in v3.1.0+
Sent a patch here [0]. Quickly tested it locally and seems to do the trick. [0] https://mail.openvswitch.org/pipermail/ovs-dev/2023-March/403255.html
* Mon Apr 03 2023 Open vSwitch CI <ovs-ci> - 3.1.0-13 - Merging upstream branch-3.1 [RH git: bd072cf805] Commit list: b184a68a20 netdev-offload-tc: Del ufid mapping if device not exist. 037e2d9161 db-ctl-base: Partially revert b8bf410a5. (#2182767)
# Reproduce issue: [root@netqe40 ~]# rpm -q openvswitch3.1 openvswitch3.1-3.1.0-2.el9fdp.x86_64 [root@netqe40 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=netqe40.knqe.lab.eng.bos.redhat.com, rundir="/var/run/openvswitch", system-id="3d4e8d7c-d288-4f34-bf18-7a52974fc5b7"} [root@netqe40 ~]# ovs-vsctl set open_vswitch . external-ids:hostname=netqe40 [root@netqe40 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=netqe40, rundir="/var/run/openvswitch", system-id="3d4e8d7c-d288-4f34-bf18-7a52974fc5b7"} [root@netqe40 ~]# systemctl restart openvswitch [root@netqe40 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=netqe40.knqe.lab.eng.bos.redhat.com, rundir="/var/run/openvswitch", system-id="3d4e8d7c-d288-4f34-bf18-7a52974fc5b7"} # Verify fix: [root@netqe40 ~]# rpm -q openvswitch3.1 openvswitch3.1-3.1.0-24.el9fdp.x86_64 [root@netqe40 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=netqe40.knqe.lab.eng.bos.redhat.com, rundir="/var/run/openvswitch", system-id="3d4e8d7c-d288-4f34-bf18-7a52974fc5b7"} [root@netqe40 ~]# ovs-vsctl set open_vswitch . external-ids:hostname=netqe40 [root@netqe40 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=netqe40, rundir="/var/run/openvswitch", system-id="3d4e8d7c-d288-4f34-bf18-7a52974fc5b7"} [root@netqe40 ~]# systemctl restart openvswitch [root@netqe40 ~]# ovs-vsctl list open .|grep hostname external_ids : {hostname=netqe40, rundir="/var/run/openvswitch", system-id="3d4e8d7c-d288-4f34-bf18-7a52974fc5b7"}
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 (openvswitch3.1 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-2023:3989