Project

General

Profile

Actions

Bug #4004

closed

After upgrading the policy server, the rsyslog configuration is invalid

Added by Nicolas CHARLES over 10 years ago. Updated about 9 years ago.

Status:
Released
Priority:
1
Assignee:
Nicolas PERRON
Category:
Packaging
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

when upgrading the rudder server root, /etc/rsyslog.d/rudder.conf contains &SYSLOGPORT& within, rather than the port to listen to; preventing the server from listening to the clients
regenerating the promises by clearing the cache solve the issue
Happens at least on 2.6, must test on other systems

Actions #1

Updated by Nicolas CHARLES over 10 years ago

  • Project changed from Rudder to 34
Actions #2

Updated by Nicolas CHARLES over 10 years ago

This happens on Redhat 6, with Rudder 2.6, but not on SLES11 with Rudder 2.7

Actions #3

Updated by Dennis Cabooter over 10 years ago

This happens on Red Hat 5 with Rudder 2.6 as well.

Actions #4

Updated by Nicolas CHARLES over 10 years ago

Doesn't happen on centos on 2.4

Actions #5

Updated by Nicolas PERRON over 10 years ago

I ensured that my serve had the promises generated so to have the correct rsyslog template (/var/rudder/cfengine-community/inputs/distributePolicy/rsyslog.conf/rudder.conf). After this I've tried an upgrade from 2.6.7 to 2.7.4 and didn't get the issue.

Are you sure that your promises were correct before the upgrade ?

Actions #6

Updated by Dennis Cabooter over 10 years ago

Excuse me. As discussed on IRC our policy server is on Ubuntu 12.04 LTS having Rudder 2.6.

Actions #7

Updated by Nicolas CHARLES over 10 years ago

The upgrade script is a bit eager on the replacement.

# 2.4.0: force upgrade of the rsyslog configuration for rudder
if [ -d ${TRGTECHDIR} ];then
        mkdir -p /var/rudder/cfengine-community/inputs/distributePolicy/rsyslog.conf
        cp -a /var/rudder/configuration-repository/techniques/system/distributePolicy/1.0/rudder.st /var/rudder/cfengine-community/inputs/distributePolicy/rsyslog.conf/rudder.conf
fi
Actions #8

Updated by Nicolas CHARLES over 10 years ago

  • Target version changed from 2.6.8 to 2.4.11

This must happen on 2.4 as well

Actions #9

Updated by Nicolas PERRON over 10 years ago

Nicolas CHARLES wrote:

The upgrade script is a bit eager on the replacement.

[...]

This is an old code. It was made for #2347. This is historical and does not need to be made. I suggest to remove it.

Actions #10

Updated by Nicolas PERRON over 10 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Nicolas PERRON to Jonathan CLARKE
  • % Done changed from 0 to 100
  • Pull Request set to https://github.com/Normation/rudder-packages/pull/144

Pull Request URL added: https://github.com/Normation/rudder-packages/pull/144

Jon, could you review it please ?

Actions #11

Updated by Jonathan CLARKE over 10 years ago

Nicolas PERRON wrote:

Nicolas CHARLES wrote:

The upgrade script is a bit eager on the replacement.

[...]

This is an old code. It was made for #2347. This is historical and does not need to be made. I suggest to remove it.

I disagree. Removing it in 2.4 is certainly not an option, because this most likely breaks the upgrade path from 2.3 (I doubt we introduced this without reason).

A much more reasonable approach would be to repair it: if the &SYSLOGPORT& variables need replacing, let's just use sed to apply a default value - or even better, go and get the value from the rudder.syslog.port property in /opt/rudder/etc/rudder-web.properties!

Actions #12

Updated by Jonathan CLARKE over 10 years ago

  • Assignee changed from Jonathan CLARKE to Nicolas PERRON
  • Pull Request changed from https://github.com/Normation/rudder-packages/pull/144 to https://github.com/Normation/rudder-packages/pull/146

Jonathan CLARKE wrote:

Nicolas PERRON wrote:

Nicolas CHARLES wrote:

The upgrade script is a bit eager on the replacement.

[...]

This is an old code. It was made for #2347. This is historical and does not need to be made. I suggest to remove it.

I disagree. Removing it in 2.4 is certainly not an option, because this most likely breaks the upgrade path from 2.3 (I doubt we introduced this without reason).

A much more reasonable approach would be to repair it: if the &SYSLOGPORT& variables need replacing, let's just use sed to apply a default value - or even better, go and get the value from the rudder.syslog.port property in /opt/rudder/etc/rudder-web.properties!

I made a new PR to do just this: https://github.com/Normation/rudder-packages/pull/146.

I've tested it and it works, in the interest of speeding up upcoming releases, I'm self-merging, but leaving the ticket assigned to Nicolas for Tech Review.

Actions #13

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:6272f06771e2c82bfc4499bf78e4fc15f58c3ddc.

Actions #14

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from Pending release to Pending technical review
Actions #15

Updated by Nicolas PERRON over 10 years ago

  • Status changed from Pending technical review to Pending release

Jonathan CLARKE wrote:

Nicolas PERRON wrote:

Nicolas CHARLES wrote:

The upgrade script is a bit eager on the replacement.

[...]

This is an old code. It was made for #2347. This is historical and does not need to be made. I suggest to remove it.

I disagree. Removing it in 2.4 is certainly not an option, because this most likely breaks the upgrade path from 2.3 (I doubt we introduced this without reason).

A much more reasonable approach would be to repair it: if the &SYSLOGPORT& variables need replacing, let's just use sed to apply a default value - or even better, go and get the value from the rudder.syslog.port property in /opt/rudder/etc/rudder-web.properties!

Alright, this is more reasonable. We can still remove it later.
The PR seems ok to me.

Actions #16

Updated by Nicolas PERRON over 10 years ago

  • Status changed from Pending release to Released

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

Actions #17

Updated by Benoît PECCATTE about 9 years ago

  • Project changed from 34 to Rudder
  • Category set to Packaging
Actions

Also available in: Atom PDF