Message ID | 20220613185922.2700748-2-ihrachys@redhat.com |
---|---|
State | Superseded, archived |
Headers | show |
Series | [ovs-dev,1/2] Fix pidfile_is_running when $cmd is not passed | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | warning | apply and check: warning |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
ovsrobot/github-robot-_ovn-kubernetes | success | github build: passed |
Bleep bloop. Greetings Ihar Hrachyshka, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: Line is 120 characters long (recommended limit is 79) #20 FILE: utilities/ovn-ctl:46: test [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z "$cmd" -o pid_comm_check "$cmd" "$pid" ] Lines checked: 26, Warnings: 1, Errors: 0 Please check this out. If you feel there has been an error, please email aconole@redhat.com Thanks, 0-day Robot
On Mon, Jun 13, 2022 at 3:00 PM Ihar Hrachyshka <ihrachys@redhat.com> wrote: > > Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com> With this patch I also applied, I see the below error /usr/share/ovn/scripts/ovn-ctl: line 53: test: syntax error: `-s' unexpected I think it should be - test -s "$pidfile" && .... Thanks Numan > --- > utilities/ovn-ctl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl > index 46cbac4c2..5d74b48ed 100755 > --- a/utilities/ovn-ctl > +++ b/utilities/ovn-ctl > @@ -43,7 +43,7 @@ ovn_ic_db_conf_file="$ovn_etcdir/ovn-ic-db-params.conf" > pidfile_is_running () { > pidfile=$1 > cmd=$2 > - test -e "$pidfile" && [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z "$cmd" -o pid_comm_check "$cmd" "$pid" ] > + test [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z "$cmd" -o pid_comm_check "$cmd" "$pid" ] > } >/dev/null 2>&1 > > stop_nb_ovsdb() { > -- > 2.34.1 > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
Hi, sorry for that, I didn't really test it with -fake-multinode before. Sent v2 with a simplified version of the function that I tested with -fake-multinode now and no longer experience the issue you reported. Ihar On Mon, Jun 13, 2022 at 5:01 PM Numan Siddique <numans@ovn.org> wrote: > > On Mon, Jun 13, 2022 at 3:00 PM Ihar Hrachyshka <ihrachys@redhat.com> wrote: > > > > Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com> > > With this patch I also applied, I see the below error > > /usr/share/ovn/scripts/ovn-ctl: line 53: test: syntax error: `-s' unexpected > > I think it should be - test -s "$pidfile" && .... > > > Thanks > Numan > > > --- > > utilities/ovn-ctl | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl > > index 46cbac4c2..5d74b48ed 100755 > > --- a/utilities/ovn-ctl > > +++ b/utilities/ovn-ctl > > @@ -43,7 +43,7 @@ ovn_ic_db_conf_file="$ovn_etcdir/ovn-ic-db-params.conf" > > pidfile_is_running () { > > pidfile=$1 > > cmd=$2 > > - test -e "$pidfile" && [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z "$cmd" -o pid_comm_check "$cmd" "$pid" ] > > + test [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z "$cmd" -o pid_comm_check "$cmd" "$pid" ] > > } >/dev/null 2>&1 > > > > stop_nb_ovsdb() { > > -- > > 2.34.1 > > > > _______________________________________________ > > dev mailing list > > dev@openvswitch.org > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > >
diff --git a/utilities/ovn-ctl b/utilities/ovn-ctl index 46cbac4c2..5d74b48ed 100755 --- a/utilities/ovn-ctl +++ b/utilities/ovn-ctl @@ -43,7 +43,7 @@ ovn_ic_db_conf_file="$ovn_etcdir/ovn-ic-db-params.conf" pidfile_is_running () { pidfile=$1 cmd=$2 - test -e "$pidfile" && [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z "$cmd" -o pid_comm_check "$cmd" "$pid" ] + test [ -s "$pidfile" ] && pid=`cat "$pidfile"` && pid_exists "$pid" && [ -z "$cmd" -o pid_comm_check "$cmd" "$pid" ] } >/dev/null 2>&1 stop_nb_ovsdb() {
Signed-off-by: Ihar Hrachyshka <ihrachys@redhat.com> --- utilities/ovn-ctl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)