Project

General

Profile

Bug #11824

reload-cf-serverd fails if cf-serverd not running and /sbin not in PATH

Added by Janos Mattyasovszky about 1 year ago. Updated 8 months ago.

Status:
Released
Priority:
N/A
Category:
Server components
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Operational - other Techniques | Technique editor | Rudder settings
Effort required:
Small
Priority:
46
Tags:

Description

This commit introduced the reload by service restart:

https://github.com/Normation/rudder-packages/commit/b125170ec4d5b3a045f49f6f16d0a104f507b291#diff-c139a8d70dc00277a044a7762c1cde87

But apparently /sbin is not in the PATH for (at least our) SLES systems.

Policy update process was stopped due to an error:

⇨ Policy update error for process '751' at 2017-12-05 14:29:33 
⇨ Exit code=-2147483648 for hook: '/opt/rudder/etc/hooks.d/policy-generation-finished/50-reload-policy-file-server'.
stdout: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:.

stderr: 'kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
/opt/rudder/bin/rudder-reload-cf-serverd: line 15: service: command not found

stdout currently shows echo $PATH being executed, and that lacks /sbin, so I suggest to either extend the PATH variable in the script or call it with full /sbin/service path...


Related issues

Related to Rudder - Bug #10493: If cf-serverd is not up, hook 50-reload-policy-file-server is in error and breaks policy generationReleased

Associated revisions

Revision 513b6108 (diff)
Added by Félix DALLIDET 9 months ago

Fixes #11824: reload-cf-serverd fails if cf-serverd not running and /sbin not in PATH

History

#1 Updated by Janos Mattyasovszky about 1 year ago

  • Related to Bug #10493: If cf-serverd is not up, hook 50-reload-policy-file-server is in error and breaks policy generation added

#2 Updated by Janos Mattyasovszky about 1 year ago

Confirmed: Fix by /sbin/service rudder-agent restart or export PATH=$PATH:/sbin fixes it.

#3 Updated by Benoît PECCATTE about 1 year ago

Almost all distribution have sbin in the PATH variable.
I tested on our sles 12 and it has /sbin in the PATH.
I don't think we should change this behaviour because service is not always in /sbin.
What is the rationale for not having /sbin in PATH for root ?

#4 Updated by Benoît PECCATTE 11 months ago

This script should be a "rudder agent reload" or so
The command run should be "rudder agent restart"
The generic solution should be to append /sbin to the PATH directly in the rudder command.

#5 Updated by Benoît PECCATTE 11 months ago

  • Target version set to 4.3.0~beta1
  • Effort required set to Small
  • Priority changed from 32 to 48

#6 Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 4.3.0~beta1 to 4.3.0~rc1
  • Priority changed from 48 to 47

#7 Updated by Vincent MEMBRÉ 9 months ago

  • Target version changed from 4.3.0~rc1 to 4.3.0~rc2
  • Priority changed from 47 to 46

#8 Updated by François ARMAND 9 months ago

  • Tags set to Blocking 4.3

We need to do that before final release, else it will need to slip to 4.4

#9 Updated by Benoît PECCATTE 9 months ago

  • Assignee set to Félix DALLIDET

#10 Updated by Félix DALLIDET 9 months ago

  • Status changed from New to In progress

#11 Updated by Félix DALLIDET 9 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Benoît PECCATTE
  • Pull Request set to https://github.com/Normation/rudder-agent/pull/171

#12 Updated by Félix DALLIDET 9 months ago

  • Status changed from Pending technical review to Pending release

#13 Updated by Vincent MEMBRÉ 8 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.3.0~rc2 which was released today.

Also available in: Atom PDF