Project

General

Profile

Actions

Bug #2799

closed

Change path of admin Rudder syslog

Added by François ARMAND over 12 years ago. Updated almost 10 years ago.

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

Description

Following #2427, new logs are created and they go to the file:/var/log/rudder/webapp-opslog/rudder-webapp.log

That have to be changed to : /var/log/rudder/core/rudder-webapp.log

See http://www.rudder-project.org/redmine/issues/2427#note-10 for more details.

The ticket owner should also check that the directory "core" is created if it does not exists already (I believe it's the case).


Related issues 2 (0 open2 closed)

Related to Rudder - User story #2427: Make Rudder log usable by sysadmin (i.e: looking like syslog)ReleasedNicolas CHARLES2012-04-11Actions
Related to Rudder - Bug #2857: logback.xml is not considered as a config file in the packagingReleasedNicolas PERRON2012-09-03Actions
Actions #1

Updated by Vincent MEMBRÉ over 12 years ago

  • Status changed from 2 to Pending technical review
  • % Done changed from 0 to 100
Actions #2

Updated by Nicolas PERRON over 12 years ago

Ooops, wrong issue. The last commit (0c703a7a2e55d509dca2068f50e023b27d68cacb) was a fix for #2800 .

Actions #3

Updated by Jonathan CLARKE over 12 years ago

  • Status changed from Pending technical review to Discussion

This looks like the kind of change that requires a migration in packaging... Does anyone know if this has been done?

Actions #5

Updated by Vincent MEMBRÉ over 12 years ago

  • Assignee changed from Vincent MEMBRÉ to Jonathan CLARKE

You're right Jon, something needs to be done at migration.

Current migration script overwrites user's logback.xml. So he loses everything he has modified before update (logging level).

We should check if file was modified.
if not replace it with new logback.xml.
Else we should keep the user logback.xml and check if property "OPSLOG_DIR" and appender "OPSLOG" exists

Property "OPSLOG_DIR":

  <property name="OPSLOG_DIR" value="/var/log/rudder/core" />

if value has been modified we should keep it

Appender "OPSLOG":

  <appender name="OPSLOG" class="ch.qos.logback.core.FileAppender">
    <file>${OPSLOG_DIR}/rudder-webapp.log</file>
    <append>true</append>
    <encoder>
      <pattern>%d{MMM dd HH:mm:ss} ${HOSTNAME} rudder[%logger]: [%level] %msg%n$
    </encoder>
  </appender>

Actions #6

Updated by Jonathan CLARKE over 12 years ago

  • Assignee changed from Jonathan CLARKE to Nicolas PERRON
  • Target version changed from 2.4.0~beta4 to 2.4.0~beta5
This needs a migration implemented in packaging:
  1. Ensure new destination exists
  2. Move old log files to new destination
  3. Update config file to contain the new path

Note: it seems that the logback.xml file is not properly considered a config file... This should be a separate bug if it is true (I haven't checked).

Nicolas, can you deal with this please?

Actions #7

Updated by Nicolas PERRON over 12 years ago

  • % Done changed from 100 to 80

Jonathan CLARKE wrote:

This needs a migration implemented in packaging:
  1. Ensure new destination exists
  2. Move old log files to new destination
  3. Update config file to contain the new path

Note: it seems that the logback.xml file is not properly considered a config file... This should be a separate bug if it is true (I haven't checked).

Nicolas, can you deal with this please?

Ok, i will make a migration script for this.

logback.xml wasn't considered as a config file so I have opened an issue: #2857

Actions #8

Updated by Jonathan CLARKE over 12 years ago

  • Target version changed from 2.4.0~beta5 to 2.4.0~rc1
Actions #9

Updated by Jonathan CLARKE over 12 years ago

  • Category changed from Web - Maintenance to 11
  • Status changed from Discussion to 2
Actions #10

Updated by Nicolas PERRON over 12 years ago

  • Status changed from 2 to In progress

How to deal with a partially migrated logs ?
Exemple: If the logback.xml has been replaced (since this file was not a config file until recently and that the change has been made for beta4) but the log files in /var/log/rudder/webapp-opslog were not moved.

I've seen this bug: #2872 which result in the replacement of the logrotate and then the impossibility to logrotate logs in /var/log/rudder/webapp-opslog.

Should archive all the logs in a tgz (like old-var_log_rudder_webapp-opslog.tgz)and move it to /var/log/rudder/core/ folder ?

Actions #11

Updated by Nicolas PERRON over 12 years ago

  • Status changed from In progress to Pending technical review
  • % Done changed from 80 to 100

Applied in changeset commit:0617911d4c783195346940e5a030a17d5d23ed25.

Actions #12

Updated by Nicolas PERRON over 12 years ago

Nicolas PERRON wrote:

How to deal with a partially migrated logs ?
Exemple: If the logback.xml has been replaced (since this file was not a config file until recently and that the change has been made for beta4) but the log files in /var/log/rudder/webapp-opslog were not moved.

I've seen this bug: #2872 which result in the replacement of the logrotate and then the impossibility to logrotate logs in /var/log/rudder/webapp-opslog.

Should archive all the logs in a tgz (like old-var_log_rudder_webapp-opslog.tgz)and move it to /var/log/rudder/core/ folder ?

The action to do was only to move all the files from webapp-opslog to core and add them a suffix.

Actions #13

Updated by Nicolas PERRON about 12 years ago

  • Target version changed from 2.4.0~rc1 to 2.4.0~beta5
Actions #14

Updated by Jonathan CLARKE about 12 years ago

  • Status changed from Pending technical review to Released

Looks good to me!

Actions #15

Updated by Nicolas PERRON almost 12 years ago

  • Project changed from Rudder to 34
  • Category deleted (11)
Actions #16

Updated by Benoît PECCATTE almost 10 years ago

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

Also available in: Atom PDF