Bug #10493
closedIf cf-serverd is not up, hook 50-reload-policy-file-server is in error and breaks policy generation
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.
Updated by François ARMAND over 7 years ago
- Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
Does it starts to work at some point without any user interaction?
Updated by François ARMAND over 7 years ago
- Subject changed from After running rudder-init, error during policy deployment on Rudder 4.1 on Debian 7 to If cf-serverd is not up, hook 50-reload-policy-file-server is in error and breaks policy generation
- Description updated (diff)
I'm updating the title because it happens on other distribution than Debian 7, and can happen at other moment than after rudder-init.
Also, adding in the description the error message we are getting with SLES 12.1
Updated by Vincent MEMBRÉ over 7 years ago
- Target version changed from 3.1.19 to 3.1.20
Updated by Alexis Mousset over 7 years ago
We can try to restart cf-serverd if reload fails.
Updated by Alexis Mousset over 7 years ago
- Status changed from New to In progress
- Assignee set to Alexis Mousset
Updated by Alexis Mousset over 7 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from Alexis Mousset to Benoît PECCATTE
- Pull Request set to https://github.com/Normation/rudder-packages/pull/1340
Updated by Alexis Mousset over 7 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-packages|b125170ec4d5b3a045f49f6f16d0a104f507b291.
Updated by Vincent MEMBRÉ over 7 years ago
- Status changed from Pending release to Released
- Priority changed from 54 to 53
Updated by Janos Mattyasovszky almost 7 years ago
- Related to Bug #11824: reload-cf-serverd fails if cf-serverd not running and /sbin not in PATH added