Kim Scarborough
2013-Jul-12 04:57 UTC
[Puppet Users] Purged packages cause servers to always list as "changed" in Dashboard
So I have a module that set several packages to "purged". This generates messages like this in the log on every run: puppet-agent[27671]: (/Stage[main]/Foo/Package[ghostscript]/ensure) created That doesn''t bother me in and of itself, but the problem is that those messages mark the server as "Changed" in Puppet Dashboard. What can I do about this? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Stefan Schulte
2013-Jul-12 18:04 UTC
Re: [Puppet Users] Purged packages cause servers to always list as "changed" in Dashboard
On 12.07.2013 06:57, Kim Scarborough wrote:> So I have a module that set several packages to "purged". This generates > messages like this in the log on every run: > > puppet-agent[27671]: (/Stage[main]/Foo/Package[ghostscript]/ensure) created > > That doesn''t bother me in and of itself, but the problem is that those > messages mark the server as "Changed" in Puppet Dashboard. > > What can I do about this? >Are you running on RedHat (or some other OS that uses yum)? You may hit https://projects.puppetlabs.com/issues/11450 in this case. Specifying an ensure state of `absent` should work as a workaround on these platforms. -Stefan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Kim Scarborough
2013-Jul-12 20:35 UTC
Re: [Puppet Users] Purged packages cause servers to always list as "changed" in Dashboard
On Friday, July 12, 2013 2:04:36 PM UTC-4, Stefan Schulte wrote:> Are you running on RedHat (or some other OS that uses yum)? You may hit > https://projects.puppetlabs.com/issues/11450 in this case. Specifying an > ensure state of `absent` should work as a workaround on these platforms. > >I have to do a "purged" at least once because the package has a circular dependency and can''t be removed with rpm from puppet. It has to be removed with yum. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
jcbollinger
2013-Jul-12 21:45 UTC
Re: [Puppet Users] Purged packages cause servers to always list as "changed" in Dashboard
On Friday, July 12, 2013 3:35:09 PM UTC-5, Kim Scarborough wrote:> > On Friday, July 12, 2013 2:04:36 PM UTC-4, Stefan Schulte wrote: > >> Are you running on RedHat (or some other OS that uses yum)? You may hit >> https://projects.puppetlabs.com/issues/11450 in this case. Specifying an >> ensure state of `absent` should work as a workaround on these platforms. >> >> > I have to do a "purged" at least once because the package has a circular > dependency and can''t be removed with rpm from puppet. It has to be removed > with yum. >Yes, you should use ''purged'' only if that''s what you really need, but when you need it, you need it. You have a few alternatives, among them: - Put up with the affected machines always being marked "changed", at least until the bug is fixed in Puppet. In this case, it might be to your advantage to go vote up the issue in PL''s issue tracker (link provided by Stefan). - Fix the bug in-house. Optionally, contribute the fix to Puppet. - Work around the bug by writing a custom fact that tests whether the package is installed, and using it to control whether the package is ensured ''purged'' or ''absent'' (or whether it''s altogether unmanaged). John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Robert Esser
2013-Jul-12 22:06 UTC
[Puppet Users] Re: Purged packages cause servers to always list as "changed" in Dashboard
We worked around the issue by creating a (cringe-worthy) defined type that checks to see if the package exists first. It was quicker and easier than some of the alternatives we came up with and worked fine for our needs on both CentOS 5 and 6. # XXX: Quietly purge a package while waiting for bug #11450 define purge_pkg ($ensure = '''' ){ exec { "purge_rpm_${name}": command => "/usr/bin/yum -y erase ${name}", onlyif => "/bin/rpm -q --nosignature --nodigest --quiet ${name}"; } } purge_pkg { ''kudzu'': ensure => ''purged''; } Although the ensure parameter doesn''t do anything in this case, it was left in so that any instances of "purge_pkg" can simply be renamed back to "package" if/when this issue is ever resolved. -Robert On Thursday, July 11, 2013 9:57:14 PM UTC-7, Kim Scarborough wrote:> > So I have a module that set several packages to "purged". This generates > messages like this in the log on every run: > > puppet-agent[27671]: (/Stage[main]/Foo/Package[ghostscript]/ensure) created > > That doesn''t bother me in and of itself, but the problem is that those > messages mark the server as "Changed" in Puppet Dashboard. > > What can I do about this? >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.