The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 2182767 - external-id.hostname is overwritten on each openvswtich service start with ovs 3.1
Summary: external-id.hostname is overwritten on each openvswtich service start with ov...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: openvswitch3.1
Version: RHEL 9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Timothy Redaelli
QA Contact: Rick Alongi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-29 14:57 UTC by Alfredo Moralejo
Modified: 2023-07-06 19:17 UTC (History)
8 users (show)

Fixed In Version: openvswitch3.1-3.1.0-13.el9fdp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-06 19:17:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-2788 0 None None None 2023-03-29 14:58:19 UTC
Red Hat Product Errata RHBA-2023:3989 0 None None None 2023-07-06 19:17:57 UTC

Description Alfredo Moralejo 2023-03-29 14:57:34 UTC
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:

Comment 1 Daniel Alvarez Sanchez 2023-03-29 15:17:12 UTC
Reverting b8bf410a5 fixes the issue. The offending patch is:

https://github.com/openvswitch/ovs/commit/b8bf410a5c94173da02279b369d75875c4035959

Which is in v3.1.0+

Comment 2 Daniel Alvarez Sanchez 2023-03-29 16:21:01 UTC
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

Comment 3 ovs-bugzilla 2023-04-03 22:30:30 UTC
* 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)

Comment 6 Rick Alongi 2023-05-26 11:23:44 UTC
# 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"}

Comment 11 errata-xmlrpc 2023-07-06 19:17:49 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 (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


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