Project

General

Profile

Actions

Bug #4650

closed

Multiline header is added at each run on managed files

Bug #4650: Multiline header is added at each run on managed files

Added by Dennis Cabooter over 12 years ago. Updated over 11 years ago.

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

Description

Every time Rudder edits a file it adds a header, but due to a cfengine bug (https://cfengine.com/dev/issues/1525) at each run it adds a new one ...

A simple workaround: modify the header parameter in the webapp (config management -> Parameters page) and put a simple one liner header : "### Managed by Rudder, edit with care

The title says it all. /etc/ntp.conf looks like this now:

#############################################################
### 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.     ###
#############################################################
...
repeated like a thousand times
...
### 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.     ###
#############################################################
### 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.     ###
#############################################################

# /etc/ntp.conf

fudge 127.127.1.0 stratum 10

driftfile /var/lib/ntp/drift
logfile /var/log/ntp.log
server ntp.example.com

Subtasks 1 (0 open1 closed)

Bug #5724: Multiline header is added at each run on managed files (branch 2.11)ReleasedBenoît PECCATTEActions

Related issues 1 (0 open1 closed)

Related to Rudder - Bug #4657: /var/rudder gets too big on nodesRejectedDennis CabooterActions

Updated by Nicolas CHARLES over 12 years ago Actions #1

  • Category set to Techniques
  • Status changed from New to 8
  • Assignee set to Nicolas CHARLES
  • Priority changed from N/A to 1 (highest)
  • Target version set to 133

I confirm. This is fairly new, either linked to #4487 or to #4553
I'm checking which one is the culprit

Updated by Vincent MEMBRÉ over 12 years ago Actions #2

A simple workaround: modify the header parameter in the webapp (config management -> Parameters page) and put a simple one liner header : "### Managed by Rudder, edit with care ###"

Updated by Nicolas CHARLES over 12 years ago Actions #3

It was introduced by #4487

Updated by Dennis Cabooter over 12 years ago Actions #4

What I did to get back to initial state is:

  • Disabled ntp directives
  • Create enforce file content directives to provide a clean file
  • Created a post-hook to the enforce file content directives to clean ${RUDDER_BASE}/modified-files/*, ${RUDDER_BASE}/cfengine-community/outputs/* and ${RUDDER_BASE}/cfengine-community/state/* - It was never that big before.

Updated by Nicolas CHARLES over 12 years ago Actions #5

I reopened CFEngine ticket
https://cfengine.com/dev/issues/1525

Updated by Vincent MEMBRÉ over 12 years ago Actions #6

  • Target version changed from 133 to 2.9.5

Updated by Vincent MEMBRÉ over 12 years ago Actions #7

  • Description updated (diff)

Updated by Vincent MEMBRÉ over 12 years ago Actions #8

  • Subject changed from Rudder header a little too enthousiast to Multiline header is added at each run on managed files
  • Description updated (diff)
  • Assignee changed from Nicolas CHARLES to Vincent MEMBRÉ

We should at least fix the header on new install and migration by replacing it with a one liner "### Managed by Rudder, edit with care ###". so it does not break on update.

Maybe adding some warnings would be a good idea. and add an entry in the FAQ

I updated the description to reduce the amount of header to make the issue more readable

Updated by Vincent MEMBRÉ about 12 years ago Actions #9

  • Target version changed from 2.9.5 to 2.9.6

Updated by Jonathan CLARKE about 12 years ago Actions #10

  • Target version changed from 2.9.6 to 2.9.7

Updated by Jonathan CLARKE about 12 years ago Actions #11

  • Target version changed from 2.9.7 to 150

Updated by Vincent MEMBRÉ about 12 years ago Actions #12

  • Target version changed from 150 to 2.10.4

Updated by Nicolas PERRON almost 12 years ago Actions #13

  • Target version changed from 2.10.4 to 2.10.5

Updated by Vincent MEMBRÉ almost 12 years ago Actions #14

  • Target version changed from 2.10.5 to 2.10.6

Updated by Matthieu CERDA almost 12 years ago Actions #15

  • Target version changed from 2.10.6 to 2.10.7

Updated by Nicolas CHARLES almost 12 years ago Actions #16

Ha, this has been updated buy cfengine
https://dev.cfengine.com/issues/1525#change-25616

we should backport and test this

Updated by Nicolas CHARLES almost 12 years ago Actions #17

  • Status changed from 8 to Pending technical review
  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/501

https://github.com/Normation/rudder-packages/pull/501

This is a backport of of master https://github.com/cfengine/core/pull/1858 and of commit df2c2aee833f41e175605d8c5824d7e7375c0d85 that introduce the preserve_all_lines semantic in 3.6

Updated by Nicolas CHARLES over 11 years ago Actions #18

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

Applied in changeset packages:commit:3c272e17405e5c3923dae463116cf0f931bec62f.

Updated by Matthieu CERDA over 11 years ago Actions #19

Applied in changeset packages:commit:e2af72de5aa7e9ed1a17c11b76ef52896e71ac6c.

Updated by Vincent MEMBRÉ over 11 years ago Actions #20

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.10.7 and 2.11.4, which were released today.

Updated by Benoît PECCATTE over 9 years ago Actions #21

  • Related to Bug #4657: /var/rudder gets too big on nodes added
Actions

Also available in: PDF Atom