[ovs-dev] [PATCH] ovs-ctl: Don't set hostname as external-id

Daniel Alvarez Sanchez dalvarez at redhat.com
Tue Jun 2 11:05:01 UTC 2020


Thanks a lot!
I proposed the new approach at:

https://patchwork.ozlabs.org/project/openvswitch/patch/20200525152821.19838-1-dalvarez@redhat.com/


On Sat, May 23, 2020 at 8:38 PM Han Zhou <zhouhan at gmail.com> wrote:
>
>
>
> On Sat, May 23, 2020 at 12:06 AM Daniel Alvarez <dalvarez at redhat.com> wrote:
> >
> >
> > Thanks a lot Terry!
> >
> >
> > > On 22 May 2020, at 23:28, Terry Wilson <twilson at redhat.com> wrote:
> > >
> > > 
> > >
> > >
> > >> On Wed, May 20, 2020 at 10:52 AM Daniel Alvarez <dalvarez at redhat.com> wrote:
> > >> ovs-ctl started to add the hostname as external-id [0] at some point.
> > >>
> > >> However, this can be problematic as if it's already set by an external
> > >> entity it will get overwritten. In RHEL systems, systemd will invoke
> > >> ovs-ctl to start OVS and that will overwrite it to the hostname of the
> > >> machine.
> > > If the problem is just ovs-ctl *overwriting* an existing entity then can we just change
> > >
> > >> -    ovs_vsctl set Open_vSwitch . external-ids:hostname="$hn"
> > >
> > > to ovs_vsctl add Open_vSwitch . external_ids:hostname="$hn"
> > >
> > > since add doesn't overwrite existing values if the key is set[1].
> >
> > This sounds great to me!
> > Han, it looks like Terry’s suggestion would work for the HV onboarding scenario that you mentioned and also fit in the model where an external entity decides what name to give to a particular HV. What do you think?
>
> Yes, SGTM, too :)
>
> > >
> > > [1] From man ovs-vsctl
> > >       [--if-exists] add table record column [key=]value...
> > >               Adds the specified value or key-value pair to column in record in table.  If column is a map, then key is required, otherwise it is  prohib‐
> > >               ited.  If key already exists in a map column, then the current value is not replaced (use the set command to replace an existing value).
> > >
> > >               Without --if-exists, it is an error if record does not exist.  With --if-exists, this command does nothing if record does not exist.
> > >
> > > Terry
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev



More information about the dev mailing list