Tracking orphaned resources

8 views
Skip to first unread message

Martin Langhoff

unread,
May 29, 2014, 9:59:02 AM5/29/14
to puppet-dev, puppet...@googlegroups.com

As the complexity of our $workplace puppet configuration grows, I am increasingly worried that puppet gives us very limited visibility over resources it no longer manages.

In practical terms: if I mess up my class include/require/inherit structure so that a node A no longer indirectly includes module Foo, resources managed by Foo are present in A but "orphaned".

This is a lurking gotcha; and it can lead to subtle problems.

Is there any tool that helps here, for example keeping a manifest of all resources ever managed by this puppet install? If not, I will probably try build that into ppg.

Is there a way to ask puppet for a fuller, more explicit report of all resources tracked during a run?

Thanks,

m

Erik Dalén

unread,
May 29, 2014, 11:04:03 AM5/29/14
to Puppet Developers, puppet...@googlegroups.com
There is /var/lib/puppet/state/state.yaml that records all resources ever managed and when they were last checked & synced. However it only has the type and title of the resources, so it might be tricky to actually find out what they were in some cases.

I'm not aware of any tools that make good use of that file, but perhaps someone else knows or you could come up with something.


--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CACPiFCLhd34r%3DNjC91kFOq97VGbUpbdWmYC1Z75CgirmO%2Btsug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.



--
Erik Dalén

R.I.Pienaar

unread,
May 29, 2014, 12:15:38 PM5/29/14
to puppe...@googlegroups.com


----- Original Message -----
> From: "Erik Dalén" <erik.gus...@gmail.com>
> To: "Puppet Developers" <puppe...@googlegroups.com>
> Cc: puppet...@googlegroups.com
> Sent: Thursday, May 29, 2014 4:04:01 PM
> Subject: Re: [Puppet-dev] Tracking orphaned resources
>
> There is /var/lib/puppet/state/state.yaml that records all resources ever
> managed and when they were last checked & synced. However it only has the
> type and title of the resources, so it might be tricky to actually find out
> what they were in some cases.
>
> I'm not aware of any tools that make good use of that file, but perhaps
> someone else knows or you could come up with something.

Reports have the information for every resource so given a db of reports you
should be able to do it.

Else regular snapshots of resources.txt and classes.txt can give some very hacky
solution, but reports is the way to go.
Reply all
Reply to author
Forward
0 new messages