[Puppet Users] apt-get lock the administration directory

Rafael Chacon
Wed, 28 Sep 2011 02:35:40 -0000

Greetings to everyone,

I have a doubt about how puppet works and I would appreciate if some
of you have the answer to this. The question arise in the following
scenario:

Suppose I have two module that both of them need to install a package.
Let''s say I have a module that install apache and another that
installs mysql. They have something like this at some point:

apache::install

class apache::install {
  package { ''apache2'':
    ensure => present,
  }
}
mysql::install

Package{''mysql-client'':
  ensure => present,
}

So, in theory there are no dependencies between both module, but what
would happen if both modules begin to use apt-get at the same time,
one of them it''s going to have an error like:

E: Could not get lock /var/lib/dpkg/lock - open (11: Resource
temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is
another process using it?

Or is puppet going to check that some one is already using apt-get and
wait for it??

I''m asking this because I have a big configuration and when I run it
from scratch I get some 255 errors when installing some packages. Then
I re-run the agent and it installs everything.

I''m wondering if should ensure an order in the way all the classes are
apply to the node (i.e first apache then mysql) even if they don''t
depend.

Thanks for your help!

--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at