Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

libmachine/provision: retries pkg installation if fails to get lock #4232

Merged
merged 1 commit into from
Feb 12, 2018

Conversation

andrestc
Copy link
Contributor

This commit is a follow-up on #3891 and makes sure we retry pkg installations if we fail to acquire a lock.

This is pretty useful if the user provides a userdata that also install pkgs and prevents errors such as:
Error creating machine: Error running provisioning: ssh command error:
command : DEBIAN_FRONTEND=noninteractive sudo -E apt-get install -y curl
err : exit status 100
output : 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?

PTAL @shin- @SvenDowideit

Signed-off-by: André Carvalho asantostc@gmail.com

This commit is a follow-up on 38b4df4
and makes sure we retry pkg installations if we fail to acquire a lock.

Signed-off-by: André Carvalho <asantostc@gmail.com>
Copy link
Member

@dgageot dgageot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dgageot dgageot merged commit e0e4da5 into docker:master Feb 12, 2018
@fabiorauber
Copy link

#4604

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants