Bug #3037
closedAfter an upgrade from 2.4.0~beta4 to 2.4.0~rc1, the file logback.xml is not updated
Description
After an upgrade from 2.4.0~beta4 to 2.4.0~rc1, the file logback.xml is not updated since the part about OPSLOG is absent.
We have to make the update manually in order to get the correct log configuration about OPSLOG.
I suppose the difference in logback.xml is related to the commit: 61668cd7248ab352c6bb97acc33c5e2cc5e8d5bf
--- a/rudder-web/src/main/resources/logback.xml +++ b/rudder-web/src/main/resources/logback.xml @@ -176,4 +176,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/agpl.html>. <appender-ref ref="STDOUT" /> </logger> + <logger name="historization" level="info" additivity="false"> + <appender-ref ref="OPSLOG" /> + <!-- comment the following appender if you don't want to have logs about report in both stdout and opslog --> + <appender-ref ref="STDOUT" /> + </logger> </configuration>
Pull Request URL: https://github.com/Normation/rudder-packages/pull/2
Updated by François ARMAND almost 12 years ago
- Status changed from New to 2
- Assignee changed from Nicolas PERRON to Vincent MEMBRÉ
The development teams missed to pass some important information to the integration team.
Dev team: what are all the new information to add when migrating ?
Updated by Vincent MEMBRÉ almost 12 years ago
Historization logger is the only logger that is not integrated in an update, and was included in beta5 (#2321).
Every other loggers are present
In an update script, you have to add those 4 lines before the closing of configuration end tag in logback.xml :
<logger name="historization" level="info" additivity="false"> <appender-ref ref="OPSLOG" /> <!-- comment the following appender if you don't want to have logs about report in both stdout and opslog --> <appender-ref ref="STDOUT" /> </logger>
Updated by Vincent MEMBRÉ almost 12 years ago
- Assignee changed from Vincent MEMBRÉ to Nicolas PERRON
Updated by Nicolas PERRON almost 12 years ago
- Status changed from 2 to In progress
This is a case a little more touchy.
It happens because of #2857 (consider logback.xml as a configuration file [no automatic replacement]) and #2321 (a change in the file logback.xml)
We don't have the process to update the file logback.xml which is an XML file.
I will try to use sed to replace the file at each upgrade if necessary.
Updated by Nicolas PERRON almost 12 years ago
- Status changed from In progress to Discussion
- Assignee changed from Nicolas PERRON to Jonathan CLARKE
I'm not sure to know how to deal with this. sed seems to not be adapted to this work.
I have the feeling that the problem is the same than #2049 and the configuration should checked by CFEngine with a key value.
What your opinion, Jon ?
Updated by Jonathan CLARKE almost 12 years ago
Nicolas PERRON wrote:
I'm not sure to know how to deal with this. sed seems to not be adapted to this work.
I have the feeling that the problem is the same than #2049 and the configuration should checked by CFEngine with a key value.
What your opinion, Jon ?
Well, it's certainly possible, albeit ugly:
if ! cat /opt/rudder/etc/logback.xml | perl -p0e 's/\n//g' | perl -p0e 's/<!--.(?:(?!-->).)*-->//g' | perl -p0e 's/> *</></g' | grep '<logger name="historization" level="info" additivity="false"><appender-ref ref="OPSLOG" /><appender-ref ref="STDOUT" /></logger>' 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
Updated by Nicolas PERRON almost 12 years ago
Jonathan CLARKE wrote:
Nicolas PERRON wrote:
I'm not sure to know how to deal with this. sed seems to not be adapted to this work.
I have the feeling that the problem is the same than #2049 and the configuration should checked by CFEngine with a key value.
What your opinion, Jon ?
Well, it's certainly possible, albeit ugly:
[...]
Ok, then I will use this command to insert the missing part of logback.xml
Updated by Nicolas PERRON almost 12 years ago
- Description updated (diff)
- Status changed from Discussion to Pending technical review
- Assignee changed from Jonathan CLARKE to Nicolas PERRON
Pull request link added (https://github.com/Normation/rudder-packages/pull/2)
Technical Review needed
Updated by Nicolas PERRON almost 12 years ago
Applied in changeset commit:5ed0a1a4e137b61b7d1363d617e58642fe714301.
Updated by Jonathan CLARKE almost 12 years ago
Applied in changeset commit:4cc2410b877bf142d24ba481a5bdabd1beb02c1e.
Updated by Jonathan CLARKE almost 12 years ago
- Status changed from Pending technical review to Pending release
Nicolas PERRON wrote:
Pull request link added (https://github.com/Normation/rudder-packages/pull/2)
Technical Review needed
Looks good to me, merged.
Updated by Jonathan CLARKE almost 12 years ago
- Status changed from Pending release to Released
Updated by Nicolas PERRON almost 12 years ago
- Project changed from Rudder to 34
- Category deleted (
11)
Updated by Benoît PECCATTE over 9 years ago
- Project changed from 34 to Rudder
- Category set to Packaging