[ovs-dev] [PATCH ovn 1/2] chassis: Fix the way encaps are updated for a chassis record.

Dumitru Ceara dceara at redhat.com
Thu Sep 3 13:33:42 UTC 2020


On 9/3/20 3:11 PM, Dumitru Ceara wrote:

[...]

>>
>> Oops. My bad. Thanks.
>>
>> I tested after applying both the patches.
>>
>> When I run this command - ovs-vsctl set open . external_ids:system-id=ch-2
>> I see below warning message in ovn-controller log
>>
>> *****
>> 2020-09-03T11:03:34.411Z|00014|ovsdb_idl|WARN|transaction error:
>> {"details":"Transaction causes multiple rows in \"Chassis_Private\"
>> table to have identical values (ch-2) for index on column \"name\". 
>> First row, with UUID 1cf765f0-774d-460f-b394-988e7a2bf8ee, was inserted
>> by this transaction.  Second row, with UUID
>> 04b66cab-0705-4cbb-b11c-2414d076b09d, existed in the database before
>> this transaction and was not modified by the
>> transaction.","error":"constraint violation"}
>> 2020-09-03T11:03:34.412Z|00015|ovsdb_idl|WARN|transaction error:
>> {"details":"Transaction causes multiple rows in \"Chassis_Private\"
>> table to have identical values (ch-2) for index on column \"name\". 
>> First row, with UUID c15a0c17-a56a-4ec2-be3a-ceff644aa908, was inserted
>> by this transaction.  Second row, with UUID
>> 04b66cab-0705-4cbb-b11c-2414d076b09d, existed in the database before
>> this transaction and was not modified by the
>> transaction.","error":"constraint violation"}
>> *******
>>
>> Functionally it works as expected. i.e the previous chassis_private
>> record is updated with the new name. I think should be fixed though.
>>
> 
> Hi Numan,
> 
> Nice catch! It's happening because when ovn-controller sends the
> transaction to update chassis.name and chassis_private.name,
> ovsdb-server replies with:
> 
> update3: "modify": chassis.row.name = <new-value>, "delete":
> chassis_private.row
> 
> Followed by:
> update3: "insert": chassis_private.row(name = <new-value>).
> 
> ovn-controller runs the processing loop after the first update3 and
> tries to insert the chassis_private because it can't find it anymore in
> the IDL. This insert obviously fails because ovsdb-server knows about
> the old chassis_private record.
> 
> Once the last update3 is received by ovn-controller things settle down.
> 
> I've been trying to understand why ovsdb-server replies with
> insert/delete when chassis_private.name is updated but I couldn't figure
> it out.
> 

I think I know what's happening. Because we changed the chassis_private
name without updating the conditional monitoring clause for
chassis_private, ovsdb-server will consider that the updated
chassis_private should not be sent to ovn-controller.

Then we update the conditional monitoring again and we get the "insert"
update3.

Let me see if I can fix this in ovn-controller and I'll send a v2.

Regards,
Dumitru



More information about the dev mailing list