Project

General

Profile

Actions

Bug #4809

closed

Technique "APT package manager configuration": Rudder file header is not added correctly in repository files

Added by Fabrice FLORE-THÉBAULT almost 10 years ago. Updated over 9 years ago.

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

Description

With rudder 2.10 (agent and server), you need to set up rudder_file_edit_header parameter to a one liner to get things working.

I noticed that my APT package manager configuration rules were always in a repaired state, after each run.

After some days, the size of the modified-files directory grew up dramatically. I noticed that /etc/apt/apt.conf.d/99rudder was modified at each run.

Emptying this file and running the agent 3 times produces this output. Exactly the problem that was present when the rudder_file_edit_header parameter was set to multiple plines:

cat /etc/apt/apt.conf.d/99rudder 
// #############################################################
// ### This file is protected by your Rudder infrastructure. ###
// ### Manually editing the file might lead your Rudder      ###
// ### infrastructure to change back the server's            ###
// ### configuration and/or to raise a compliance alert.     ###
// #############################################################

// ### This file is protected by your Rudder infrastructure. ###
// ### Manually editing the file might lead your Rudder      ###
// ### infrastructure to change back the server's            ###
// ### configuration and/or to raise a compliance alert.     ###
// #############################################################

// ### This file is protected by your Rudder infrastructure. ###
// ### Manually editing the file might lead your Rudder      ###
// ### infrastructure to change back the server's            ###
// ### configuration and/or to raise a compliance alert.     ###
// #############################################################

I reloaded the techniques, emptied the cache on the server, emptied the state directory, checked that the issue is present on several nodes and several versions of debian.

So, at the end, i guess the rudder_file_edit_header is not used as expected.

Actions #1

Updated by Matthieu CERDA almost 10 years ago

  • Status changed from New to In progress
  • Assignee set to Matthieu CERDA
  • Priority changed from N/A to 1

Bug confirmed, fixing !

Thanks Fab.

Actions #2

Updated by Matthieu CERDA almost 10 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/358

Fixed ! PR is ready.

Actions #3

Updated by Matthieu CERDA almost 10 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset policy-templates:commit:94a82a15f8904e65ca5d93fe9c3821b7a295f839.

Actions #4

Updated by Jonathan CLARKE almost 10 years ago

Applied in changeset policy-templates:commit:23a9570e3027fda1ce3ad4df36dfa40b9ed8a29e.

Actions #5

Updated by Vincent MEMBRÉ almost 10 years ago

  • Subject changed from APT package manager configuration: rudder_file_edit_header parameter not used as expected to fill up /etc/apt/apt.conf.d/99rudder to Technique "APT package manager configuration": Rudder file header is not added correctly in repository files
Actions #6

Updated by Vincent MEMBRÉ almost 10 years ago

  • Status changed from Pending release to Released

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

Actions #7

Updated by Fabrice FLORE-THÉBAULT over 9 years ago

The bit about /etc/apt/apt.conf.d/99rudder is fixed, but the issue is not completely fixed: with 2.10.6, the technique stays in an always-error with report like:

2014-10-22 15:12     result_error     apt-sources-debian-7-wheezy     sources.list on debian 7 wheezy     aptPackageManagerSettings     -     APT configuration could not be set
2014-10-22 15:12     log_info     apt-sources-debian-7-wheezy     sources.list on debian 7 wheezy     aptPackageManagerSettings     -     APT configuration parameters already correct
2014-10-22 15:12     log_info     apt-sources-debian-7-wheezy     sources.list on debian 7 wheezy     aptPackageManagerSettings     -     APT repositories already correct
Actions #8

Updated by Fabrice FLORE-THÉBAULT over 9 years ago

More in details : if the /etc/apt/apt.conf.d/99rudder was hit by the previous issue, cf-engine can't repair the file.

It seems it's the same scenario for all nodes.

2014-10-22T15:30:26+0200     info: File '/etc/apt/apt.conf.d/99rudder' is bigger than the limit edit.max_file_size = 
1024031 > 1024000 bytes
2014-10-22T15:30:26+0200    error: /check_apt_settings/files/'/etc/apt/apt.conf.d/99rudder': File '/etc/apt/apt.conf.
d/99rudder' was marked for editing but could not be opened
2014-10-22T15:30:26+0200   notice: R: @@aptPackageManagerSettings@@log_info@@5b486ee0-7c23-4a02-bccb-39e880a70d30@@4a5956b6-fb78-4833-a064-6302962d75e5@@308@@aptPackageManagerSettings@@None@@2014-10-22 15:30:18+02:00##305acab7-73f1-42f7-9f0b-ecaa5b612b7d@#APT repositories already correct
2014-10-22T15:30:26+0200   notice: R: @@aptPackageManagerSettings@@log_info@@5b486ee0-7c23-4a02-bccb-39e880a70d30@@4a5956b6-fb78-4833-a064-6302962d75e5@@308@@aptPackageManagerSettings@@None@@2014-10-22 15:30:18+02:00##305acab7-73f1-42f7-9f0b-ecaa5b612b7d@#APT configuration parameters already correct
2014-10-22T15:30:26+0200   notice: R: @@aptPackageManagerSettings@@result_error@@5b486ee0-7c23-4a02-bccb-39e880a70d30@@4a5956b6-fb78-4833-a064-6302962d75e5@@308@@aptPackageManagerSettings@@None@@2014-10-22 15:30:18+02:00##305acab7-73f1-42f7-9f0b-ecaa5b612b7d@#APT configuration could not be set
Actions #9

Updated by Fabrice FLORE-THÉBAULT over 9 years ago

I fixed the issue on my infra by a massive rm via ssh of /etc/apt/apt.conf.d/99rudder

Actions

Also available in: Atom PDF