Project

General

Profile

Bug #8972

Check/Verify package generic methods are actually installing packages

Added by Alexis MOUSSET over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

The warn class that is supposed to prevent the agent from modifying the system is private and not available in the package promise, where it is supposed to be used (in the action body).

Furthermore reporting is misleading because repaired are displayed as error, so the first run may appear correct:

package_check_installed:

      "failed" 
        usebundle  => _classes_failure("${old_class_prefix}"),
        ifvarclass => "${called_class_prefix}_repaired";

#1

Updated by Alexis MOUSSET over 4 years ago

  • Subject changed from Check/Verify package generic methods are actually installing packages to Check/Verify package generic methods are actually installing/removing packages
#2

Updated by François ARMAND over 4 years ago

It used to work in CFEngine 3.5 (and 3.6 ?), because classes defined in the bundle are viewable in the body. We must check if that changed recently.

#3

Updated by Alexis MOUSSET over 4 years ago

  • Subject changed from Check/Verify package generic methods are actually installing/removing packages to Check/Verify package generic methods are actually installing packages
  • Assignee set to Alexis MOUSSET

Reproduced on 3.1.13.

#4

Updated by Alexis MOUSSET over 4 years ago

Reproduced with a simpler test case, but could not find an item in changelogs for this.

body common control {

    bundlesequence => { "test" };

}

bundle agent test {

classes:

#"plop" expression => "any", scope => "namespace";
"plop" expression => "any";

files:

          "/tmp/passwd" 
            perms => system;
}

    body perms system
    {
plop::
      mode => "644";
      owners => { "root" };
      groups => { "root" };
    }

#5

Updated by Alexis MOUSSET over 4 years ago

  • Status changed from New to In progress
#6

Updated by Alexis MOUSSET over 4 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis MOUSSET to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/ncf/pull/442
#7

Updated by Nicolas CHARLES over 4 years ago

I checked the promises, and:
  • it works as expected in CFEngine 3.5.3
  • it doesn't do anything in CFEngine 3.6.0
    so it's been failing since Rudder 2.11 - and it's something that changed in CFEngine 3.6
#8

Updated by Alexis MOUSSET over 4 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
#9

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in ncf version that comes with Rudder 3.1.15/14 and 3.2.8/7 which were released today.

Also available in: Atom PDF