[ovs-dev] [PATCH] ovs-lib: Fix call exit ovs-vswitchd and ovsdb-server failure

wangyunjian wangyunjian at huawei.com
Mon Jan 11 13:43:26 UTC 2021


> -----Original Message-----
> From: Ilya Maximets [mailto:i.maximets at ovn.org]
> Sent: Monday, January 11, 2021 7:07 PM
> To: wangyunjian <wangyunjian at huawei.com>; dev at openvswitch.org
> Cc: i.maximets at ovn.org; mmichels at redhat.com; Lilijun (Jerry)
> <jerry.lilijun at huawei.com>; xudingke <xudingke at huawei.com>; chenchanghu
> <chenchanghu at huawei.com>
> Subject: Re: [ovs-dev] [PATCH] ovs-lib: Fix call exit ovs-vswitchd and
> ovsdb-server failure
> 
> On 12/19/20 12:07 PM, wangyunjian wrote:
> > From: Yunjian Wang <wangyunjian at huawei.com>
> >
> > The ovn-controller need --restart argument. But ovs-vswitchd and
> > ovsdb-server don't need argument. This also lead to exit failure.
> >
> > Fixes: 7491caa37f3b ("ovn: Modify restart_controller in ovn-ctl to use
> > --restart")
> > Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
> > ---
> >  utilities/ovs-lib.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/utilities/ovs-lib.in b/utilities/ovs-lib.in index
> > f7e975674..ab38ece45 100644
> > --- a/utilities/ovs-lib.in
> > +++ b/utilities/ovs-lib.in
> > @@ -273,7 +273,7 @@ stop_daemon () {
> >                  case $action in
> >                      EXIT)
> >                          action "Exiting $1 ($pid)" \
> > -                            ${bindir}/ovs-appctl -T 1 -t
> $rundir/$1.$pid.ctl exit $2
> > +                            ${bindir}/ovs-appctl -T 1 -t
> > + $rundir/$1.$pid.ctl exit
> >                          # The above command could have resulted in
> delayed
> >                          # daemon segfault. And if a monitor is running,
> it
> >                          # would restart the daemon giving it a new
> pid.
> >
> 
> OVN still uses this function, so we can't just remove the argument.

After patch "05bf1dbb98b06 ovn: Remove remaining pieces."
remove the OVN code. So we start OVN services using ovn-ctl.

> In OVS scripts I see no invocations of stop_daemon() where we have a second
> argument, so there should be no issues.
> What exactly the problem you have while calling this function for OVS
> processes?

I made a mistake. I used ovs-2.12. And the ovs-vswitchd stop_daemon does
not support two parameters leading to a failure. The new version support two
parameters.

Thanks,
Yunjian

> 
> Best regards, Ilya Maximets.


More information about the dev mailing list