We've got an issue with logstash package when updating it.
There are the version informations that would be useful about OS :
- RedHat 7.4
- LogStash 5.5.1
After a yum update and logstash is updated, if log4j2.properties was modified by user, we are in this situation.
Expected result:
$ ls /etc/logstash
conf.d jvm.options log4j2.properties log4j2.properties.rpmnew patterns startup.options
Where log4j2.properties is the modified file, not overwritten, and log4j2.properties.rpmnew the file that is presented by the RPM package.
Result:
$ ls /etc/logstash
conf.d jvm.options log4j2.properties patterns startup.options
Where log4j2.properties is the new file.
To verify where is specifically the issue :
$ rpm -qpc logstash-5.5.1.rpm
/etc/logstash/jvm.options
/etc/logstash/logstash.yml
/etc/logstash/startup.options
The expected result would be the following :
$ rpm -qpc logstash-5.5.1.rpm
/etc/logstash/jvm.options
/etc/logstash/log4j2.properties
/etc/logstash/logstash.yml
/etc/logstash/startup.options
Proposed solution:
- Having the log4j2.properties to be declared as a configuration file in the RPM package.
The issue is similar to Logstash log4j2.properties gets overriden by dpkg