I was able to replicate the behavior on my machine, which drove me to do 
some research, and it actually turns out to be a known issue and documented 
in ticket https://tickets.puppetlabs.com/browse/PUP-1295.  I suppose one 
will just have to deal with the confusing messages for now, while knowing 
that it is not actually ensuring the package is created.  In fact, applying 
your Puppet code with the debug flag (truncated output pasted below) 
indicates that it's attempting to remove the package that's not actually 
there prior to displaying the message indicating that it's "created".  
While I'm sure this doesn't *help*, per se, hopefully this helps shine some 
light on the topic and provide comfort that it's a known bug!  ;-)

Debug: Executing '/bin/rpm --version'
Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n''
Debug: Executing '/bin/rpm -q yp-tools --nosignature --nodigest --qf 
%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing '/usr/bin/yum -y erase yp-tools'
Notice: /Stage[main]/Main/Package[yp-tools]/ensure: created
Debug: /Stage[main]/Main/Package[yp-tools]: The container Class[Main] will 
propagate my refresh event
Debug: Executing '/bin/rpm -q ypbind --nosignature --nodigest --qf %{NAME} 
%|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: Executing '/usr/bin/yum -y erase ypbind'
Notice: /Stage[main]/Main/Package[ypbind]/ensure: created

On Tuesday, December 9, 2014 12:28:41 AM UTC-6, Spencer Krum wrote:
>
> Well thats weird. I don't know what's going on there.
>  
> --
> Spencer Krum
> ni...@spencerkrum.com <javascript:>
>  
>   
>  
> On Mon, Dec 8, 2014, at 10:13 PM, ezzobad wrote:
>
> Hi Spencer,
>  
> cent200 is the puppet master and cent201 is the client.
>  
> the manifest:
> Package {
>         ensure => "installed",
>         allow_virtual => 'false'
> }
> $unwanted_packages = [ "ypbind", "yp-tools" ]
> package { $unwanted_packages:
>         ensure   => 'purged',
>         provider => 'yum'
> }
>  
>  
> [root@Cent201 ~]# rpm -aq | egrep "ypbind|yp-tools"
> yp-tools-2.9-12.el6.x86_64
> ypbind-1.20.4-30.el6.x86_64
>  
> [root@Cent201 ~]# puppet agent -t
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
>  
> ** (process:5286): WARNING **: nm_client_get_devices: error getting 
> devices: The name org.freedesktop.NetworkManager was not provided by any 
> .service files
>  
> Info: Caching catalog for cent201.example.com
> Info: Applying configuration version '1418105294'
> Notice: /Stage[main]/Main/Package[ypbind]/ensure: ensure changed 
> '1.20.4-30.el6' to 'purged'
> Notice: /Stage[main]/Main/Package[yp-tools]/ensure: ensure changed 
> '2.9-12.el6' to 'purged'
> Notice: Finished catalog run in 23.73 seconds
>  
> The two packages purged beautifully. Now run it again without any 
> modification to the environment:
>  
> [root@Cent201 ~]# puppet agent -t
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
>  
> ** (process:5640): WARNING **: nm_client_get_devices: error getting 
> devices: The name org.freedesktop.NetworkManager was not provided by any 
> .service files
>  
> Info: Caching catalog for cent201.example.com
> Info: Applying configuration version '1418105392'
> Notice: /Stage[main]/Main/Package[ypbind]/ensure: *created*
> Notice: /Stage[main]/Main/Package[yp-tools]/ensure: *created*
> Notice: Finished catalog run in 8.98 seconds
>  
>  
> It should have ignored the two packages, because they don't exist on the 
> node. And the "created" here is a fake one:
> [root@Cent201 ~]# rpm -aq | egrep "ypbind|yp-tools"
> [root@Cent201 ~]#
>  
> Cheers,
>  
> Mehdi
>
>
> -- 
>  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+unsubscr...@googlegroups.com.
>  To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/2e119c79-7bfc-4eb8-835d-2033b146a480%40googlegroups.com
> .
>  For more options, visit https://groups.google.com/d/optout.
>
>  
>  

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/e0f10d9d-bb06-4192-ad42-736b75e2114f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to