Project

General

Profile

Actions

Architecture #16302

closed

Add a test for CFEngine errors in relayd parser

Added by Félix DALLIDET over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Agent
Target version:
Effort required:
Name check:
To do
Fix check:
Checked
Regression:

Description

Best example is the zypper package module, it now reports this in the output when failing:

   error: package module: ErrorMessage=No provider of 'vim2' found.
   error: Error installing package 'vim2'
   error: Method 'ncf_package' failed in some repairs
   warning       packageManagement         None                      vim2               If you tried to install a virtual package, please use in place the concrete package you want to install.

We should catch the errors logged by cfengine and automatically reports them to the server.

Actions #1

Updated by Félix DALLIDET over 4 years ago

  • Project changed from 41 to Rudder
  • Category changed from Generic methods to Agent
Actions #2

Updated by Félix DALLIDET over 4 years ago

here is a raw output of my agent:

Rudder agent 6.0.0.beta2.git201912020202
Node uuid: root
R: @@Common@@control@@rudder@@run@@0@@start@@20191202-150503-68b01c0f@@2019-12-02 14:24:20+00:00##root@#Start execution
rudder     info: Automatically promoting context scope for 'heartbeat_sent' to namespace visibility, due to persistence
R: [INFO] Starting CFEngine 3.12.2 on host server.rudder.local (sles_15 x86_64)
R: @@Common@@result_success@@hasPolicyServer-root@@common-root@@0@@ncf Initialization@@None@@2019-12-02 14:24:20+00:00##root@#Configuration library initialization was correct
R: @@Common@@log_repaired@@hasPolicyServer-root@@common-root@@0@@Update@@None@@2019-12-02 14:24:20+00:00##root@#Common configuration library updated
R: @@Common@@result_repaired@@hasPolicyServer-root@@common-root@@0@@Update@@None@@2019-12-02 14:24:20+00:00##root@#Policy or configuration library were updated
R: @@Common@@result_success@@hasPolicyServer-root@@common-root@@0@@Security parameters@@None@@2019-12-02 14:24:20+00:00##root@#The internal environment security is acceptable
R: @@Common@@result_success@@hasPolicyServer-root@@common-root@@0@@CRON Daemon@@None@@2019-12-02 14:24:20+00:00##root@#Cron daemon status was correct
rudder     info: Executing 'no timeout' ... '/bin/sh /var/rudder/cfengine-community/inputs/common/1.0/check-rsyslog-version 5.6.4'
rudder     info: Completed execution of '/bin/sh /var/rudder/cfengine-community/inputs/common/1.0/check-rsyslog-version 5.6.4'
R: @@Common@@log_info@@hasPolicyServer-root@@common-root@@0@@Log system for reports@@None@@2019-12-02 14:24:20+00:00##root@#Detected running syslog as rsyslog
R: @@Common@@result_success@@hasPolicyServer-root@@common-root@@0@@Log system for reports@@None@@2019-12-02 14:24:20+00:00##root@#Logging system for report centralization is already correctly configured
rudder     info: Executing 'no timeout' ... '/bin/sh /var/rudder/cfengine-community/inputs/common/1.0/check-rsyslog-version'
rudder     info: Completed execution of '/bin/sh /var/rudder/cfengine-community/inputs/common/1.0/check-rsyslog-version'
R: @@Common@@log_info@@hasPolicyServer-root@@common-root@@0@@None@@/var/rudder/tmp/rudder_monitoring.csv@@2019-12-02 14:24:20+00:00##root@#Remove file /var/rudder/tmp/rudder_monitoring.csv was correct
R: @@DistributePolicy@@result_na@@root-DP@@root-distributePolicy@@0@@Synchronize resources@@None@@2019-12-02 14:24:20+00:00##root@#Nothing needs to be updated
R: @@DistributePolicy@@result_na@@root-DP@@root-distributePolicy@@0@@Synchronize policies@@None@@2019-12-02 14:24:20+00:00##root@#Rudder server does not need to synchronize its policies
R: @@DistributePolicy@@result_na@@root-DP@@root-distributePolicy@@0@@Synchronize files@@None@@2019-12-02 14:24:20+00:00##root@#Rudder server does not need to synchronize its shared files
R: @@DistributePolicy@@result_success@@root-DP@@root-distributePolicy@@0@@Send inventories to Rudder server@@None@@2019-12-02 14:24:20+00:00##root@#No inventory to send
R: @@DistributePolicy@@result_success@@root-DP@@root-distributePolicy@@0@@Configure apache ACL@@None@@2019-12-02 14:24:20+00:00##root@#Apache ACLs are correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check logrotate configuration@@None@@2019-12-02 14:24:20+00:00##root@#The logrotate configuration is correct
R: [INFO] Executing is-active on rudder-relayd using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check relayd process@@rudder-relayd@@2019-12-02 14:24:20+00:00##root@#Check if the service rudder-relayd is started was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check relayd process@@rudder-relayd@@2019-12-02 14:24:20+00:00##root@#Ensure that service rudder-relayd is running was correct
R: [INFO] Executing is-enabled on rudder-relayd using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check relayd process@@rudder-relayd@@2019-12-02 14:24:20+00:00##root@#Check if service rudder-relayd is started at boot was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check relayd process@@rudder-relayd@@2019-12-02 14:24:20+00:00##root@#Ensure service rudder-relayd is started at boot was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check relayd process@@None@@2019-12-02 14:24:20+00:00##root@#relayd service running was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check relayd boot script@@None@@2019-12-02 14:24:20+00:00##root@#relayd service enabled was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Relayd service configuration@@/opt/rudder/etc/relayd@@2019-12-02 14:24:20+00:00##root@#Ensure permissions mode 640, owner root and group rudder on /opt/rudder/etc/relayd on type all with inf recursion level was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Relayd service configuration@@/opt/rudder/etc/relayd@@2019-12-02 14:24:20+00:00##root@#Ensure permissions mode 640, owner root and group rudder on /opt/rudder/etc/relayd with ${recursion} recursion level was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Relayd service configuration@@/opt/rudder/etc/relayd/main.conf@@2019-12-02 14:24:20+00:00##root@#Build file /opt/rudder/etc/relayd/main.conf from mustache type template /var/rudder/cfengine-community/inputs/server-roles/1.0/relayd.conf.tpl was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Relayd service configuration@@/opt/rudder/etc/relayd/main.conf@@2019-12-02 14:24:20+00:00##root@#Build file /opt/rudder/etc/relayd/main.conf from mustache template /var/rudder/cfengine-community/inputs/server-roles/1.0/relayd.conf.tpl was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Relayd service configuration@@None@@2019-12-02 14:24:20+00:00##root@#rudder-relayd configration was correct
R: [INFO] Executing is-active on postgresql using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check postgresql process@@postgresql@@2019-12-02 14:24:20+00:00##root@#Check if the service postgresql is started was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check postgresql process@@postgresql@@2019-12-02 14:24:20+00:00##root@#Ensure that service postgresql is running was correct
R: [INFO] Executing is-enabled on postgresql using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check postgresql process@@postgresql@@2019-12-02 14:24:20+00:00##root@#Check if service postgresql is started at boot was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check postgresql process@@postgresql@@2019-12-02 14:24:20+00:00##root@#Ensure service postgresql is started at boot was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check postgresql process@@None@@2019-12-02 14:24:20+00:00##root@#postgresql service running was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check postgresql boot script@@None@@2019-12-02 14:24:20+00:00##root@#postgresql service enabled was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check LDAP in rudder-webapp.properties@@None@@2019-12-02 14:24:20+00:00##root@#Web interface configuration files (checked LDAP password) was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check LDAP credentials@@None@@2019-12-02 14:24:20+00:00##root@#OpenLDAP configuration file (rootdn password) was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check rudder-passwords.conf@@None@@2019-12-02 14:24:20+00:00##root@#Presence and permissions of Rudder password file was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check pgpass file@@None@@2019-12-02 14:24:20+00:00##root@#Presence and permissions of pgsql password file was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check SQL in rudder-webapp.properties@@None@@2019-12-02 14:24:20+00:00##root@#Web interface configuration files (SQL password) was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check SQL credentials@@None@@2019-12-02 14:24:20+00:00##root@#PostgreSQL user account's already correct.
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check allowed networks configuration@@None@@2019-12-02 14:24:20+00:00##root@#Allowed networks configuration is correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check WebDAV properties@@None@@2019-12-02 14:24:20+00:00##root@#Rudder WebDAV properties was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check WebDAV credentials@@None@@2019-12-02 14:24:20+00:00##root@#Apache WebDAV user and password are OK
R: [INFO] Executing is-active on apache2 using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check apache process@@apache2@@2019-12-02 14:24:20+00:00##root@#Check if the service apache2 is started was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check apache process@@apache2@@2019-12-02 14:24:20+00:00##root@#Ensure that service apache2 is running was correct
R: [INFO] Executing is-enabled on apache2 using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check apache process@@apache2@@2019-12-02 14:24:20+00:00##root@#Check if service apache2 is started at boot was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check apache process@@apache2@@2019-12-02 14:24:20+00:00##root@#Ensure service apache2 is started at boot was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check apache process@@None@@2019-12-02 14:24:20+00:00##root@#apache service running was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check apache boot script@@None@@2019-12-02 14:24:20+00:00##root@#apache service enabled was correct
R: [INFO] Executing is-active on rudder-jetty using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check jetty process@@rudder-jetty@@2019-12-02 14:24:20+00:00##root@#Check if the service rudder-jetty is started was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check jetty process@@rudder-jetty@@2019-12-02 14:24:20+00:00##root@#Ensure that service rudder-jetty is running was correct
R: [INFO] Executing is-enabled on rudder-jetty using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check jetty process@@rudder-jetty@@2019-12-02 14:24:20+00:00##root@#Check if service rudder-jetty is started at boot was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check jetty process@@rudder-jetty@@2019-12-02 14:24:20+00:00##root@#Ensure service rudder-jetty is started at boot was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check jetty process@@None@@2019-12-02 14:24:20+00:00##root@#jetty service running was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check jetty boot script@@None@@2019-12-02 14:24:20+00:00##root@#jetty service enabled was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check jetty process@@/var/rudder/cfengine-community/ppkeys/root-MD5=c5dbf58ee7e0ab9fb383d212c0280cda.pub@@2019-12-02 14:24:20+00:00##root@#Symlink /var/rudder/cfengine-community/ppkeys/root-MD5=c5dbf58ee7e0ab9fb383d212c0280cda.pub targeting /var/rudder/cfengine-community/ppkeys/localhost.pub was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check jetty process@@/var/rudder/cfengine-community/ppkeys/root-MD5=c5dbf58ee7e0ab9fb383d212c0280cda.pub@@2019-12-02 14:24:20+00:00##root@#Symlink /var/rudder/cfengine-community/ppkeys/root-MD5=c5dbf58ee7e0ab9fb383d212c0280cda.pub targeting /var/rudder/cfengine-community/ppkeys/localhost.pub was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check jetty process@@/var/rudder/cfengine-community/ppkeys/root-MD5=c5dbf58ee7e0ab9fb383d212c0280cda.pub@@2019-12-02 14:24:20+00:00##root@#Symlink /var/rudder/cfengine-community/ppkeys/root-MD5=c5dbf58ee7e0ab9fb383d212c0280cda.pub targeting /var/rudder/cfengine-community/ppkeys/localhost.pub (without overwrite) was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check configuration-repository folder@@None@@2019-12-02 14:24:20+00:00##root@#The /var/rudder/configuration-repository directory is present
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check configuration-repository GIT lock@@None@@2019-12-02 14:24:20+00:00##root@#The /var/rudder/configuration-repository git lock file is not present or not older than 5 minutes
rudder     info: Executing 'no timeout' ... '/opt/rudder/bin/curl --proxy '' --max-time 240 -s http://localhost:8080/rudder/api/status |/bin/grep -q OK'
rudder     info: Automatically promoting context scope for 'site_ok' to namespace visibility, due to persistence
rudder     info: Completed execution of '/opt/rudder/bin/curl --proxy '' --max-time 240 -s http://localhost:8080/rudder/api/status |/bin/grep -q OK'
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check rudder status@@None@@2019-12-02 14:24:20+00:00##root@#The http://localhost:8080/rudder/api/status web interface is running
R: [INFO] Executing is-active on rudder-slapd using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check slapd process@@rudder-slapd@@2019-12-02 14:24:20+00:00##root@#Check if the service rudder-slapd is started was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check slapd process@@rudder-slapd@@2019-12-02 14:24:20+00:00##root@#Ensure that service rudder-slapd is running was correct
R: [INFO] Executing is-enabled on rudder-slapd using the systemctl method
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check slapd process@@rudder-slapd@@2019-12-02 14:24:20+00:00##root@#Check if service rudder-slapd is started at boot was correct
R: @@server-roles@@log_info@@server-roles@@server-roles-directive@@0@@Check slapd process@@rudder-slapd@@2019-12-02 14:24:20+00:00##root@#Ensure service rudder-slapd is started at boot was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check slapd process@@None@@2019-12-02 14:24:20+00:00##root@#slapd service running was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Check slapd boot script@@None@@2019-12-02 14:24:20+00:00##root@#slapd service enabled was correct
R: @@server-roles@@result_success@@server-roles@@server-roles-directive@@0@@Send metrics to rudder-project@@None@@2019-12-02 14:24:20+00:00##root@#Sending metrics to rudder-project.org succeeded
R: @@Inventory@@result_success@@inventory-all@@inventory-all@@0@@inventory@@None@@2019-12-02 14:24:20+00:00##root@#Next inventory scheduled between 00:00 and 06:00
R: @@packageManagement@@log_info@@32377fd7-02fd-43d0-aab7-28460a91347b@@d957f62e-91d4-416c-8211-e70e7951c592@@0@@None@@vim@@2019-12-02 14:24:20+00:00##root@#Presence of package vim in any version was correct
   error: package module: ErrorMessage=No provider of 'vim2' found.
   error: Error installing package 'vim2'
   error: Method 'ncf_package' failed in some repairs
R: @@packageManagement@@log_warn@@32377fd7-02fd-43d0-aab7-28460a91347b@@d957f62e-91d4-416c-8211-e70e7951c592@@0@@None@@vim2@@2019-12-02 14:24:20+00:00##root@#If you tried to install a virtual package, please use in place the concrete package you want to install.
Presence of package vim2 in any version could not be repaired
   error: Method 'package_state_options' failed in some repairs
R: @@packageManagement@@result_success@@32377fd7-02fd-43d0-aab7-28460a91347b@@d957f62e-91d4-416c-8211-e70e7951c592@@0@@Package@@vim@@2019-12-02 14:24:20+00:00##root@#Presence of package vim in any version was correct
R: @@packageManagement@@result_error@@32377fd7-02fd-43d0-aab7-28460a91347b@@d957f62e-91d4-416c-8211-e70e7951c592@@0@@Package@@vim2@@2019-12-02 14:24:20+00:00##root@#Presence of package vim2 in any version could not be repaired
R: @@packageManagement@@result_na@@32377fd7-02fd-43d0-aab7-28460a91347b@@d957f62e-91d4-416c-8211-e70e7951c592@@0@@Post-modification script@@vim@@2019-12-02 14:24:20+00:00##root@#No post-modification script was set to run
R: @@packageManagement@@result_na@@32377fd7-02fd-43d0-aab7-28460a91347b@@d957f62e-91d4-416c-8211-e70e7951c592@@0@@Post-modification script@@vim2@@2019-12-02 14:24:20+00:00##root@#No post-modification script was set to run
   error: Method 'package_management_1_2_d957f62e_91d4_416c_8211_e70e7951c592' failed in some repairs
   error: Method 'run_d957f62e_91d4_416c_8211_e70e7951c592' failed in some repairs
R: @@Common@@result_na@@hasPolicyServer-root@@common-root@@0@@Monitoring@@None@@2019-12-02 14:24:20+00:00##root@#No Rudder monitoring information to share with the server
R: @@Common@@control@@rudder@@run@@0@@end@@20191202-150503-68b01c0f@@2019-12-02 14:24:20+00:00##root@#End execution
R: [INFO] Executing is-active on syslog using the systemctl method
R: @@Common@@log_info@@hasPolicyServer-root@@common-root@@0@@Make sure syslog service runs@@syslog@@2019-12-02 14:24:20+00:00##root@#Check if the service syslog is started was correct
R: @@Common@@log_info@@hasPolicyServer-root@@common-root@@0@@Make sure syslog service runs@@syslog@@2019-12-02 14:24:20+00:00##root@#Ensure that service syslog is running was correct
R: @@Common@@log_info@@hasPolicyServer-root@@common-root@@0@@Make sure syslog service runs@@syslog@@2019-12-02 14:24:20+00:00##root@#Ensure that service syslog is running was correct

Actions #3

Updated by Alexis Mousset over 4 years ago

  • Target version changed from 6.0.0 to 6.0.1
Actions #4

Updated by Alexis Mousset over 4 years ago

  • Status changed from New to In progress
Actions #5

Updated by Alexis Mousset over 4 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/pull/2674
Actions #6

Updated by Alexis Mousset over 4 years ago

  • Subject changed from Capture cfengine errors and report them as warning logs to Ad a test for CFEngine errors in relayd parser
Actions #7

Updated by Alexis Mousset over 4 years ago

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

Updated by Vincent MEMBRÉ over 4 years ago

  • Subject changed from Ad a test for CFEngine errors in relayd parser to Add a test for CFEngine errors in relayd parser
Actions #9

Updated by Alexis Mousset over 4 years ago

  • Fix check changed from To do to Checked
Actions #10

Updated by Alexis Mousset over 4 years ago

  • Tracker changed from User story to Architecture
Actions #11

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 6.0.1 which was released today.

Actions

Also available in: Atom PDF