Thanks a lot Terry!

> On 22 May 2020, at 23:28, Terry Wilson <twil...@redhat.com> wrote:
> 
> 
> 
> 
>> On Wed, May 20, 2020 at 10:52 AM Daniel Alvarez <dalva...@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?
> 
> [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
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to