Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Not seeing diff when changes applied #30

Open
madAndroid opened this issue Jul 22, 2015 · 6 comments
Open

Not seeing diff when changes applied #30

madAndroid opened this issue Jul 22, 2015 · 6 comments

Comments

@madAndroid
Copy link

Hi,

Not sure if this is the right place to report this, or within the logstash module, but the symptoms I'm seeing seem related to file_concat, so I thought it best to create an issue here :)

Is there any way to see a diff of changes that file_concat makes? currently in the logstash module, I see this when a config change has been made (in vagrant) :

==> consul: Notice: /Stage[main]/Logstash::Config/File_concat[ls-config]/content: content changed '3fc08e1f1e3e2b9639102a1c2ca55aa6' to '6f54dd0f3016f50fbb5546b3690c2e9b'
==> consul: Info: /Stage[main]/Logstash::Config/File_concat[ls-config]: Scheduling refresh of Class[Logstash::Service]
==> consul: Info: Class[Logstash::Service]: Scheduling refresh of Logstash::Service::Init[logstash]
==> consul: Info: Logstash::Service::Init[logstash]: Scheduling refresh of Service[logstash]

It would be really useful if it behaved in the same way that other concat modules behave, and output a diff of the changes that were made during the run

@electrical
Copy link
Owner

Hi,

this is something i would love to get in yeah, still finding out how to enable that.

@electrical
Copy link
Owner

I haven't forgotten about this, just haven't found a way to get this done yet :-(

@ikoniaris
Copy link

ikoniaris commented Aug 9, 2016

Hi @electrical, @madAndroid have you found a solution to this? I'm getting the same problem. Puppet is restarting Logstash every time it runs. The "resulting" MD5 is always the same: 6f54dd0f3016f50fbb5546b3690c2e9b but the file is not actually changed and Puppet shows a blank diff. Since it's the same hash all the time (see @madAndroid's original post above too) I suspect there is a problem with the module somewhere.

What's going on? How can I fix this? I'm using puppet-logstash 0.5.0, puppet-lib-file_concat 0.1.0 and Logstash 1.4.4. Should I update puppet-lib-file_concat or something? BTW, everything used to work fine, up until I installed a new Logstash 2.3 deb and tried to manage it with the existing module. It seemed to work but after I reverted to the old version ("version" parameter) this started happening.

Sample output from Puppet run with --debug:

Notice: /Stage[main]/Logstash::Config/File_concat[ls-config]/content:

Notice: /Stage[main]/Logstash::Config/File_concat[ls-config]/content: content changed '987024390ab8bcfdfb7eb222dd8b9722' to '6f54dd0f3016f50fbb5546b3690c2e9b'
Debug: /Stage[main]/Logstash::Config/File_concat[ls-config]: The container Class[Logstash::Config] will propagate my refresh event
Info: /Stage[main]/Logstash::Config/File_concat[ls-config]: Scheduling refresh of Class[Logstash::Service]
Debug: Class[Logstash::Config]: The container Stage[main] will propagate my refresh event
Info: Class[Logstash::Service]: Scheduling refresh of Logstash::Service::Init[logstash]
Info: Logstash::Service::Init[logstash]: Scheduling refresh of Service[logstash]

But then again:
$ md5sum /etc/logstash/conf.d/logstash.conf
987024390ab8bcfdfb7eb222dd8b9722 /etc/logstash/conf.d/logstash.conf

@electrical
Copy link
Owner

Hmm, interesting. It should only do that if the config is actually changed.
I'm not sure what the plans are with the current elasticsearch-logstash module, but once i have some time i would like to replace it with the puppetlabs-concat module since they are using the native one now as well which does show the changes correctly.

@madAndroid
Copy link
Author

Yes, agreed - puppetlabs-concat would be the better approach - we're using that in loads of modules, so it's a dependency we already include - and it shows the diffs of the change :)

@madAndroid
Copy link
Author

And yes, I've also not seen the restart happen ... unless the config's changed. We do see the resource showing that it's operating, but not actually making changes - and usually the service is not restarted.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants