Project

General

Profile

Bug #4650

Multiline header is added at each run on managed files

Added by Dennis Cabooter about 6 years ago. Updated over 5 years ago.

Status:
Released
Priority:
1
Category:
Techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

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

Bug #5724: Multiline header is added at each run on managed files (branch 2.11)Released2014-11-04Benoît PECCATTEActions

Related issues

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

Updated by Nicolas CHARLES about 6 years ago

  • Category set to Techniques
  • Status changed from New to 8
  • Assignee set to Nicolas CHARLES
  • Priority changed from N/A to 1
  • 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

#2

Updated by Vincent MEMBRÉ about 6 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 ###"

#3

Updated by Nicolas CHARLES about 6 years ago

It was introduced by #4487

#4

Updated by Dennis Cabooter about 6 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.
#5

Updated by Nicolas CHARLES about 6 years ago

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

#6

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 133 to 2.9.5
#7

Updated by Vincent MEMBRÉ about 6 years ago

  • Description updated (diff)
#8

Updated by Vincent MEMBRÉ about 6 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

#9

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 2.9.5 to 2.9.6
#10

Updated by Jonathan CLARKE almost 6 years ago

  • Target version changed from 2.9.6 to 2.9.7
#11

Updated by Jonathan CLARKE almost 6 years ago

  • Target version changed from 2.9.7 to 150
#12

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 150 to 2.10.4
#13

Updated by Nicolas PERRON almost 6 years ago

  • Target version changed from 2.10.4 to 2.10.5
#14

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 2.10.5 to 2.10.6
#15

Updated by Matthieu CERDA over 5 years ago

  • Target version changed from 2.10.6 to 2.10.7
#16

Updated by Nicolas CHARLES over 5 years ago

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

we should backport and test this

#17

Updated by Nicolas CHARLES over 5 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

#18

Updated by Nicolas CHARLES over 5 years ago

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

Applied in changeset packages:commit:3c272e17405e5c3923dae463116cf0f931bec62f.

#19

Updated by Matthieu CERDA over 5 years ago

Applied in changeset packages:commit:e2af72de5aa7e9ed1a17c11b76ef52896e71ac6c.

#20

Updated by Vincent MEMBRÉ over 5 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.

#21

Updated by Benoît PECCATTE about 3 years ago

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

Also available in: Atom PDF