Project

General

Profile

Bug #10088

Updated by Nicolas CHARLES about 7 years ago

On 4.1 (at least), if agent failed to run inventory on install, no new inventory will be sent sent, because: 
 It does know that it failed to send it, but reports success,  

 verbose output says: 
 <pre> 
 rudder    verbose: C: BEGIN classes / conditions (pass 2) 
 rudder    verbose: returnszero ran '/opt/rudder/bin/perl -I /opt/rudder/lib/perl5 /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl /var/rudder/tmp/inventory/agent1-83133707-fabc-4f1d-99dc-34f22aa12a5d.ocs' successfully and it returned zero 
 rudder    verbose: Caching result for function 'returnszero("${perl_command} ${this.promise_dirname}/test-inventory.pl ${inventory_file}","noshell")' 
 rudder    verbose: C:       +    Global class: inventory_valid 
 rudder    verbose: C:       +    Private class: pass2 
 rudder    verbose: findfiles pattern '/var/rudder/tmp/inventory/*.ocs' found match '/var/rudder/tmp/inventory/agent1-83133707-fabc-4f1d-99dc-34f22aa12a5d.ocs' 
 </pre> 

 problem is, condition uuid_valid.(force_inventory|(inventory_time.!inventory_sent)).inventory_valid is not set - it's not invnetory time 

 so even if it know it couldn't send inventory, it does not report it, and doesn't retryto send it (it generates it, but don't do the last part 
 <pre> 
  verbose: Persistent class 'cant_send_inventory' for 413 more minutes 
 </pre> 
 * cf-execd is not running 
 * cron runs /opt/rudder/bin/rudder agent check, which runs /opt/rudder/share/commands/agent-check, which says  
 <pre> 

 Previous version of the ticket mentionned that agent was not run, 
 WARNING: No disable file detected and no CFEngine process either. Relaunching CFEngine processes... 
 </pre> 
 but runs 
 <pre> 
 /var/rudder/cfengine-community/bin/cf-agent -f failsafe.cf 
 </pre> 
 which is invalid: the rudder agent check does run it, and so even though cf-execd is not restarted, agent is run. (note that cf-serverd is restarted) 
 restart the service if promises could not be updated 

 Happens on 4.1, may happen on earlier version

Back