On Friday, December 5, 2014 1:50:10 AM UTC-6, Richard wrote:
>
> Hi!
>
>           I intsalled mysql through puppet using 'mysql-server' as package 
> name , but when i want to remove mysql from my centos6.3 system, i get some 
> problems.
>           first i change the package attribute ensure => 'absent', then i 
> run command 'puppet agent -t' on puppet agent, and puppet run successful. 
>           but when i run command 'rpm -qa| grep mysql' , i find that 
>  mysql still in my system.
>
> mysql-connector-java-5.1.17-6.el6.noarch
> mysql-community-release-el6-5.noarch
> mysql-community-client-5.6.22-2.el6.x86_64
> mysql-community-common-5.6.22-2.el6.x86_64
> mysql-community-libs-5.6.22-2.el6.x86_64
>
>           
>           so i run 'puppet agent -t --debug' command to find out what 
> happened. i get some debug messages:
>
> Debug: Prefetching yum resources for package
> 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 mysql --nosignature --nodigest --qf %{NAME} 
> %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
> Debug: /Stage[main]/Main/Node[oncecloud.agent2]/Package[mysql-server]: 
> Nothing to manage: no ensure and the resource doesn't exist
>
>           
>


The 'yum' provider's use of 'rpm' to ensure a package 'absent' is 
intentional and correct.  It avoids causing yum to remove unmanaged 
packages that depend on the one you try to ensure 'absent', which can be 
catastrophic, and which furthermore runs against Puppet's design philosophy 
of avoiding side effects on unmanaged resources and resource properties,

In any case, although the yum provider would use the 'yum' command to 
ensure package 'mysql-server' to be 'purged', that would still not remove 
the listed packages you find remaining on your system, because mysql-server 
depends on *them*, not the other way around.


John

 

>           i want to know how to set yum provider or package attribute to 
> make package using yum command to remove mysql not rpm command.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/da1515c9-b74f-4c4c-a7f5-9171346933b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to