Project

General

Profile

Actions

Bug #15697

closed

Command not found when running "rudder agent enable -s"

Added by Philip Seeger over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Reviewed
Fix check:
Checked
Regression:

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.

Actions #1

Updated by Philip Seeger over 4 years ago

  • Target version set to 5.0.14
Actions #2

Updated by Philip Seeger over 4 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.

Actions #3

Updated by Philip Seeger over 4 years ago

  • Pull Request set to https://github.com/Normation/rudder-agent/pull/248/commits/14076bd3d8032835cdf971c67aae032fe28dc8bb
Actions #4

Updated by Alexis Mousset over 4 years ago

  • Description updated (diff)
Actions #5

Updated by Benoît PECCATTE over 4 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 ?

Actions #6

Updated by Alexis Mousset over 4 years ago

  • Category set to Agent
  • Status changed from New to Pending technical review
  • Assignee set to Alexis Mousset
Actions #7

Updated by Philip Seeger over 4 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".

Actions #8

Updated by Benoît PECCATTE over 4 years ago

This error happens when the redmine token in the configuration file is not valid, I should replace this with an error message

Actions #9

Updated by Benoît PECCATTE over 4 years ago

rudder-dev stack trace fixed by #15699

Actions #10

Updated by Philip Seeger over 4 years ago

  • Status changed from Pending technical review to Pending release
Actions #11

Updated by Nicolas CHARLES over 4 years ago

  • Fix check changed from To do to Checked
Actions #12

Updated by Alexis Mousset over 4 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
Actions #13

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.14 which was released today.

Actions

Also available in: Atom PDF