On 3/29/23 18:19, Daniel Alvarez Sanchez wrote:
> The commit b8bf410a5 [0] broke the `ovs-vsctl add` command
> which now overwrites the value if it existed already.
> 
> This patch reverts the code around the `cmd_add` function
> to restore the previous behavior. It also adds testing coverage
> for this functionality.
> 
> [0]
> https://github.com/openvswitch/ovs/commit/b8bf410a5c94173da02279b369d75875c4035959
> 
> Signed-off-by: Daniel Alvarez Sanchez <[email protected]>
> Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=2182767
> ---
>  lib/db-ctl-base.c  | 42 +++++++++---------------------------------
>  tests/ovs-vsctl.at |  2 ++
>  2 files changed, 11 insertions(+), 33 deletions(-)

Hi, Daniel.  Thanks for the patch!

I missed that partial updates do not really work as union in my
original patch. :(

However, the revert seems to break the other test that was introduced
in commit b8bf410a5:

stderr:
ovs-vsctl: "add" operation would put 2 values in column datapath_id of table 
Bridge but the maximum number is 1
../../../tests/ovs-vsctl.at:1080: sed "/^.*|WARN|.*/d" < stderr
--- -   2023-03-29 17:24:31.263330076 +0000
+++ 
/home/runner/work/ovs/ovs/openvswitch-3.1.90/_build/sub/tests/testsuite.dir/at-groups/2416/stdout
   2023-03-29 17:24:31.260268161 +0000
@@ -1,2 +1,2 @@
-ovs-vsctl: transaction error: {"details":"set must have 0 to 1 members but 2 
are present","error":"syntax error","syntax":"[\"set\",[\"x\",\"y\"]]"}
+ovs-vsctl: "add" operation would put 2 values in column datapath_id of table 
Bridge but the maximum number is 1
 
2416. ovs-vsctl.at:985: 2416. database commands -- negative checks 
(ovs-vsctl.at:985): FAILED (ovs-vsctl.at:1080)

Could you, please, check?

Also, the 'Fixes:' tag would be great to have in the commit message.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to