Project

General

Profile

Bug #7528

Updated by Jonathan CLARKE almost 9 years ago

Hi, 

 we've seen an issue with a missing report from "file_remove", depending on rudder agent version. 

 If the file in question does not exist, it'll *NOT* run *success_if_nothing*. 

 For ref: 
 <pre> 
 bundle @bundle agent file_remove(target) 
 { 
   vars: 
     "class_prefix" string => canonify("file_remove_${target}"); 

   files: 
     "${target}" 
       delete          => tidy, 
       classes         => classes_generic("${class_prefix}"); 

   methods: 
     "success_if_nothing" usebundle => _classes_success("${class_prefix}"), 
                          ifvarclass => "!${class_prefix}_reached"; 

     "report" usebundle    => _logger("Remove file ${target}", "${class_prefix}"); 

 } 
 </pre> }@ 

 Our directive is called leap_second_something 

 CFEngine Core 3.6.3 

 <pre> 
 node:~ @node:~ # cf-agent -KI | grep leap 
 node:~ #  
 </pre> @ 

 On 3.6.0 you will see output from this and a report will be sent. 

 In debug (cf-agent --debug 2>&1 | grep leap) both report the same stuff. 

 Please let me know if you can't reproduce it.

Back