FAQ
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

--
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 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.

Search Discussions

  • Matthew Hyclak at May 28, 2015 at 12:50 pm
    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
    On Thu, May 28, 2015 at 6:44 AM, Sophie Loe wrote:

    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

    --
    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 view this discussion on the web visit
    https://groups.google.com/d/msgid/puppet-users/3e1502a8-a193-4947-857a-3793c3b06484%40googlegroups.com
    <https://groups.google.com/d/msgid/puppet-users/3e1502a8-a193-4947-857a-3793c3b06484%40googlegroups.com?utm_medium=email&utm_source=footer>
    .
    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+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAO7w0s5rJc3LLj40FVWuLuCODJp55YHyV77ML7AZevjp6JWODQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/d/optout.
  • Jcbollinger at May 28, 2015 at 1:08 pm

    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

    --
    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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/855023ad-3ba3-429e-888e-59584713abec%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Sophie Loe at May 28, 2015 at 1:13 pm
    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
    #

    On Thursday, 28 May 2015 12:48:05 UTC+2, Sophie Loe wrote:

    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
    --
    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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/20ec990c-61e1-40db-8f36-1a3c28d1c0e6%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Sophie Loewenthal at May 28, 2015 at 1:19 pm
    I see that my package name libmysqlclient-dev is wrong.
    Thanks for your help.

    I want to make beautiful things even if nobody cares.
    On 5/28/2015 3:13 PM, Sophie Loe wrote:
    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
    #


    On Thursday, 28 May 2015 12:48:05 UTC+2, Sophie Loe wrote:

    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

    --
    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 view this discussion on the web visit
    https://groups.google.com/d/msgid/puppet-users/20ec990c-61e1-40db-8f36-1a3c28d1c0e6%40googlegroups.com
    <https://groups.google.com/d/msgid/puppet-users/20ec990c-61e1-40db-8f36-1a3c28d1c0e6%40googlegroups.com?utm_medium=email&utm_source=footer>.
    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+unsubscribe@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/556715DB.2000002%40klunky.co.uk.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 28, '15 at 10:48a
activeMay 28, '15 at 1:19p
posts5
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase