On 04/06/2015 08:50 PM, Justin Pettit wrote:
> 
>> On Apr 6, 2015, at 12:12 PM, Russell Bryant <rbry...@redhat.com> wrote:
>>
>> ovn-nbd updates the Bindings table of the OVN database when there are
>> updates to the OVN_Northbound database.  This update makes ovn-nbd
>> copy over the container integration related fields from OVN_Northbound
>> into the Bindings table.
>>
>> Signed-off-by: Russell Bryant <rbry...@redhat.com>
>> ---
>> ovn/ovn-nbd.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/ovn/ovn-nbd.c b/ovn/ovn-nbd.c
>> index 637d8cf..65aa0b4 100644
>> --- a/ovn/ovn-nbd.c
>> +++ b/ovn/ovn-nbd.c
>> @@ -181,6 +181,10 @@ set_bindings(struct nbd_context *ctx)
>>             ovnrec_bindings_set_logical_port(binding, lport->name);
>>             ovnrec_bindings_set_mac(binding,
>>                     (const char **) lport->macs, lport->n_macs);
>> +            if (lport->parent_name && lport->n_tag > 0) {
>> +                ovnrec_bindings_set_parent_port(binding, 
>> lport->parent_name);
>> +                ovnrec_bindings_set_tag(binding, lport->tag, lport->n_tag);
>> +            }
>>         }
>>     }
>>
>> @@ -354,6 +358,8 @@ main(int argc, char *argv[])
>>     ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_logical_port);
>>     ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_chassis);
>>     ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_mac);
>> +    ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_tag);
>> +    ovsdb_idl_add_column(ovn_idl, &ovnrec_bindings_col_parent_port);
>>
>>     /*
>>      * The loop here just runs the IDL in a loop waiting for the seqno to
> 
> I don't think ovn-nbd will update the tag or parent if it changes
> after the record has been inserted into the ovn database.  The
> ovn-nbctl command doesn't allow modifying those fields, but it's
> possible that the CMS integration could if it speaks native OVSDB.
> It's not a huge deal right now, but it seems like it could cause
> confusing issues later on.  Do you think it's worth addressing now?

Good point.  It's easy enough to fix now.  I'll go ahead and do it.

-- 
Russell Bryant
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to