You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jiří Pejchal (JIRA)" <ji...@apache.org> on 2016/11/15 14:26:59 UTC

[jira] [Updated] (SOLR-9769) solr stop on a service already stopped should return exit code 0

     [ https://issues.apache.org/jira/browse/SOLR-9769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jiří Pejchal updated SOLR-9769:
-------------------------------
    Description: 
According to the LSB specification
https://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT
 running stop on a service already stopped or not running should be considered successful and return code should be 0 (zero).

Solr currently returns exit code 1:
{code}
$ /etc/init.d/solr stop; echo $?
Sending stop command to Solr running on port 8983 ... waiting up to 180 seconds to allow Jetty process 4277 to stop gracefully.
0
$ /etc/init.d/solr stop; echo $?
No process found for Solr node running on port 8983
1
{code}

{code:title="bin/solr"}
if [ "$SOLR_PID" != "" ]; then
    stop_solr "$SOLR_SERVER_DIR" "$SOLR_PORT" "$STOP_KEY" "$SOLR_PID"
  else
    if [ "$SCRIPT_CMD" == "stop" ]; then
      echo -e "No process found for Solr node running on port $SOLR_PORT"
      exit 1
    fi
  fi

{code}

  was:
According to the LSB specification
https://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT
 running stop on a service already stopped or not running should be considered successful and return code should be 0 (zero).

Solr currently returns exit code 1:
{code}
$ /etc/init.d/solr stop; echo $?
Sending stop command to Solr running on port 8983 ... waiting up to 180 seconds to allow Jetty process 4277 to stop gracefully.
0
$ /etc/init.d/solr stop; echo $?
No process found for Solr node running on port 8983
1
{code}


> solr stop on a service already stopped should return exit code 0
> ----------------------------------------------------------------
>
>                 Key: SOLR-9769
>                 URL: https://issues.apache.org/jira/browse/SOLR-9769
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: scripts and tools
>    Affects Versions: 6.3
>            Reporter: Jiří Pejchal
>
> According to the LSB specification
> https://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT
>  running stop on a service already stopped or not running should be considered successful and return code should be 0 (zero).
> Solr currently returns exit code 1:
> {code}
> $ /etc/init.d/solr stop; echo $?
> Sending stop command to Solr running on port 8983 ... waiting up to 180 seconds to allow Jetty process 4277 to stop gracefully.
> 0
> $ /etc/init.d/solr stop; echo $?
> No process found for Solr node running on port 8983
> 1
> {code}
> {code:title="bin/solr"}
> if [ "$SOLR_PID" != "" ]; then
>     stop_solr "$SOLR_SERVER_DIR" "$SOLR_PORT" "$STOP_KEY" "$SOLR_PID"
>   else
>     if [ "$SCRIPT_CMD" == "stop" ]; then
>       echo -e "No process found for Solr node running on port $SOLR_PORT"
>       exit 1
>     fi
>   fi
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org