[ovs-dev] [PATCH v3 2/2] ovsdb-idl: Exclude missing tables and columns in the transaction.

Numan Siddique numans at ovn.org
Tue Aug 24 14:48:05 UTC 2021


On Tue, Aug 24, 2021 at 7:31 AM Ilya Maximets <i.maximets at ovn.org> wrote:
>
> On 8/24/21 12:59 AM, numans at ovn.org wrote:
> > From: Numan Siddique <nusiddiq at redhat.com>
> >
> > In the cases where the C idl client is compiled with a newer schema
> > and the ovsdb-server is running with older schema, the IDL clients
> > can included tables or columns in the transaction which are missing
> > in the server schema.  ovsdb-server will reject the transaction,
> > but the IDL client keeps on trying the transaction resulting
> > in a continuous loop.  This patch fixes this issue.
> >
> > For the missing tables, the function ovsdb_idl_txn_insert() will now
> > return NULL.  The client should check for NULL before accessing the
> > row object.  For the missing columns, the columns are excluded from
> > the transaction object.
> This doesn't look safe, because none of existing clients are checking
> the return value of IDL wrapper functions and are using it right away.
>

Thanks for the review.  I had this concern too.

> Can we just fail the transaction before sending it to the server?
> Clients are required to check the transaction status.  Clients will
> need to check for existence of the certain columns before adding
> them to transactions though with the API from patch #1.

Either we can fail the transaction at the beginning or just not exclude
that table/column when sending the transaction.   Can you please
Let me know what would you prefer ?  I'll

I'd prefer the latter because if the clients can check the existence of
table/columns, then probably they won't even be included in the
transaction in the first place.   Also by checking the status, can the clients
know which table/column caused the failure ?   So probably it seems
better to me to just ignore such tables/columns from the transaction
just like how monitor request ignores such tables/columns.

Is it possible to consider the patch #1 (if it looks fine) please as
we need it urgently
to unblock an upgrade issue we have.  With that, ovn-controller can check
for the existence of a table and exclude it from the transaction.

I'll work on patch #2 meanwhile.

Thanks
Numan



>
> Best regards, Ilya Maximets.
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list