[ovs-dev] [PATCH v2] ovs-vsctl: add command to delete transient ports from bridge
Thadeu Lima de Souza Cascardo
cascardo at redhat.com
Tue Sep 1 20:07:26 UTC 2015
On Fri, Aug 28, 2015 at 04:13:05PM -0700, Ben Pfaff wrote:
> On Fri, Aug 28, 2015 at 04:31:40PM -0300, Thadeu Lima de Souza Cascardo wrote:
> > When using virtualization, new ports are created and removed all the time. These
> > ports do not persist after a system reboot, for example. They may be created
> > again by the virtualization manager, but that will happen after the vswitch is
> > already running, and the virtualization manager will add them again to the
> > bridge.
> >
> > If a reboot happens without properly deleting such ports, all kinds of errors
> > will happen. The absence of the ports will be logged as errors, and adding those
> > ports again to the database will fail.
> >
> > This patch introduces the notion of transient ports. Ports may be added as
> > transient, as a boolean in other_config smap. When openvswitch is restarted by
> > using --delete-transient-ports ovs-ctl option, all transient ports will be
> > removed. If the system administrator wants to remove all transient ports from a
> > bridge, a new ovs-vsctl command, del-transient-ports may be used.
> >
> > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo at redhat.com>
>
> Do you think that it's worth having a special command for this, versus
> e.g.
>
> for port in `ovs-vsctl --bare -- --columns=name find port other-config:transient=true`; do
> ovs_vsctl -- del-port "$port"
> done
The patch has evolved from code inside the bridge (which would not work), and,
though doing something like this has crossed my mind, I ended up reusing the
code I've written in ovs-vsctl, and from there, it was greatly simplified.
I will send a v3 wrapping this up on a shell function. I don't think there is
any need for a special command as of now. We can go back to it, if such a reason
appears.
Thanks.
Cascardo.
More information about the dev
mailing list