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

Ansis Atteka aatteka at nicira.com
Wed Apr 10 22:30:08 UTC 2013


On Wed, Apr 10, 2013 at 3:19 PM, Ben Pfaff <blp at nicira.com> wrote:

> 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.
>
> I don't have strong preference. Either way is fine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130410/557074c9/attachment-0003.html>


More information about the dev mailing list