[ovs-dev] [PATCH ovn] ovndb-servers.ocf: Change from 'openvswitch' to 'ovn' in default vars.

Numan Siddique numans at ovn.org
Tue Oct 29 08:47:03 UTC 2019


On Tue, Oct 29, 2019 at 1:31 PM Numan Siddique <numans at ovn.org> wrote:
>
> On Mon, Oct 28, 2019 at 10:57 PM Ben Pfaff <blp at ovn.org> wrote:
> >
> > On Mon, Oct 28, 2019 at 10:25:34AM -0700, Ben Pfaff wrote:
> > > On Mon, Oct 28, 2019 at 08:04:15PM +0530, numans at ovn.org wrote:
> > > > From: Numan Siddique <numans at ovn.org>
> > > >
> > > > CC: Aliasgar Ginwala <aginwala at ebay.com>
> > > > Signed-off-by: Numan Siddique <numans at ovn.org>
> > >
> > > Should we introduce something into the distro packaging, at the same
> > > time, to migrate from the old to the new locations automatically?
> >
> > Or, alternatively, should the script tolerate finding these in the old
> > location?
> >
> > Should we add something to the ovn upgrade guide talking about the
> > migration?
>
> I think we will have the same issue even for the ovn NB and SB dbs.
> The default path of OVN NB and
> SB dbs is - /etc/openvswitch before the split and after the split it
> is /etc/ovn.
>
> I agree that we should add upgrade guide taking about the migration. I
> will work on it.
>
> In this particular case, the default values are changed. And these
> values can always be overridden
> when starting or updating the pacemaker service like
>  - pcs resource create ovn-dbs ... ovn_nb_db_privkey=<NB_PRIV_KEY_PATH>  ...
>
> In the case of openstack tripleo, where OVN services are run as
> containers, we have to mount
> the host directories properly. If the host path -
> /var/lib/openvswitch/ovn is mounted as /etc/openvswitch
> inside the container, we need to also mount the same host path to
> /etc/ovn so that the upgrade to
> new OVN post split will be seamless.
>
> I thought that this can be handled in distro install scripts like
> creating a symbolic link, but this
> doesn't address the deployments which run ovn services inside containers.
>
> I think we can also enhance the ovn-ctl script to tolerate old
> locations. I will explore more on this.
>
> I will rework this patch to look into both the locations if the user
> has not set these variables when
> starting the service from pacemaker.

I went ahead and applied the below changes as it makes sense. Otherwise
pacemaker ovn resource will fail since it can't find ovn-ctl script in
the old path.

diff --git a/utilities/ovndb-servers.ocf b/utilities/ovndb-servers.ocf
index cd4742668..4678a1dc9 100755
--- a/utilities/ovndb-servers.ocf
+++ b/utilities/ovndb-servers.ocf
@@ -2,7 +2,7 @@

 : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
 . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
-: ${OVN_CTL_DEFAULT="/usr/share/openvswitch/scripts/ovn-ctl"}
+: ${OVN_CTL_DEFAULT="/usr/share/ovn/scripts/ovn-ctl"}
 : ${NB_MASTER_PORT_DEFAULT="6641"}
 : ${NB_MASTER_PROTO_DEFAULT="tcp"}
 : ${SB_MASTER_PORT_DEFAULT="6642"}


Thanks
Numan

>
> Thanks
> Numan
>
>
> > _______________________________________________
> > dev mailing list
> > dev at openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev


More information about the dev mailing list