[ovs-dev] [PATCH] ovn-ctl: Fix the wrong pidfile argument passed to ovsdb-servers

Numan Siddique nusiddiq at redhat.com
Fri Oct 12 00:32:27 UTC 2018


On Fri, Oct 12, 2018, 2:46 AM Ben Pfaff <blp at ovn.org> wrote:

> On Tue, Oct 09, 2018 at 12:47:11PM +0530, nusiddiq at redhat.com wrote:
> > From: Numan Siddique <nusiddiq at redhat.com>
> >
> > When OVN db servers are started usinb ovn-ctl, if the pid files
> > (/var/run/openvswitch/ovnnb_db.pid for example) are already
> > present, then ovn-ctl passes "--pidfile=123" if the pid file has
> > '123' stored in it. Later on when OVN pacemaker RA script calls
> > status_ovnnb/status_ovnsb() functions, these returns "not running".
> >
> > The shell function 'pidfile_is_running()' stores the contents of
> > the pid file as  "pid=`cat "$pidfile"`". If the caller also
> > uses the same variable "pid" to store the file name, it gets
> > overriden.
> >
> > This patch fixes this issue by renaming the local variable "pid"
> > in the "start_ovsdb__()" shell function to "db_file_name".
> >
> > Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
>
> Thanks, applied to master.
>
> It would probably be a good idea to more consistently use "local".
> Using it for $pidfile and $pid in pidfile_is_running would have avoided
> this problem


Thanks for the review. Agree.
Is it possible to backport to 2.10 and 2.9 ? The issue is seen both the
branches.

Thanks
Numan

.
>


More information about the dev mailing list