Appdynamics / Appdynamics/appdynamics-cookbooks

RHEL6: Machine Agent - daemon() function not in /lib/lsb/init-functions

Open
#87 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
28
Forks
35
PR merge metrics
No merged PRs in 30d

Description

Hello

The init script of /etc/init.d/appdynamics_machine_agent sources different init functions. On RHEL 6 the daemon() function in /lib/lsb/init-functions is not present. Instead its called start_daemon().

```
# grep daemon /lib/lsb/init-functions
start_daemon () {
/etc/redhat-lsb/lsb_start_daemon "$@"
```

This leads to a problem using the init script:

```
# bash -x /etc/init.d/appdynamics_machine_agent start
+ '[' -r /lib/lsb/init-functions ']'
+ . /lib/lsb/init-functions
+ INSTALL_DIR=/opt/appdynamics/machineagent
+ RETVAL=0
+ PROG=/opt/appdynamics/machineagent/run.sh
+ pid_file=/var/run/appdynamics_machine_agent.pid
+ case "$1" in
+ start
+ echo -n 'Starting AppDynamics machine agent:'
Starting AppDynamics machine agent:+ daemon --pidfile=/var/run/appdynamics_machine_agent.pid /opt/appdynamics/machineagent/run.sh
/etc/init.d/appdynamics_machine_agent: line 25: daemon: command not found
+ RETVAL=127
+ echo

+ exit 127
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect the repository's init script corresponding to /etc/init.d/appdynamics_machine_agent, then compare its daemon call with the RHEL 6 definitions in /lib/lsb/init-functions. Reproduce the reported /etc/init.d/appdynamics_machine_agent start command and verify that the service starts without the command-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
devops, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.