Project

General

Profile

Actions

Bug #4650

closed

Multiline header is added at each run on managed files

Added by Dennis Cabooter over 10 years ago. Updated about 10 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 PECCATTE2014-11-04Actions

Related issues 1 (0 open1 closed)

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

Updated by Nicolas CHARLES over 10 years ago

  • 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

Actions #2

Updated by Vincent MEMBRÉ over 10 years ago

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 ###"

Actions #3

Updated by Nicolas CHARLES over 10 years ago

It was introduced by #4487

Actions #4

Updated by Dennis Cabooter over 10 years ago

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.
Actions #5

Updated by Nicolas CHARLES over 10 years ago

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

Actions #6

Updated by Vincent MEMBRÉ over 10 years ago

  • Target version changed from 133 to 2.9.5
Actions #7

Updated by Vincent MEMBRÉ over 10 years ago

  • Description updated (diff)
Actions #8

Updated by Vincent MEMBRÉ over 10 years ago

  • 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

Actions #9

Updated by Vincent MEMBRÉ over 10 years ago

  • Target version changed from 2.9.5 to 2.9.6
Actions #10

Updated by Jonathan CLARKE over 10 years ago

  • Target version changed from 2.9.6 to 2.9.7
Actions #11

Updated by Jonathan CLARKE over 10 years ago

  • Target version changed from 2.9.7 to 150
Actions #12

Updated by Vincent MEMBRÉ over 10 years ago

  • Target version changed from 150 to 2.10.4
Actions #13

Updated by Nicolas PERRON over 10 years ago

  • Target version changed from 2.10.4 to 2.10.5
Actions #14

Updated by Vincent MEMBRÉ about 10 years ago

  • Target version changed from 2.10.5 to 2.10.6
Actions #15

Updated by Matthieu CERDA about 10 years ago

  • Target version changed from 2.10.6 to 2.10.7
Actions #16

Updated by Nicolas CHARLES about 10 years ago

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

we should backport and test this

Actions #17

Updated by Nicolas CHARLES about 10 years ago

  • 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

Actions #18

Updated by Nicolas CHARLES about 10 years ago

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

Applied in changeset packages:commit:3c272e17405e5c3923dae463116cf0f931bec62f.

Actions #19

Updated by Matthieu CERDA about 10 years ago

Applied in changeset packages:commit:e2af72de5aa7e9ed1a17c11b76ef52896e71ac6c.

Actions #20

Updated by Vincent MEMBRÉ about 10 years ago

  • 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.

Actions #21

Updated by Benoît PECCATTE over 7 years ago

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

Also available in: Atom PDF