Project

General

Profile

Bug #10493

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

Added by Nicolas CHARLES 6 months ago. Updated 4 months ago.

Status:
Released
Priority:
N/A
Category:
-
Target version:
Target version (plugin):
Severity:
Major - prevents use of part of Rudder | no simple workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
53

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.

Associated revisions

Revision b125170e
Added by Alexis MOUSSET 5 months ago

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

History

#1 Updated by Nicolas CHARLES 6 months ago

happens also on centos6

#2 Updated by François ARMAND 6 months 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?

#3 Updated by Benoît PECCATTE 6 months ago

  • Priority set to 54

#4 Updated by François ARMAND 6 months 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

#5 Updated by François ARMAND 6 months ago

  • Description updated (diff)

#6 Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 3.1.19 to 3.1.20

#7 Updated by Jonathan CLARKE 5 months ago

  • Assignee deleted (Alexis MOUSSET)

#8 Updated by Alexis MOUSSET 5 months ago

We can try to restart cf-serverd if reload fails.

#9 Updated by Alexis MOUSSET 5 months ago

  • Status changed from New to In progress
  • Assignee set to Alexis MOUSSET

#10 Updated by Alexis MOUSSET 5 months 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

#11 Updated by Alexis MOUSSET 5 months ago

  • Status changed from Pending technical review to Pending release

#12 Updated by Vincent MEMBRÉ 4 months ago

  • Status changed from Pending release to Released
  • Priority changed from 54 to 53

This bug has been fixed in Rudder 3.1.20, 4.0.5 and 4.1.2 which were released today.

Also available in: Atom PDF