[chef] Re: transient dpkg lock issues?


Chronological Thread 
  • From: Joe Van Dyk < >
  • To:
  • Subject: [chef] Re: transient dpkg lock issues?
  • Date: Thu, 6 Aug 2009 12:53:33 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=HnbHUM0vEyBAj9iwjScunTssWs7l7D8SgqZL6d/i4lIbOGqdAekFW56mITGH5j3qnC g87aQZ/TiJROU6hJEL+GH4uVN2yZ1o++SHBjAeZc8NfIfeKlEAGMS/WDKNvIkT4U+bWL NnGD2jWBeuXEb+rjyPmjy5+BDmuSg2ik1eNMU=

Is the system setup to automatically run apt-get update?

On Thu, Aug 6, 2009 at 7:16 AM, Matthew 
Todd< >
 wrote:
> 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
>



-- 
Joe Van Dyk
http://fixieconsulting.com



Archive powered by MHonArc 2.6.16.

§