Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install python-lxml-install' returned 1: Error: Nothing to do

2,248 views
Skip to first unread message

Sophie Loe

unread,
May 28, 2015, 6:48:05 AM5/28/15
to puppet...@googlegroups.com
Hi everybody,

I was wondering if you could help me find out why my new .pp would not install packages.

I created a new class and assigned to a host.

I run puppet agent --test and the packages were attempted but failed. 

When I tried with yum install $packagename they worked.

The messages were like:
May 28 12:38:13 centos6-radius0-kawazu puppet-agent[2693]: (/Stage[main]/Package::Ha_cluster_packages/Package[python-lxml]/ensure) change from absent to install failed: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install python-lxml-install' returned 1: Error: Nothing to do
May 28 12:38:16 centos6-radius0-kawazu puppet-agent[2693]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install redhat-rpm-config-install' returned 1: Error: Nothing to do
May 28 12:38:16 centos6-radius0-kawazu puppet-agent[2693]: (/Stage[main]/Package::Ha_cluster_packages/Package[redhat-rpm-config]/ensure) change from absent to install failed: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install redhat-rpm-config-install' returned 1: Error: Nothing to do
May 28 12:38:18 centos6-radius0-kawazu puppet-agent[2693]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install pacemaker-pyguiel-install' returned 1: Error: Nothing to do
[SNIP]


My class is defined like:
$ cat ha_cluster_packages.pp

class package::ha_cluster_packages {
    package { "openais-devel":
        ensure => "install"
    }
    package { "corosynclib-devel":
        ensure => "install"
    }
    package { "pacemaker":
        ensure => "install"
    }
    package { "corosync":
        ensure => "install"
    }
    package { "python-dateutil":
        ensure => "install"
    }
    package { "python-lxml":
        ensure => "install"
    }
    package { "pacemaker-pyguiel":
        ensure => "install"
    }
    package { "pssh":
        ensure => "install"
    }
    package { "redhat-rpm-config":
        ensure => "install"
    }
    package { "crmsh":
        ensure => "install"
    }
    package { "crmsh-debuginfo":
        ensure => "install"
    }
}


Does anybody see how I messed up?

Thanks lots,
Sophie

Matthew Hyclak

unread,
May 28, 2015, 8:51:00 AM5/28/15
to puppet...@googlegroups.com
You're using ensure incorrectly. By giving it a value of 'install', Puppet thinks you want the version of each package to be 'install' (which clearly isn't valid).

Most likely you're looking for "ensure => present,"

You can look at the Type Reference for more specifics: https://docs.puppetlabs.com/references/4.1.latest/type.html#package

Matt

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3e1502a8-a193-4947-857a-3793c3b06484%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jcbollinger

unread,
May 28, 2015, 9:08:35 AM5/28/15
to puppet...@googlegroups.com


On Thursday, May 28, 2015 at 7:51:00 AM UTC-5, Matthew Hyclak wrote:
You're using ensure incorrectly. By giving it a value of 'install', Puppet thinks you want the version of each package to be 'install' (which clearly isn't valid).

Most likely you're looking for "ensure => present,"


Or "installed", with an "ed".  The clue could have been that "install" is a verb; resource properties represent state, and therefore they ordinarily take the form of adjectives or nouns.


John

Sophie Loe

unread,
May 28, 2015, 9:13:43 AM5/28/15
to puppet...@googlegroups.com
Thanks for pointing this out.

I have changed install to present and ran this again.

Had less errors but some the same.

Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install libmysqlclient-dev' returned 1: Error: Nothing to do

Error: /Stage[main]/Package::Ha_cluster_packages/Package[libmysqlclient-dev]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install libmysqlclient-dev' returned 1: Error: Nothing to do

Checked and this was not installed before:
# rpm -qa|grep libmysqlclient
#

Sophie Loewenthal

unread,
May 28, 2015, 9:19:26 AM5/28/15
to puppet...@googlegroups.com
I see that my package name  libmysqlclient-dev is wrong.
Thanks for your help.
I want to make beautiful things even if nobody cares.
--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages