[ovs-dev] [PATCH] ovsdb-idl : Add APIs to query if a table and a column is present or not.
Numan Siddique
numans at ovn.org
Fri Aug 20 17:49:33 UTC 2021
On Fri, Aug 20, 2021 at 12:43 PM Ben Pfaff <blp at ovn.org> wrote:
>
> On Wed, Aug 18, 2021 at 08:42:47PM -0400, numans at ovn.org wrote:
> > From: Numan Siddique <nusiddiq at redhat.com>
> >
> > This patch adds 2 new APIs in the ovsdb-idl client library
> > - ovsdb_idl_has_table() and ovsdb_idl_has_column_in_table() to
> > query if a table and a column is present in the IDL or not. This
> > is required for scenarios where the server schema is old and
> > missing a table or column and the client (built with a new schema
> > version) does a transaction with the missing table or column. This
> > results in a continuous loop of transaction failures.
> >
> > OVN would require the API - ovsdb_idl_has_table() to address this issue
> > when an old ovsdb-server is used (OVS 2.11) which has the 'datapath'
> > table missing. A recent commit in OVN creates a 'datapath' row
> > in the local ovsdb-server. ovsdb_idl_has_column_in_table() would be
> > useful to have.
> >
> > Related issue: https://bugzilla.redhat.com/show_bug.cgi?id=1992705
> > Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
>
> In the OVN meeting, I suggested that this is a bug in the ovsdb_idl code
> for transactions: it shouldn't try to transact on a column that it knows
> doesn't exist. It might still make sense to add this API, though.
Thanks. I'll look into that and propose a patch for the transaction issue.
Meanwhile this is required in OVN so that ovn-controller can avoid creating
transactions for missing tables/columns.
So it would be great if this patch can be considered before I propose
the transaction patch.
Thanks
Numan
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
More information about the dev
mailing list