Project

General

Profile

Actions

Bug #2435

closed

problem with aptPackageManagerSettings

Added by Francois BAYART about 12 years ago. Updated almost 12 years ago.

Status:
Released
Priority:
1
Assignee:
Matthieu CERDA
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

I try to use aptPackageManagerSettings but my CR stay in error.

I attach the log file and the generated cfengine file


Files

syst01-pritx1_2012-04-12_1334247715.zip (30.9 KB) syst01-pritx1_2012-04-12_1334247715.zip log file Francois BAYART, 2012-04-12 18:34
aptPackageManagerSettings.cf (9.33 KB) aptPackageManagerSettings.cf cf generated file Francois BAYART, 2012-04-12 18:34
2012-04-12_1834.png (12 KB) 2012-04-12_1834.png Francois BAYART, 2012-04-12 18:36
aptPackageManagerSettings.cf.bad (9.07 KB) aptPackageManagerSettings.cf.bad Nicolas PERRON, 2012-04-24 15:16
Actions #1

Updated by Francois BAYART about 12 years ago

status is "unknown" , see attachment

Actions #2

Updated by Matthieu CERDA about 12 years ago

  • Tracker changed from Question to Bug
  • Category changed from System techniques to Techniques
  • Status changed from New to In progress
  • Priority changed from N/A to 1
  • Target version set to 2.3.7
Actions #3

Updated by Matthieu CERDA about 12 years ago

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

Applied in changeset commit:5bc24571202b93924043ce8cfa30a2aab0261726.

Actions #4

Updated by Nicolas PERRON almost 12 years ago

I'm not sure but it seems OK to me. Could Nicolas or Jon confirm please ?

Actions #5

Updated by Nicolas CHARLES almost 12 years ago

  • Status changed from Pending technical review to Released

This seems valid, thank you Matthieu

Actions #6

Updated by Jonathan CLARKE almost 12 years ago

  • Status changed from Released to Discussion

I'm not so sure about this - why is the trackingvariable commented in policy.xml?!

If it's not needed, please explain why, and if it's not needed, please delete it, not comment it. Comments are useful for helping humans to understand things, commented XML is not useful, we have git to remember the file contents.

Actions #7

Updated by Nicolas PERRON almost 12 years ago

  • Status changed from Discussion to Pending technical review

Applied in changeset commit:962315364769d76ae5fb3e990cc9bdfc3b375e55.

Actions #8

Updated by Jonathan CLARKE almost 12 years ago

  • Status changed from Pending technical review to Discussion

This is still awaiting an answer, the state change was due to a merge

Actions #9

Updated by Matthieu CERDA almost 12 years ago

  • Status changed from Discussion to Pending technical review

Applied in changeset commit:46826ef4ad38dce08fec610c5cc1b94ae74c2d5e.

Actions #10

Updated by Matthieu CERDA almost 12 years ago

You were right, It was just keeping it "just in case" but this comment is useless in this code. I removed it.

Actions #11

Updated by Nicolas PERRON almost 12 years ago

It looks OK, this ticket can be closed

Actions #12

Updated by Jonathan CLARKE almost 12 years ago

  • Status changed from Pending technical review to Released

Thanks guys

Actions #13

Updated by Nicolas PERRON almost 12 years ago

I looked the CFEngine file generated in atachement and tried to reproduce the same configuration of the PT.
The key of the problem is the line 28:

"apt_repositories_edit" not => strcmp("false","false");

It correspond to the WebUI to uncheck "Also add the corresponding source repositories".

Even with the fix, technical log of the CR is "Unknown".

With "apt_repositories_edit" not => strcmp("true","false")":

debian-5-32:~# /var/rudder/cfengine-community/bin/cf-agent -KI -b check_apt_settings
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 >> Using command line specified bundlesequence
R: @@aptPackageManagerSettings@@result_success@@26ce1a14-3def-4661-9bf7-d1a3704cd679@@caa86458-ec45-4297-9ad1-d5a92fb896d3@@14@@aptPackageManagerSettings@@None@@2012-04-24 15:03:05+02:00##0876521e-3c81-4775-85c7-5dd7f9d5d3da@#APT settings were all already correct
R: @@aptPackageManagerSettings@@log_info@@26ce1a14-3def-4661-9bf7-d1a3704cd679@@caa86458-ec45-4297-9ad1-d5a92fb896d3@@14@@aptPackageManagerSettings@@None@@2012-04-24 15:03:05+02:00##0876521e-3c81-4775-85c7-5dd7f9d5d3da@#APT repositories already correct
R: @@aptPackageManagerSettings@@log_info@@26ce1a14-3def-4661-9bf7-d1a3704cd679@@caa86458-ec45-4297-9ad1-d5a92fb896d3@@14@@aptPackageManagerSettings@@None@@2012-04-24 15:03:05+02:00##0876521e-3c81-4775-85c7-5dd7f9d5d3da@#APT configuration parameters already correct
R: @@aptPackageManagerSettings@@log_info@@26ce1a14-3def-4661-9bf7-d1a3704cd679@@caa86458-ec45-4297-9ad1-d5a92fb896d3@@14@@aptPackageManagerSettings@@None@@2012-04-24 15:03:05+02:00##0876521e-3c81-4775-85c7-5dd7f9d5d3da@#APT repository purge has been requested

With "apt_repositories_edit" not => strcmp("false","false")":

debian-5-32:~# /var/rudder/cfengine-community/bin/cf-agent -KI -b check_apt_settings
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 !! Duplicate selection of value for variable "execRun" in scope g
 !! Rule from /var/rudder/cfengine-community/inputs/common/1.0/site.cf at/before line 58
 >> Using command line specified bundlesequence
R: @@aptPackageManagerSettings@@log_info@@26ce1a14-3def-4661-9bf7-d1a3704cd679@@caa86458-ec45-4297-9ad1-d5a92fb896d3@@14@@aptPackageManagerSettings@@None@@2012-04-24 15:03:50+02:00##0876521e-3c81-4775-85c7-5dd7f9d5d3da@#APT configuration parameters already correct
R: @@aptPackageManagerSettings@@log_info@@26ce1a14-3def-4661-9bf7-d1a3704cd679@@caa86458-ec45-4297-9ad1-d5a92fb896d3@@14@@aptPackageManagerSettings@@None@@2012-04-24 15:03:50+02:00##0876521e-3c81-4775-85c7-5dd7f9d5d3da@#APT repository purge has been requested

A report "result_success", "result_repaired" or "result_error" is missing with this one.

In attachement is my CFEngine file generated.

Actions #14

Updated by Nicolas PERRON almost 12 years ago

  • Status changed from New to Pending technical review
The problem was that succes condition was never matched if:
  • Also add the corresponding source repositories is unchecked
  • Disable all other repositories than these (potentially dangerous) is checked

It's done.

Actions #15

Updated by Matthieu CERDA almost 12 years ago

That is kind of a fat class matching statement ! I like that.

Looks OK to me !

Actions #16

Updated by Jonathan CLARKE almost 12 years ago

  • Status changed from Pending technical review to Released
Actions

Also available in: Atom PDF