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 almost 8 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 #1

Updated by Nicolas CHARLES almost 8 years ago

happens also on centos6

Actions #2

Updated by François ARMAND almost 8 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?

Actions #3

Updated by Benoît PECCATTE over 7 years ago

  • Priority set to 54
Actions #4

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

Actions #5

Updated by François ARMAND over 7 years ago

  • Description updated (diff)
Actions #6

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #7

Updated by Jonathan CLARKE over 7 years ago

  • Assignee deleted (Alexis Mousset)
Actions #8

Updated by Alexis Mousset over 7 years ago

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

Actions #9

Updated by Alexis Mousset over 7 years ago

  • Status changed from New to In progress
  • Assignee set to Alexis Mousset
Actions #10

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
Actions #11

Updated by Alexis Mousset over 7 years ago

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

Updated by Vincent MEMBRÉ over 7 years 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.

Actions #13

Updated by Janos Mattyasovszky about 7 years ago

  • Related to Bug #11824: reload-cf-serverd fails if cf-serverd not running and /sbin not in PATH added
Actions

Also available in: Atom PDF