Project

General

Profile

Actions

Bug #4145

closed

Technique 'Package management for RHEL / CentOS / SuSE / RPM systems' v4.0, 4.1 and 5.0: Incorrect clear of cache of installed packaged on promises updates lead to have 'No answer' states after a modification of packages in Directive

Added by Dennis Cabooter about 11 years ago. Updated about 11 years ago.

Status:
Released
Priority:
2
Assignee:
Jonathan CLARKE
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

Error RHEL 5 nodes after upgrading to 2.8:

2013-11-11T11:25:47+0100    error: Redefinition of variable 'classes_to_cancel_on_update' (embedded list in RHS) in context 'check_rpm_package_installation'

Related issues 2 (0 open2 closed)

Related to Rudder - Bug #4150: Incorrect clear of cache of installed packaged on promises updates for rpm package installation v4.0, 4.1 and 5.0 in Rudder 2.4Rejected2013-11-14Actions
Has duplicate Rudder - Bug #3964: Packages on Red Hat get status repaired for $CHECK_INTERVAL minutes with technique version 5.0RejectedMatthieu CERDA2013-09-25Actions
Actions #1

Updated by Vincent MEMBRÉ about 11 years ago

  • Assignee set to Nicolas CHARLES
  • Priority changed from N/A to 2
  • Target version set to 2.4.12

I think is happenning on all rpm based system using the rpmPackageInstallation Technique.

Something is fishy around here with a variable defined, it seems the variable will only be defined for the latest package managed)

"classes_to_cancel_on_update" slist => { "rpm_package_installation_${index_rpmpkg}_kept", "rpm_package_installation_${index_rpmpkg}_repaired", "rpm_package_installation_${index_rpmpkg}_error", "zmd_kept", "zmd_restarted", "could_not_restart_zmd" };

Maybe all classes for each rpm package should be redefined,

or maybe a variable for each should be defined ?

In both case, this is rather expert CFEngine code, Nicolas or Matthieu, can you look into this ?

It only whine with CFEngine 3.5 (Rudder 2.8), but the faulty code is in all branhces containing version 5.0 of rpmInstall (so since 2.4)

Actions #2

Updated by François ARMAND about 11 years ago

Could someone adapt the title with something more accurete based on your observation?

Actions #3

Updated by Vincent MEMBRÉ about 11 years ago

  • Subject changed from Error on RHEL 5 nodes after upgrading to 2.8 to Variable redefinition in rpmPackageInstallation 5.0 cause a lot of error logs
Actions #4

Updated by Nicolas CHARLES about 11 years ago

  • Subject changed from Variable redefinition in rpmPackageInstallation 5.0 cause a lot of error logs to Incorrect clear of cache of installed packaged on promises updates for rpm package installation v5.0
  • Category set to Techniques
  • Status changed from New to In progress

For rpm package installation, we have an optional cache that stores the state of package installation, based on id. When we change promises, id may change, so we need to invalidate the cache

Here the problem lies in the cache invalidation that is not correctly done. On Rudder 2.4, the agent didn't complain about it, but it became more strict in 2.8, so we see the error message now.

Actions #5

Updated by Nicolas CHARLES about 11 years ago

Ha, the problem is deeper than expected.
Indeed, this piece of code

classes:
      "check_rpm_package_installation_class_purged_${classes_to_cancel_on_update}" 
        expression => "any",
        classes => cancel_all_classes("${classes_to_cancel_on_update}");

don't do anything on Rudder 2.4, 2.6, 2.7 and 2.8
Plus, the cancellation of classes is not persistent :(

Actions #6

Updated by Nicolas CHARLES about 11 years ago

  • Subject changed from Incorrect clear of cache of installed packaged on promises updates for rpm package installation v5.0 to Incorrect clear of cache of installed packaged on promises updates for rpm package installation v4.0, 4.1 and 5.0
Actions #7

Updated by Nicolas CHARLES about 11 years ago

I don't have real solution for 2.4 as of now... appart from running commands, which is really akward.
I'm at least fixing in 2.6, and opening another ticket for the 2.4 issue

Actions #8

Updated by Nicolas CHARLES about 11 years ago

  • Target version changed from 2.4.12 to 2.6.9
Actions #9

Updated by Nicolas CHARLES about 11 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/240

PR is there
https://github.com/Normation/rudder-techniques/pull/240

Note: on cfengine 3.4, we can't do list of list :(

Actions #10

Updated by Nicolas CHARLES about 11 years ago

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

Applied in changeset policy-templates:commit:240acf09df731d8e6678258c886cb1b7c1774b34.

Actions #11

Updated by Jonathan CLARKE about 11 years ago

Applied in changeset policy-templates:commit:550cf36bae188f858802926bed482bae70a647e3.

Actions #12

Updated by Nicolas PERRON about 11 years ago

  • Subject changed from Incorrect clear of cache of installed packaged on promises updates for rpm package installation v4.0, 4.1 and 5.0 to Technique 'Package management for RHEL / CentOS / SuSE / RPM systems' v4.0, 4.1 and 5.0: Incorrect clear of cache of installed packaged on promises updates
Actions #13

Updated by Nicolas PERRON about 11 years ago

  • Subject changed from Technique 'Package management for RHEL / CentOS / SuSE / RPM systems' v4.0, 4.1 and 5.0: Incorrect clear of cache of installed packaged on promises updates to Technique 'Package management for RHEL / CentOS / SuSE / RPM systems' v4.0, 4.1 and 5.0: Incorrect clear of cache of installed packaged on promises updates lead to have 'No answer' states after a modification of packages in Directive
Actions #14

Updated by Nicolas PERRON about 11 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.6.9 which was released today.
Check out:

Actions

Also available in: Atom PDF