Skip to content

RedHat 6 Service Manifest problem #243

@rigareau

Description

@rigareau

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 2017.3.4
  • Ruby: Any
  • Distribution: RedHat 6.9
  • Module version:3.3.0 - 3.4.1

How to reproduce (e.g Puppet code you use)

Install eazybi and configure tu run an external process to execute the reports.

Or for development and testing purposes you can just look at a log file while being logged in with the userid that is executing jira.
sudo -iu jira
tail -f /home/jira/logs/atlassian-jira.log

Either of theses actions will create a process that is matched by the pgrep expression that is used to detect if the service is running and will throw an error because there is more than 1 process id matching.

What are you seeing

When I ask the Jira service for a status it produce the following error.
$>service jira status
/etc/init.d/jira: line 66: [: too many arguments
jira is stopped

What behaviour did you expect instead

service jira status
jira is running

Output log

$>service jira status
/etc/init.d/jira: line 66: [: too many arguments
jira is stopped

Any additional information you'd like to impart

Replace service status test to use the catalina.pid content just as in the redhat 7 service unit file.

function status() {

STATUS=$( pgrep -F <%= scope.lookupvar('jira::webappdir') %>/work/catalina.pid ) || STATUS=0
if [ $STATUS -ne 0 ];then
echo "$SERVICE is running"
return 0
else
echo "$SERVICE is stopped"
return 1
fi

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions