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 about 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

Also available in: Atom PDF