In the process of migrating to continuous run of the chef-client on a
few servers, we started shipping resource change counts over to
graphite. The idea was that we would get an alert if something changed
(temporary solution) as well as tracking drift over time.
What I discovered is that a few LWRPs are causing runs to always show
updated resources even though they “technically” didn’t change
anything. Before I work on pull requests (because this most def is
unexpected behavior to me), I’d like to get some ideas on possible
- nagios_nrpecheck resource
My best guess here is that the move from a template to a file resource
with content attribute is the cause here:
I haven’t dug too deeply but I’m guessing that the file resource’s
handling of contents is the issue here. My thought is that, for cases
where content is being written to the file directly by the resource,
would it not make sense to build the file in the cache path first,
checksum against destination (if it exists) and then move the file in
place at the end (as opposed to writing contents in place? It appears
that in-place is what’s happening now via my first glance at the code.
- chef_handler resourse
This one is new territory to me having not used them before now. I
read over the comments here:
Is a guard of some kind enough here to short-circuit
updated_by_last_action? Again, I’m willing to dig in but I never run
in daemon mode. I’m not sure of the state of the exception_ and
report_ handlers at that point. The explict delete_if + push leads me
to believe that it HAS to be run everytime right now.
What’s the source of the issue here and maybe I can tackle it? Is
there any way of knowing if chef-client is running daemonized or not?
Let me know and thoughts you all have.
John E. Vincent (@lusis)