[ovs-dev] [PATCH v6] db-ctl-base: add uuid specified method for create cmd

Timo_Liu liuchang at cmss.chinamobile.com
Wed Mar 25 05:42:05 UTC 2020



Hi Ben:




>>You added two copies of the following.
>>+ if (!uuid_from_string(&uuid_from_cmd, row_uuid)) {
>>+ ctl_error(ctx, "row-uuid '%s' is not a valid UUID", row_uuid);
>>+ return;


>>+ } 

This check block has been moved outside for v8. So there is only one uuid check block now. 




>>There is no test that uses an ID on a command *before* the "create">>command. The documentation says this works. Please test it.

I see what you mean. Yes, if we want to use both --id and --row-uuid, and the record is 

referenced "before" the "create" cmd, it won't work. The reason is cmd "create" executes

later, so the formal record won't take use of the symbol table entry with right uuid. 

I haven't come up with a solution yet, so we changed the db-ctl-base document in v8

and add a restriction for --id and --row-uuid with create action.




Many thanks for your advice!





Best Regards

Timo



 Re: Re: [ovs-dev] [PATCH v6] db-ctl-base: add uuid specified method for create cmd> >This introduces duplicate code blocks into cmd_create(). Don't do that.
> We can't understand: do you mean that the row-uuid code block under if(id) is redundant ? Or we should add some additional code block ?

You added two copies of the following.

+            if (!uuid_from_string(&uuid_from_cmd, row_uuid)) {
+                ctl_error(ctx, "row-uuid '%s' is not a valid UUID", row_uuid);
+                return;
+            }


> >Please add a test that using an id before creating the record works with
> >--row-uuid. I do not think that it currently works.
> In patch v6 
> We have added a test in ovs-vsctl.at which is about --row-uuid after --id for 
> create cmd.

There is no test that uses an ID on a command *before* the "create"
command.  The documentation says this works.  Please test it.


More information about the dev mailing list