Multiple packages installation in one yum call

2,174 views
Skip to first unread message

Adriana

unread,
Jan 11, 2011, 6:09:26 AM1/11/11
to Puppet Users
Hello,
does anyone know if feature http://projects.puppetlabs.com/issues/2198
had been implemented and how it is possible to use it?
I would like to install multiple packages with one single call the the
yum packager.
Can anyone help me?
Thanks
Adriana

donavan

unread,
Jan 11, 2011, 9:48:32 PM1/11/11
to Puppet Users
On Jan 11, 3:09 am, Adriana <adriana.tele...@gmail.com> wrote:
> Hello,
> does anyone know if featurehttp://projects.puppetlabs.com/issues/2198
> had been implemented and how it is possible to use it?

I don't think it's made it into the puppet codebase yet. It should be
pretty simple to run the contributed patch though.

Stephane

unread,
Jan 12, 2011, 4:45:52 PM1/12/11
to Puppet Users
You could do something like following:
$wantedpackages = [ "perl-DBI", "perl-DBD-MySQL" ]
package { $wantedpackages: ensure => installed }

In one call, we install 2 packages.

I hope it helps.
-Stephane


On Jan 11, 3:09 am, Adriana <adriana.tele...@gmail.com> wrote:
> Hello,
> does anyone know if featurehttp://projects.puppetlabs.com/issues/2198

Nigel Kersten

unread,
Jan 13, 2011, 1:20:31 PM1/13/11
to puppet...@googlegroups.com
On Wed, Jan 12, 2011 at 1:45 PM, Stephane <sro...@gmail.com> wrote:
> You could do something like following:
> $wantedpackages  = [ "perl-DBI", "perl-DBD-MySQL" ]
> package { $wantedpackages: ensure => installed }
>
> In one call, we install 2 packages.

That will actually create two resources that are installed separately.

>
> I hope it helps.
> -Stephane
>
>
> On Jan 11, 3:09 am, Adriana <adriana.tele...@gmail.com> wrote:
>> Hello,
>> does anyone know if featurehttp://projects.puppetlabs.com/issues/2198
>> had been implemented and how it is possible to use it?
>> I would like to install multiple packages with one single call the the
>> yum packager.
>> Can anyone help me?
>> Thanks
>> Adriana
>

> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>
>

donavan

unread,
Jan 13, 2011, 4:09:08 PM1/13/11
to Puppet Users
On Jan 12, 1:45 pm, Stephane <sros...@gmail.com> wrote:
> You could do something like following:
> $wantedpackages  = [ "perl-DBI", "perl-DBD-MySQL" ]
> package { $wantedpackages: ensure => installed }
>
> In one call, we install 2 packages.

Stephane, the problem is with requirements inside the rpms. If a.rpm
require b.rpm, and b.rpm requires a.rpm, there's no way to install
those with the puppet Package type currently. Puppet will try to
evaluate both Package[a] and Package[b] separately, calling `rpm -i a`
and then `rpm -i b`. Both of those transactions will fail with missing
dependencies. The mentioned patch would evaluate both resources at the
same time using `rpm -i a b`, which would work.

Matt

unread,
Jan 17, 2011, 12:40:51 PM1/17/11
to Puppet Users
Unfortunately thats a limitation of RPM which has been worked around
with YUM. YUM will do the resolution of dependencies if they are also
in one of the repositories configured on the system.

Mike Lococo

unread,
Jan 17, 2011, 1:11:26 PM1/17/11
to puppet...@googlegroups.com
On 01/17/2011 12:40 PM, Matt wrote:
> Unfortunately thats a limitation of RPM which has been worked around
> with YUM. YUM will do the resolution of dependencies if they are also
> in one of the repositories configured on the system.

Unfortunately RedHat will blacklist systems that run yum too often so
you either must:

1) Not manage packages with circular dependencies using puppet. This is
what I've opted to do, although I find it unfortunate since puppet would
be my preferred venue to do this kind of thing otherwise.
2) Use the yum-driven options *AND* run your own satellite server so you
can ping it as often as you like. This is possible but is a not
insignificant amount of unnecessary work.
3) Use the yum-driven options and reduce the frequency of puppet-runs to
a few times per day in order to stay below the RedHat's abuse threshold.
4) Use rpm -i exec's instead of the package provider.

While these workarounds are all feasible, none of them are nearly as
desirable as batched transactions that properly support circular
dependencies. I know Luke has also expressed his opinion that this is
an upstream problem that affects an insignificant number of users
(http://projects.puppetlabs.com/issues/1935), but I would *really* like
to see this patch land. Between bugs 1935, 4893, 3156, 2198, and this
thread, it looks like at least 8 people have reported this affecting
them over the last two years. The batchable transactions fix is
straightforward, improves performance of puppet-runs, and has no
downside that has been discussed in its bug.

Cheers,
Mike Lococo

Marc Zampetti

unread,
Jan 18, 2011, 10:55:37 AM1/18/11
to puppet...@googlegroups.com
I agree with this sentiment, and feel that making this a "low" priority
for Puppet Labs is somewhat strange. Like it or not, Red Hat Linux (or
one of its off-shoots like CentOS) is one of the most popular versions
in production. Package management is one of the most central and
important things a system like Puppet handles. The fact that Puppet
cannot manage packages in RPM format in an efficient and correct way
seems just ridiculous. And saying that the problem is with the package
manager is wholly pointless. That is how it works, and it is therefore
up to Puppet to work with the OS.

Or is Puppet Labs saying that they really only want to design a system
that works with non-Red Hat derived Linux distros? Should I be looking
to rip out Puppet and find something that is more open to working with
my OS of choice, like Chef? What else does Puppet Labs not like about
Red Hat Linux that I don't know about yet?

Marc Zampetti

Felix Frank

unread,
Jan 18, 2011, 11:14:26 AM1/18/11
to puppet...@googlegroups.com
On 01/18/2011 04:55 PM, Marc Zampetti wrote:
> Or is Puppet Labs saying that they really only want to design a system
> that works with non-Red Hat derived Linux distros? Should I be looking
> to rip out Puppet and find something that is more open to working with
> my OS of choice, like Chef? What else does Puppet Labs not like about
> Red Hat Linux that I don't know about yet?

Marc,

I get the impression that you're getting quite agitated about this
issue. That is entirely uncalled for.

If this is something that you are interested in, it would be more
constructive to register with redmine and vote for / watch the
respective bugs.

Felix

Avi Miller

unread,
Jan 18, 2011, 3:06:35 PM1/18/11
to puppet...@googlegroups.com
Mike Lococo wrote:
> 2) Use the yum-driven options *AND* run your own satellite server so you
> can ping it as often as you like.

You don't need a Satellite Server for this, just a plain Yum server will
do, which is essentially just httpd + createrepo for RHEL5. This is
about 2 seconds worth of work. You can then send down a custom Yum
repository configuration with the Yumrepo[] type, something that is
unique in Puppet to RHEL-based systems.

In fact, I find that Puppet supports RHEL-based system best, as it has
the most types for that system.

I couldn't imagine doing any RPM package installation with an RPM type.
Everything should come down from a Yum server, if only for version and
dependency management.

Cheers,
Avi

Mike Lococo

unread,
Jan 19, 2011, 12:38:07 PM1/19/11
to puppet...@googlegroups.com
On 01/18/2011 03:06 PM, Avi Miller wrote:
> Mike Lococo wrote:
>> 2) Use the yum-driven options *AND* run your own satellite server so you
>> can ping it as often as you like.
>
> You don't need a Satellite Server for this, just a plain Yum server will
> do, which is essentially just httpd + createrepo for RHEL5. This is
> about 2 seconds worth of work. You can then send down a custom Yum
> repository configuration with the Yumrepo[] type, something that is
> unique in Puppet to RHEL-based systems.

I don't follow this. RedHat doesn't make binary packages available, so
what do you fill your yum repo with?

Also, I definitely understand that there are ways to work around this
bug. But there's also clearly interest in getting it fixed, as
evidenced by a community-submitted patch, and interest in using the
feature if/when its released as evidence by the number of folks who have
reported it and by the strong feelings in this thread.

> I couldn't imagine doing any RPM package installation with an RPM type.
> Everything should come down from a Yum server, if only for version and
> dependency management.

We have been discussing the yum provider all along, it makes use of the
rpm command for certain operations. For example, rpm is used implement
"ensure => absent" package removals, and I believe also to check whether
the package is installed before running yum when "ensure => present" is
specified.

Using rpm for these operations is good because it saves unnecessary load
on the yum server. However, without batched transactions some packages
cannot be removed without specifying "ensure => purged" and incurring
the yum hit for every puppet-run, and then using one of the workarounds
I previously discussed to avoid getting blacklisted by RedHat. Plus the
performance of one-yum-run per package is terrible, both in terms of
long puppet-runs and load on the yum-server.

Regards,
Mike Lococo

Reply all
Reply to author
Forward
0 new messages