You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dominik Siebel (JIRA)" <ji...@apache.org> on 2015/11/23 17:28:12 UTC

[jira] [Comment Edited] (SOLR-7169) init.d status command has incorrect return value

    [ https://issues.apache.org/jira/browse/SOLR-7169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15022394#comment-15022394 ] 

Dominik Siebel edited comment on SOLR-7169 at 11/23/15 4:28 PM:
----------------------------------------------------------------

New patch: https://github.com/apache/lucene-solr/pull/212.patch

I threw away all previous changes and combined everything into one commit.
The subshell problem seems to be solved but there is still on minor issue remaining:
If there are running Solr instances the return value of {{get_info}} will always be the return value of the last {{run_tool status}} call since all available pid files / running processes are processed in a loop.
This is fine for single-node setups but might lead to side effects on multi-node setups (multiple instances / services running on one machine).


was (Author: dsiebel):
New patch: https://github.com/apache/lucene-solr/pull/212.patch

I threw away all previous changes and combined everything into one commit.
The subshell problem seems to be solved but there is still on minor issue remaining:
If there are running Solr instances the return value of {{get_info}} will always be the outcome of the last call to {{run_tool status}} since all pid files / running processes are processed in a loop.
This is fine for single-node setups but might lead to side effects on multi-node setups (multiple instances / services running on one machine).

> init.d status command has incorrect return value
> ------------------------------------------------
>
>                 Key: SOLR-7169
>                 URL: https://issues.apache.org/jira/browse/SOLR-7169
>             Project: Solr
>          Issue Type: Bug
>          Components: scripts and tools
>    Affects Versions: 5.0
>         Environment: Debian stable
>            Reporter: Martin Skøtt
>            Assignee: Timothy Potter
>
> {{/etc/init.d/solr status}} returns 0 if Solr is not running, but according to the LSB 0 means that the service is running (http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html).
> In my situation this causes problems when managing the service with Puppet which uses the status command to determine if a service should be started. Puppet simply doesn't start the service because it thinks its already running. Any other script depending on the result of the status command will suffer similar problems.
> Workaround for other Puppet users:
> Setting {{hasstatus => false}} and {{pattern => "solr.solr.home"}} in the service definition works for me.



--
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