Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3195 : Add migration script to add non compliant report logger to... #14

Conversation

VinceMacBuche
Copy link
Member

@@ -611,6 +612,12 @@ then
sed -i 's%^ *</configuration>% <logger name="historization" level="info" additivity="false">\n <appender-ref ref="OPSLOG" />\n <!-- comment the following appender if you dont want to have logs about report in both stdout and opslog -->\n <appender-ref ref="STDOUT" />\n </logger>\n </configuration>%' /opt/rudder/etc/logback.xml
fi

# - 2.5.0 : Update logback.xml in order to have information about non compliant reports
if ! cat /opt/rudder/etc/logback.xml | perl -p0e 's/\n//g' | perl -p0e 's/<!--.(?:(?!-->).)*-->//g' | perl -p0e 's/> *</></g' | grep '<property name="REPORT_DIR" value="/var/log/rudder/compliance" />' > /dev/null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't include the literal path for the reports in your migration test. Doing this means that if a user changes the path (this is a config file after all, it wouldn't be surprising for a user to do so), then we will run the migration again.

Replace the path with "[^"]+" should do it (testing required!)

@VinceMacBuche
Copy link
Member Author

I push the fix, tell me before merge so that i can rebase everything into one commit

@Kegeruneku
Copy link

Looks good to me ! Approved.

Kegeruneku pushed a commit that referenced this pull request Jan 21, 2013
Fixes #3195 : Add migration script to add non compliant report logger to...
@Kegeruneku Kegeruneku merged commit cf38b2f into Normation:branches/rudder/2.5 Jan 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants