multiple yum repos in manifest

592 views
Skip to first unread message

Tim Dunphy

unread,
Feb 7, 2011, 11:00:22 PM2/7/11
to puppet...@googlegroups.com
hello puppet!!

I am attempting to install multiple yum repos in one of my manifests,
but am expressing this incorrectly (and hopefully only slightly)...

how may I express this idea appropriately in puppet?

class centos {

yumrepo { "epel-repo":
baseurl => "http://download.fedoraproject.org/pub/epel/5/\$basearch",
descr => "Epel Repo",
enabled => 1,
gpgcheck => 0,
}

yumrepo { "remi-repo":
baseurl => "http://rpms.famillecollet.com/enterprise/5/remi/\$basearch/",
descr => "Les RPM de remi pour Enterprise Linux 5",
enabled => 1,
gpgcheck => 0,
}
}

thanks and best!!!


--
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

jcbollinger

unread,
Feb 8, 2011, 9:00:33 AM2/8/11
to Puppet Users


On Feb 7, 10:00 pm, Tim Dunphy <bluethu...@gmail.com> wrote:
> hello puppet!!
>
>  I am attempting to install multiple yum repos in one of my manifests,
> but am expressing this incorrectly (and hopefully only slightly)...

Perhaps someone with sharper eyes will see an error, but I don't. I
presume you say it's incorrect either because you're getting an error
message (which is ...?) or because the catalog is applied
successfully, but you don't see the changes (try grepping the files
in /etc/yum.repos.d/, and verify that the client is getting the right
catalog). To help you any more specifically, I'm going to need a
better characterization of your problem.


John

Tim Dunphy

unread,
Feb 8, 2011, 1:22:51 PM2/8/11
to puppet...@googlegroups.com
Hello,

Sorry for omitting this, but here is the error:

Importing GPG key 0x00F97F56 "Remi Collet <RP...@FamilleCollet.com>"
from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
error: Couldn't fork %post: Cannot allocate memory
error: Couldn't fork %pre: Cannot allocate memory
error: install: %pre scriptlet failed (2), skipping
mysql-libs-5.1.54-1.el5.remi
error: Couldn't fork %pre: Cannot allocate memory
error: install: %pre scriptlet failed (2), skipping dovecot-1.2.16-1.el5
error: Couldn't fork %pre: Cannot allocate memory
error: install: %pre scriptlet failed (2), skipping
mysql-server-5.1.54-1.el5.remi

Here is the manifest that caused the error:

class centos {

yumrepo { "epel-repo":
baseurl => "http://download.fedoraproject.org/pub/epel/5/\$basearch",
descr => "Epel Repo",
enabled => 1,
gpgcheck => 0,
}

yumrepo { "remi-repo":
baseurl => "http://rpms.famillecollet.com/enterprise/5/remi/\$basearch/",
descr => "Les RPM de remi pour Enterprise Linux 5",
enabled => 1,
gpgcheck => 0,
}
}

[root@VIRTCENT16:~] #puppetd --test
info: Caching catalog for virtcent16.summitnjhome.com
info: Applying configuration version '1297139128'
info: create new repo rpmforge-testing in file /etc/yum.repos.d/rpmforge-testing
.repo
notice: //centos/Yumrepo[rpmforge-testing]/descr: defined 'descr' as ' RHEL $rel
easever - RPMforge.net - testing'
notice: //centos/Yumrepo[rpmforge-testing]/mirrorlist: defined 'mirrorlist' as '
http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-testing'
notice: //centos/Yumrepo[rpmforge-testing]/baseurl: defined 'baseurl' as ' http:
//apt.sw.be/redhat/el5/en/$basearch/testing'
notice: //centos/Yumrepo[rpmforge-testing]/enabled: defined 'enabled' as ' 0'
notice: //centos/Yumrepo[rpmforge-testing]/gpgcheck: defined 'gpgcheck' as ' 1'
notice: //centos/Yumrepo[rpmforge-testing]/gpgkey: defined 'gpgkey' as ' file://
/etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag'
notice: //centos/Yumrepo[rpmforge-testing]/protect: defined 'protect' as ' 0'
info: changing mode of /etc/yum.repos.d/rpmforge-testing.repo from 600 to 644
notice: //baseapps/Package[koan]/ensure: created
info: create new repo rpmforge-extras in file /etc/yum.repos.d/rpmforge-extras.r
epo
notice: //centos/Yumrepo[rpmforge-extras]/descr: defined 'descr' as '
RHEL $releasever - RPMforge.net - extras'
notice: //centos/Yumrepo[rpmforge-extras]/mirrorlist: defined
'mirrorlist' as '
http://apt.sw.be/redhat/el5/en/mirrors-rpmforge-extras'
notice: //centos/Yumrepo[rpmforge-extras]/baseurl: defined 'baseurl'
as ' http://apt.sw.be/redhat/el5/en/$basearch/extras'
notice: //centos/Yumrepo[rpmforge-extras]/enabled: defined 'enabled' as ' 0'
notice: //centos/Yumrepo[rpmforge-extras]/gpgcheck: defined 'gpgcheck' as ' 1'
notice: //centos/Yumrepo[rpmforge-extras]/gpgkey: defined 'gpgkey' as
' file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag'
notice: //centos/Yumrepo[rpmforge-extras]/protect: defined 'protect' as ' 0'
info: changing mode of /etc/yum.repos.d/rpmforge-extras.repo from 600
to 644err: //baseapps/Package[mysql-server]/ensure: change from absent
to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install
mysql-server' returned 1: warning: rpmts_HdrFromFdno: Header V3 DSA
signature: NOKEY, key ID 00f97f56
Importing GPG key 0x00F97F56 "Remi Collet <RP...@FamilleCollet.com>"
from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
error: Couldn't fork %post: Cannot allocate memory
error: Couldn't fork %pre: Cannot allocate memory
error: install: %pre scriptlet failed (2), skipping
mysql-libs-5.1.54-1.el5.remi
error: Couldn't fork %pre: Cannot allocate memory
error: install: %pre scriptlet failed (2), skipping dovecot-1.2.16-1.el5
error: Couldn't fork %pre: Cannot allocate memory
error: install: %pre scriptlet failed (2), skipping
mysql-server-5.1.54-1.el5.remi
info: create new repo epel-repo in file /etc/yum.repos.d/epel-repo.repo
notice: //centos/Yumrepo[epel-repo]/descr: defined 'descr' as 'Epel Repo'
notice: //centos/Yumrepo[epel-repo]/baseurl: defined 'baseurl' as
'http://download.fedoraproject.org/pub/epel/5/$basearch'
notice: //centos/Yumrepo[epel-repo]/enabled: defined 'enabled' as '1'
notice: //centos/Yumrepo[epel-repo]/gpgcheck: defined 'gpgcheck' as '0'
info: changing mode of /etc/yum.repos.d/epel-repo.repo from 600 to 644
notice: //centos/Yumrepo[rpmforge]/descr: descr changed ' Red Hat
Enterprise $releasever - RPMforge.net - dag' to ' RHEL $releasever -
RPMforge.net - dag'
notice: //centos/Yumrepo[rpmforge]/baseurl: defined 'baseurl' as '
http://apt.sw.be/redhat/el5/en/$basearch/rpmforge'
err: //baseapps/Package[screen]/ensure: change from absent to present
failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install screen'
returned 1: error: Couldn't fork %pre: Cannot allocate memory
error: install: %pre scriptlet failed (2), skipping screen-4.0.3-1.el5_4.1


thanks for your help and best regards


And here is the entire transaction I saw with puppetd --test

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

Denmat

unread,
Feb 8, 2011, 3:36:52 PM2/8/11
to puppet...@googlegroups.com
Hi,
Does it do the same thing when you try to install those packages on the command line?

Cheers,
Den

jcbollinger

unread,
Feb 8, 2011, 6:22:47 PM2/8/11
to Puppet Users


On Feb 8, 12:22 pm, Tim Dunphy <bluethu...@gmail.com> wrote:
> Hello,
>
>  Sorry for omitting this, but here is the error:
>
> Importing GPG key 0x00F97F56 "Remi Collet <R...@FamilleCollet.com>"
> Importing GPG key 0x00F97F56 "Remi Collet <R...@FamilleCollet.com>"
Good, that gives us something to work with. Some observations, then:

1) The error you see is only indirectly related to yum repositories.
The repository definitions themselves are created successfully, as far
as I can tell from the log.

2) The error occurs during attempted installation of packages mysql-
server and mysql-libs, which may not even be coming from either of the
repos listed in your manifest. On RedHat-family systems they would
normally come from the "base" or "updates" repo.

3) The error messages specifically indicate a memory allocation
problem. I would look into that first. Does the system have very
small available memory, and / or is there something running on it that
is consuming gobs of RAM? Is the account the puppet agent is running
as subject to a memory usage limit?


Although I can't completely rule out a problem with your manifests (or
with Puppet), this doesn't look like such a problem.


John

Mohamed Lrhazi

unread,
Feb 9, 2011, 11:34:20 AM2/9/11
to puppet...@googlegroups.com
On Tue, Feb 8, 2011 at 1:22 PM, Tim Dunphy <bluet...@gmail.com> wrote:
> Couldn't fork %post: Cannot allocate memory

Can you perform the actions manually, without puppet involved? this
looks like memory shortage issue...

Mohamed.

Daniel Pittman

unread,
Feb 13, 2011, 10:03:20 PM2/13/11
to puppet...@googlegroups.com

At a guess, puppet uses a bunch of memory, and while this might
succeed manually, it fails in the now more contended environment.
However, y'all are correct that it is absolutely not a puppet failure.
:)

Daniel
--
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman <dan...@puppetlabs.com>
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

Reply all
Reply to author
Forward
0 new messages