Rafael Chacon
2011-Sep-28 02:35 UTC
[Puppet Users] apt-get lock the administration directory
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 http://groups.google.com/group/puppet-users?hl=en.
Jo Rhett
2011-Sep-28 03:24 UTC
Re: [Puppet Users] apt-get lock the administration directory
On Sep 27, 2011, at 7:35 PM, Rafael Chacon wrote:> 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??Puppet client is single-threaded, that won''t be a problem.> 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.It''s not that problem. Run it with "--debug" and you''ll learn why they are failing. -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness -- 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 http://groups.google.com/group/puppet-users?hl=en.