The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #12722

package ensure => purged is too noisy!

Added by Bill Tong about 2 years ago. Updated 4 months ago.

Status:AcceptedStart date:02/20/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Affected Puppet version:2.7.10 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket is now tracked at: https://tickets.puppetlabs.com/browse/PUP-1352


Description

$packages = [ "one", "two", "three" ]
package { $packages: ensure => "purged", }

is too noisy.

The logs are filled with:

 /Stage[main]/MODULE/Package[one]/ensure created.
 /Stage[main]/MODULE/Package[two]/ensure created.
 /Stage[main]/MODULE/Package[three]/ensure created.

on every run of puppet-agent.

aaa.txt Magnifier - Output from puppet agent run. (3.67 KB) Bill Tong, 02/22/2012 02:05 am

History

#1 Updated by Daniel Pittman about 2 years ago

  • Description updated (diff)
  • Status changed from Unreviewed to Needs More Information

Could you run puppet agent --test on a machine showing that problem, and then attach the content related to one of the problem packages? That should include more detail on what is going on, the provider, and why this is showing up. Thanks.

#2 Updated by Bill Tong about 2 years ago

#3 Updated by Daniel Pittman about 2 years ago

  • Status changed from Needs More Information to Accepted

Thanks for that.

#4 Updated by Andrés Pereira about 2 years ago

I’m seeing this same output using the following recipe:

package{ "twisted": 
    provider => pip,
}

What I see in the log, dashboard or using puppet agent —test is always the same:

notice: /Stage[main]/Python/Package[twisted]/ensure: created

The package is installed the first time, but after that is always “changed”. I tried using “ensure => installed” but it doesn’t seems to work neither. The puppet module is called “python”.

I think it could be the same issue. If you need anything else, let me know.

#5 Updated by Chris Spence almost 2 years ago

Running 2.7.12 (PE 2.5.2) against RHEL6 using the YUM provider, I see similar output:

class moo { package { ‘moo’:

ensure => purged,

} }

notice: /Stage[main]/Moo/Package[moo]/ensure: created

#6 Updated by Chris Spence almost 2 years ago

More verbose logs:

debug: Prefetching yum resources for package
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm --version'
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}
''
debug: Puppet::Type::Package::ProviderYum: Executing '/bin/rpm -q moo --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}
'
debug: Puppet::Type::Package::ProviderYum: Executing '/usr/bin/yum -y erase moo'
notice: /Stage[main]/Moo/Package[moo]/ensure: created
debug: /Stage[main]/Moo/Package[moo]: The container Class[Moo] will propagate my refresh event

#7 Updated by Chip Schweiss over 1 year ago

This problem has been around a LONG time. It’s the same as bug #2833.

I got tired of the noise in the logs so I wrote a define and put it in a global context:

define removepackage {
    exec {
        "removepackage_$name":
            command => "/usr/bin/yum -y erase $name",
            onlyif => "/bin/rpm -ql $name";
    }
}

Every where I had this:

Package { 
    some_package: 
    ensure => purged;
}

I use this instead:

Removepackage {
    some_package:
}

#8 Updated by Mark Egan-Fuller 4 months ago

Redmine Issue #12722 has been migrated to JIRA:

https://tickets.puppetlabs.com/browse/PUP-1352

Also available in: Atom PDF