Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7169

init.d status command has incorrect return value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.4
    • Component/s: scripts and tools
    • Labels:
      None
    • Environment:

      Debian stable

      Description

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                thelabdude Timothy Potter
                Reporter:
                ms@addwish.com Martin Skøtt
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: