Project

General

Profile

Actions

Bug #7528

closed

Extend tests for non-existant files with file_remove

Added by Florian Heigl almost 9 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

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:

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}");

}

Our directive is called leap_second_something

CFEngine Core 3.6.3

node:~ # cf-agent -KI | grep leap
node:~ # 

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.

Actions

Also available in: Atom PDF