On Tue, Feb 16, 2016 at 11:51:44AM -0500, Lance Richardson wrote:
> A common error scenario with OVN is to attempt to use ovn-nbctl when
> the OVN databases have not been created in ovsdb-server:
>    1. ovn-nbctl sends a "get_schema" request for the OVN db to ovsdb-server.
>    2. ovsdb-server fails to find requested db, sends error response
>       to ovn-nbctl.
>    3. ovn-nbctl receives the error response in ovsdb_idl_run(), but
>       takes no specific action.
>    4. ovn-nbctl hangs forever in IDL_S_SCHEMA_REQUESTED state (assuming
>       a timeout wasn't requested on the command line).
> 
> This commit adds a new IDL state, IDL_S_NO_SCHEMA, which is entered
> when a negative response to a schema request is received. When in
> this state, ovsdb_idl_is_alive() now returns 'false', allowing clients
> (currently ovn-nbctl, ovn-sbctl, vtep-ctl, and ovs-vsctl) to detect this
> condition and exit with an appropriate error message.
> 
> Signed-off-by: Lance Richardson <lrich...@redhat.com>

Thanks for the patch.

This makes a significant change to the semantics of
ovsdb_idl_get_last_error().  Previously, this function returned the last
error encountered on a connection, regardless of whether the connection
is currently alive.  After this patch, it returns 0 if the connection is
currently alive.  I don't think this is a good change; it should still
return the last error.

To conform with OVS style, please put {} around 1-statement blocks.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to