- From: Matthew Todd <
>
- To:
- Subject: [chef] transient dpkg lock issues?
- Date: Thu, 6 Aug 2009 17:16:32 +0300
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:content-transfer-encoding:message-id:content-type:to :from:subject:date:x-mailer; b=kkgVaUgaUyoBGYELzP+0u/CcUAFGRDQBAiwUCYD94WEt0YiaKmeYFJffigVYYAkRyD OPspMslvXiyn96yEXe4OWbhkhmTQhj/FM1X3a/Wq4Tm+Z/KU5fIZeDdGxqEtyJULmotM SfdU2dUTAHWPvB0235wqc4GITiMu4gp9l6KX8=
Hi, all --
I'm seeing a bit of transient weirdness:
I'm running chef-client in a VMware guest (Ubuntu 9.04), having it
call out to a chef-server running on my laptop.
Occasionally, some apt package installation (though not the same one
every time) will fail because the dpkg lock is still open, presumably
from the preceding apt action.
Here's an example of how it looks in the logs:
[Thu, 06 Aug 2009 16:09:39 +0000] INFO: Installing package[apache2]
version 2.2.11-2ubuntu2
[Thu, 06 Aug 2009 16:09:48 +0000] INFO: Upgrading package[apache2-
prefork-dev] version from uninstalled to 2.2.11-2ubuntu2
/var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/mixin/command.rb:157:in
`run_command': apt-get -q -y install apache2-prefork-
dev=2.2.11-2ubuntu2 returned 100, expected 0 (Chef::Exceptions::Exec)
---- Begin output of apt-get -q -y install apache2-prefork-
dev=2.2.11-2ubuntu2 ----
STDOUT: STDERR: 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?---- End output of apt-get -q -y install
apache2-prefork-dev=2.2.11-2ubuntu2 ----
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/mixin/command.rb:
133:in `chdir'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/mixin/command.rb:
133:in `run_command'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/provider/package/
apt.rb:68:in `install_package'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/provider/package/
apt.rb:73:in `upgrade_package'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/provider/package.rb:
70:in `action_upgrade'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:87:in `send'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:87:in
`converge'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:85:in `each'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:85:in
`converge'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/
resource_collection.rb:58:in `each'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/
resource_collection.rb:57:in `each'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/runner.rb:63:in
`converge'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:373:in
`converge'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/client.rb:81:in `run'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/application/
client.rb:164:in `run_application'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/application/
client.rb:162:in `loop'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/application/
client.rb:162:in `run_application'
from /var/lib/gems/1.8/gems/chef-0.7.4/lib/chef/application.rb:57:in
`run'
from /var/lib/gems/1.8/gems/chef-0.7.4/bin/chef-client:26
from /var/lib/gems/1.8/bin/chef-client:19:in `load'
from /var/lib/gems/1.8/bin/chef-client:19
It's a bit maddening, because it's not always the same package that
fails, and not even every run that some package fails -- just often
enough to make me want to close my eyes and hope it will go away!
Any thoughts?
I've been reading through Chef::Mixin::Command#popen4, but I've
reached my present brain-melting threshold.
Thanks in advance for any leads, -- Matthew
- [chef] transient dpkg lock issues?, Matthew Todd, 08/06/2009
Archive powered by MHonArc 2.6.16.