Project

General

Profile

Actions

Bug #10607

closed

rudder-init doesn't use fully qualified path for executing cf-agent

Added by Nicolas CHARLES about 7 years ago. Updated almost 7 years ago.

Status:
Released
Priority:
N/A
Category:
Packaging
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Very Small
Priority:
43
Name check:
Fix check:
Regression:

Description

After installing a SLES12 server, I didn't have any reports (and it didn't self healed)
Logs says:

2017-04-13T14:55:08.132943+00:00 server rsyslogd: [origin software="rsyslogd" swVersion="8.4.0" x-pid="8370" x-info="http://www.rsyslog.com"] exiting on signal 15.
2017-04-13T14:55:08.149358+00:00 server rsyslogd: [origin software="rsyslogd" swVersion="8.4.0" x-pid="17132" x-info="http://www.rsyslog.com"] start
2017-04-13T14:55:08.148223+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:55:08.148247+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:55:08.148252+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:55:08.148258+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:55:08.253432+00:00 server rsyslogd: db error (1): no connection to the server  
2017-04-13T14:55:08.265762+00:00 server rsyslogd-2007: action 'action 3' suspended, next retry is Thu Apr 13 14:55:38 2017 [try http://www.rsyslog.com/e/2007 ]

in the logs, we see that rsyslog is restarted before password are correctly propagated

2017-04-13T14:55:13.364278+00:00 server rudder[16274]: CFEngine(agent) rudder R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@1@@Check SQL credentials@@None@@2017-04-13 14:55:07+00:00##root@#The Rudder PostgreSQL user account's password is correct and works
2017-04-13T14:55:13.372560+00:00 server rudder[16274]: CFEngine(agent) rudder R: @@server-roles@@result_repaired@@server-roles@@server-roles-directive@@1@@Check SQL credentials@@None@@2017-04-13 14:55:07+00:00##root@#The Rudder PostgreSQL user account's password has been changed

rsyslog is then again restarted by agent

2017-04-13T14:56:11.267490+00:00 server rsyslogd: [origin software="rsyslogd" swVersion="8.4.0" x-pid="17132" x-info="http://www.rsyslog.com"] exiting on signal 15.
2017-04-13T14:56:11.295158+00:00 server rsyslogd: [origin software="rsyslogd" swVersion="8.4.0" x-pid="20091" x-info="http://www.rsyslog.com"] start
2017-04-13T14:56:11.294512+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:56:11.294536+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:56:11.294541+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:56:11.294549+00:00 server rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
2017-04-13T14:56:11.380043+00:00 server rudder[19824]: CFEngine(agent) rudder R: @@Common@@log_repaired@@hasPolicyServer-root@@common-root@@1@@Log system for reports@@None@@2017-04-13 14:56:08+00:00##root@#Logging system has be
en restarted

but it still doesn't log (in /varlog/messages, nor in webapp
Logs are there in /var/log/rudder/reports/all.log

restarting rsyslog solves the issue

In Rudder init i get

cf-agent -b propagatePromises,install_rsyslogd,root_component_check
/var/rudder/ncf/common/30_generic_methods/file_from_template_jinja2.cf:193:69: error: Unknown function
      "state_dumped" expression => dumpdatastate("${datastate_file}");
                                                                    ^
2017-04-14T09:57:21+0000    error: There are syntax errors in policy files

Real cause is on my box, I have a cfengine 3.6.1 preinstalled, so rudder-init didn't call the right cf-agent

Actions #1

Updated by Nicolas CHARLES about 7 years ago

Ha, logs are in journalctl

Actions #2

Updated by Nicolas CHARLES about 7 years ago

after rudder-init, passwords are not updated in postgresql and openldap config files

Actions #3

Updated by Nicolas CHARLES about 7 years ago

and reporting issue is random (a new install doesn't exhibit the issue)

Actions #4

Updated by Nicolas CHARLES about 7 years ago

  • Subject changed from No reports on a SLES12 server to rudder-init don't use fully qualified path for executing rudder agent
  • Description updated (diff)
  • Target version changed from 4.1.1 to 3.1.19
  • Severity changed from Major - prevents use of part of Rudder | no simple workaround to Minor - inconvenience | misleading | easy workaround
  • User visibility changed from Getting started - demo | first install | level 1 Techniques to Infrequent - complex configurations | third party integrations
Actions #5

Updated by Nicolas CHARLES about 7 years ago

  • Category set to Packaging

Lowered visibility and severity, as we don't expect much people to have cf-agent as well as rudder agent

Actions #6

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #7

Updated by François ARMAND about 7 years ago

  • Subject changed from rudder-init don't use fully qualified path for executing rudder agent to rudder-init doesn't use fully qualified path for executing cf-agent
  • Description updated (diff)
  • Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround
  • Effort required set to Very Small
  • Priority changed from 0 to 43
Actions #8

Updated by Alexis Mousset almost 7 years ago

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

Updated by Alexis Mousset almost 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/1341
Actions #10

Updated by Alexis Mousset almost 7 years ago

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

Updated by Vincent MEMBRÉ almost 7 years ago

  • Status changed from Pending release to Released

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

Actions

Also available in: Atom PDF