diff mbox series

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

Message ID 20191028143415.24981-1-numans@ovn.org
State Accepted
Headers show
Series [ovs-dev,ovn] ovndb-servers.ocf: Change from 'openvswitch' to 'ovn' in default vars. | expand

Commit Message

Numan Siddique Oct. 28, 2019, 2:34 p.m. UTC
From: Numan Siddique <numans@ovn.org>

CC: Aliasgar Ginwala <aginwala@ebay.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
---
 utilities/ovndb-servers.ocf | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comments

Li,Rongqing via dev Oct. 28, 2019, 5:04 p.m. UTC | #1
Thanks Numan.

Acked-by: Aliasgar Ginwala <aginwala@ebay.com<mailto:numans@ovn.org>>
Ben Pfaff Oct. 28, 2019, 5:25 p.m. UTC | #2
On Mon, Oct 28, 2019 at 08:04:15PM +0530, numans@ovn.org wrote:
> From: Numan Siddique <numans@ovn.org>
> 
> CC: Aliasgar Ginwala <aginwala@ebay.com>
> Signed-off-by: Numan Siddique <numans@ovn.org>

Should we introduce something into the distro packaging, at the same
time, to migrate from the old to the new locations automatically?
Ben Pfaff Oct. 28, 2019, 5:26 p.m. UTC | #3
On Mon, Oct 28, 2019 at 10:25:34AM -0700, Ben Pfaff wrote:
> On Mon, Oct 28, 2019 at 08:04:15PM +0530, numans@ovn.org wrote:
> > From: Numan Siddique <numans@ovn.org>
> > 
> > CC: Aliasgar Ginwala <aginwala@ebay.com>
> > Signed-off-by: Numan Siddique <numans@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?
Numan Siddique Oct. 29, 2019, 8:01 a.m. UTC | #4
On Mon, Oct 28, 2019 at 10:57 PM Ben Pfaff <blp@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@ovn.org wrote:
> > > From: Numan Siddique <numans@ovn.org>
> > >
> > > CC: Aliasgar Ginwala <aginwala@ebay.com>
> > > Signed-off-by: Numan Siddique <numans@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.

Thanks
Numan


> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Numan Siddique Oct. 29, 2019, 8:47 a.m. UTC | #5
On Tue, Oct 29, 2019 at 1:31 PM Numan Siddique <numans@ovn.org> wrote:
>
> On Mon, Oct 28, 2019 at 10:57 PM Ben Pfaff <blp@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@ovn.org wrote:
> > > > From: Numan Siddique <numans@ovn.org>
> > > >
> > > > CC: Aliasgar Ginwala <aginwala@ebay.com>
> > > > Signed-off-by: Numan Siddique <numans@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@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox series

Patch

diff --git a/utilities/ovndb-servers.ocf b/utilities/ovndb-servers.ocf
index cd4742668..5fe7849ab 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"}
@@ -10,12 +10,12 @@ 
 : ${MANAGE_NORTHD_DEFAULT="no"}
 : ${INACTIVE_PROBE_DEFAULT="5000"}
 : ${LISTEN_ON_MASTER_IP_ONLY_DEFAULT="yes"}
-: ${NB_SSL_KEY_DEFAULT="/etc/openvswitch/ovnnb-privkey.pem"}
-: ${NB_SSL_CERT_DEFAULT="/etc/openvswitch/ovnnb-cert.pem"}
-: ${NB_SSL_CACERT_DEFAULT="/etc/openvswitch/cacert.pem"}
-: ${SB_SSL_KEY_DEFAULT="/etc/openvswitch/ovnsb-privkey.pem"}
-: ${SB_SSL_CERT_DEFAULT="/etc/openvswitch/ovnsb-cert.pem"}
-: ${SB_SSL_CACERT_DEFAULT="/etc/openvswitch/cacert.pem"}
+: ${NB_SSL_KEY_DEFAULT="/etc/ovn/ovnnb-privkey.pem"}
+: ${NB_SSL_CERT_DEFAULT="/etc/ovn/ovnnb-cert.pem"}
+: ${NB_SSL_CACERT_DEFAULT="/etc/ovn/cacert.pem"}
+: ${SB_SSL_KEY_DEFAULT="/etc/ovn/ovnsb-privkey.pem"}
+: ${SB_SSL_CERT_DEFAULT="/etc/ovn/ovnsb-cert.pem"}
+: ${SB_SSL_CACERT_DEFAULT="/etc/ovn/cacert.pem"}
 
 CRM_MASTER="${HA_SBIN_DIR}/crm_master -l reboot"
 CRM_ATTR_REPL_INFO="${HA_SBIN_DIR}/crm_attribute --type crm_config --name OVN_REPL_INFO -s ovn_ovsdb_master_server"