[ovs-dev] [bug15983 2/4] ovsdb-server: Add commands for adding and removing remotes at runtime.

Ben Pfaff blp at nicira.com
Wed Apr 10 22:19:50 UTC 2013


On Wed, Apr 10, 2013 at 12:25:14PM -0700, Ansis Atteka wrote:
> On Wed, Apr 10, 2013 at 10:35 AM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > This will make it possible, in later commits, to make ovsdb-server connect
> > to OVS managers only after ovs-vswitchd has completed its initial
> > configuration.
> >
> > Signed-off-by: Ben Pfaff <blp at nicira.com>

[...]

> > +static void
> > +ovsdb_server_add_remote(struct unixctl_conn *conn, int argc OVS_UNUSED,
> > +                        const char *argv[], void *remotes_)
> > +{
> > +    struct sset *remotes = remotes_;
> > +
> > +    sset_add(remotes, argv[1]);
> >
> +    unixctl_command_reply(conn, NULL);
> >
> sset_add() would return NULL, if item was already present in sset. Perhaps
> unixctl_command_reply() should pass a warning to caller in this case (e.g.
> "remote already present")?

I don't think it's really a problem if the remote's already there.  In
particular, it's slightly better in the use case in this series if
adding a remote is idempotent.

Unless you feel strongly, I'm going to leave this as-is.

Thanks,

Ben.



More information about the dev mailing list