Project

General

Profile

Actions

Bug #10493

closed

If cf-serverd is not up, hook 50-reload-policy-file-server is in error and breaks policy generation

Added by Nicolas CHARLES over 7 years ago. Updated over 7 years ago.

Status:
Released
Priority:
N/A
Category:
-
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
53
Name check:
Fix check:
Regression:

Description

After running rudder-init, I got a policy error generation on debian 7

 Policy update error for process '2' at 2017-03-23 12:14:03
⇨ Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-finished/50-reload-policy-file-server' with environment variables: [PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/cfengine/bin:/opt/rudder/bin] [NLSPATH:/usr/dt/lib/nls/msg/%L/%N.cat] [OLDPWD:/opt/rudder/jetty7] [TERM:xterm] [XFILESEARCHPATH:/usr/dt/app-defaults/%L/Dt] [PWD:/opt/rudder/jetty7] [SHLVL:2] [_:/sbin/start-stop-daemon] [RUDDER_GENERATION_DATETIME:2017-03-23T12:14:02.985Z] [RUDDER_END_GENERATION_DATETIME:2017-03-23T12:14:03.238Z] [RUDDER_NODEIDS:] [RUDDER_NUMBER_NODES_UPDATED:0] [RUDDER_ROOT_POLICY_SERVER_UPDATED:1]. Stdout: '/usr/bin/killall ' Stderr: 'cf-serverd: no process found '

Cause is: cf-serverd was not running right at this moment

/opt/rudder/bin/rudder-reload-cf-serverd should not fail if cf-serverd is not running (and should not ouput /usr/bin/killall ), and should start cf-serverd if it couldn't send signal -1

EDIT: on SLES12, the message is a little different, because the machine doesn't have killall and so "kill -1 $(pidof cf-serverd 2>/dev/null)" fails:

[2017-03-29 12:53:24] ERROR com.normation.rudder.batch.AsyncDeploymentAgent - Policy update error for process '2' at 2017-03-29 12:53:24: Exit code=1 for hook: '/opt/rudder/etc/hooks.d/policy-generation-finished/50-reload-policy-file-server' with environment variables: [PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin] [NLSPATH:/usr/dt/lib/nls/msg/%L/%N.cat] [OLDPWD:/] [XFILESEARCHPATH:/usr/dt/app-defaults/%L/Dt] [PWD:/opt/rudder/jetty7] [SHLVL:1] [_:/usr/bin/java] [XDG_SESSION_CLASS:service] [RUDDER_GENERATION_DATETIME:2017-03-29T12:53:23.851Z] [RUDDER_END_GENERATION_DATETIME:2017-03-29T12:53:24.200Z] [RUDDER_NODEIDS:] [RUDDER_NUMBER_NODES_UPDATED:0] [RUDDER_ROOT_POLICY_SERVER_UPDATED:1].
  Stdout: ''
  Stderr: 'which: no killall in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
'

But it is also due to the fact that "/opt/rudder/bin/rudder-reload-cf-serverd" failed because cf-serverd was not up at the moment.


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #11824: reload-cf-serverd fails if cf-serverd not running and /sbin not in PATHReleasedBenoît PECCATTEActions
Actions

Also available in: Atom PDF