[Puppet Users] Re: installing software with yum

RijilV
Tue, 04 Nov 2008 17:44:11 -0000

2008/11/4 Arnau Bria <arnau.bria@gmail.com>:
>  exec { "/usr/bin/yum -y update":
>                 creates => "/tmp/update",
>                 }
>
>         }
>
>
> If yes, where to use it? at the begginig? cause I''ve at the end,
and in
> combination with "creates" shoulnd''t matter, is it?
> Cause now it does not execute the update and the file does not exists:
> ]# ls -lsa /tmp/update
> ls: /tmp/update: No such file or directory


This is a pretty common misconception, specifying creates doesn''t
actually create anything, all it does is check for the existence of
that file.  What you want to do a minimum would be "/usr/bin/yum -y
update > /tmp/update" or "/usr/bin/yum -y update && touch
/tmp/update"
 or something that will actually create /tmp/update.


> Anyway, if I don''t care about repos, the system hangs here:
> ]#  puppetd --server gridinstall01.pic.es --waitforcert 60 --test --verbose
> notice: Ignoring cache
> info: Caching configuration at /var/lib/puppet/localconfig.yaml
> notice: Starting configuration run
>
>
> and looking at processes:
> root     24997 13.5  0.3 54676 25128 pts/0   S+   18:16   0:00  |       \_
> /usr/bin/ruby /usr/sbin/puppetd --server gridinstall01.pic.es --waitforcert
> 60 --test --verbose
> root     25176 69.0  1.1 207952 97692 pts/0  S+   18:16   0:02  |
> \_ /usr/bin/python /usr/bin/yum -d 0 -e 0 -y install
> glite-TORQUE_client-3.1.2
>
>
> and hangs here for a loooooooong time, then I kill it.
>


How long does it take to install that package on the command line?
Puppet isn''t going to run yum any faster than you can, so if that
package takes 10mins to download and install, puppet is going to take
10mins to download and install..



> First, why it goes to glite-TORQUE first when the other packages
aren''t
> installed? (as it doesn''t update repos)
> # rpm -qa|grep lcg-CA
> [root@td234 yum.repos.d]#
>


Ah, manifests are parsed and order of them really doesn''t matter for
resources.  If you want to install these things in a particular order,
you need to use require or before.