Skip to content

ubuntu-16.04: unattended updates locking dpkg #609

Closed
@tpetchel

Description

Test Kitchen fails to converge bento/ubuntu-16.04 version 2.2.7 when multiple CPUs are specified in .kitchen.yml.

The error message is:

dpkg: error: dpkg status database is locked by another process

Repro steps

step 1. Create a cookbook. For example:

$ chef generate cookbook ubuntu-test

step 2. Modify .kitchen.yml to specify 2 CPUs.


---
driver:
  name: vagrant

provisioner:
  name: chef_zero

platforms:
  - name: ubuntu-16.04
    driver:
      customize:
        cpus: 2

suites:
  - name: default
    run_list:
      - recipe[ubuntu-test::default]
    attributes:

step 3. Run kitchen converge

Result

https://gist.github.com/tpetchel/0b38bb72f296e330c4d90d5c002a63b7

More info

This was reported on Learn Chef: https://learn.chef.io/manage-a-web-app/ubuntu/run-your-web-application-on-a-node/#comment-2717043449.

After seeing the user's .kitchen.yml, I was able to repo on an empty cookbook. The issue does not repro when you do not specify the customize section. That's not to say that it's strictly caused by running more than 1 CPU, but perhaps the timing with multi CPUs just happens to make it repro more consistently.

Metadata

Assignees

No one assigned

    Labels

    Type: BugDoes not work as expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions