Bug #15697
closedCommand not found when running "rudder agent enable -s"
Description
Rudder fails to re-enable and start the agent in some cases.
# rudder agent enable -s
/opt/rudder/share/commands/../lib/common.sh: line 44: service: command not found
Bug #1: The systemd detection fails:
# systemctl list-units --type service --all ${service}.service 2>&1 | grep -q "^${service}.service"; echo $?
1
# systemctl list-units --type service --all ${service}.service 2>&1
UNIT LOAD ACTIVE SUB DESCRIPTION
● rudder.service loaded failed failed LSB: Rudder server
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
Bug #2: The "service" compatibility wrapper is detected but not executed.
Updated by Philip Seeger about 5 years ago
As for #2:
# $SSH $HOST rudder agent start /opt/rudder/share/commands/../lib/common.sh: line 46: service: command not found error: start service rudder-agent failed # $SSH $HOST PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin rudder agent start ok: start service rudder-agent succeeded
I was going to use your rudder-dev script to provide a fix but it keeps failing atm.
Updated by Philip Seeger about 5 years ago
- Pull Request set to https://github.com/Normation/rudder-agent/pull/248/commits/14076bd3d8032835cdf971c67aae032fe28dc8bb
Updated by Benoît PECCATTE about 5 years ago
I was going to use your rudder-dev script to provide a fix but it keeps failing atm.
I'm interested in the failure, I'm willing to fix it.
Can you tell me more about the problem ?
Updated by Alexis Mousset about 5 years ago
- Category set to Agent
- Status changed from New to Pending technical review
- Assignee set to Alexis Mousset
Updated by Philip Seeger about 5 years ago
Hi Benoît. I should note that I haven't used that script previously, so it's likely that I'm using it wrong. After installing some missing dependencies and completing the config file, the branch command failed with a backtrace and (I believe; haven't saved the output) "No JSON object could be decoded".
Updated by Benoît PECCATTE about 5 years ago
This error happens when the redmine token in the configuration file is not valid, I should replace this with an error message
Updated by Benoît PECCATTE about 5 years ago
rudder-dev stack trace fixed by #15699
Updated by Philip Seeger about 5 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-agent|e939b70fe53b504737668ee32e72d43a3ea542f4.
Updated by Nicolas CHARLES about 5 years ago
- Fix check changed from To do to Checked
Updated by Alexis Mousset about 5 years ago
- Subject changed from rudder agent enable -s: /opt/rudder/share/commands/../lib/common.sh: line 44: service: command not found to Command not found when running "rudder agent enable -s"
- Name check changed from To do to Reviewed
Updated by Vincent MEMBRÉ about 5 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.14 which was released today.