Logstash log4j2.properties gets overriden by rpm


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.

$ 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

The expected result would be the following :
$ rpm -qpc logstash-5.5.1.rpm

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

(Jake Landis) #2

@Guirlande - I believe that this was fixed in https://github.com/elastic/logstash/pull/7688/files (the changed referenced by the issue you linked to)


Indeed, this was fixed in the commit. I haven't dug far enough, I should have checked more.
I check the 5.6.0 version of the package, and the file /etc/logstash/log4j2.properties is listed as a configuration file as expected.

Thanks for your answer anyway :slight_smile:

(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.