aws / aws-parallelcluster

AWS ParallelCluster is an AWS supported Open Source cluster management tool to deploy and manage HPC clusters in the AWS cloud.
https://github.com/aws/aws-parallelcluster
Apache License 2.0
827 stars 312 forks source link

pcluster createami fails - Could not get lock /var/lib/dpkg/lock-frontend #1904

Closed gregjohnso closed 4 years ago

gregjohnso commented 4 years ago

Environment:

Bug description and how to reproduce: I ran the following command to create an custom ParallelCluster ami pcluster createami --ami-id ami-037176e5332a04eb6 --os ubuntu1804 -i p3.2xlarge

The ami is "Deep Learning AMI (Ubuntu 18.04) Version 30.0"

Additional context: It looks like a file locking issue stdout.txt packer.log.20200728-090506._i8r0xb6.txt

demartinofra commented 4 years ago

This looks like an issue with the DL AMI you are using. I have the feeling the DL AMI was created while the installation/udpate was in progress, leaving the package manager in a bad state.

Let me see if there is something we can do. In the meanwhile to get you unblocked you could try starting from a previous version of the DL AMI.

tilne commented 4 years ago

This is fixed by this aws-parallelcluster-cookbook PR. The problem was that, although the AMI build was waiting for the service that identifies and downloads the packages that are eligible for updating to release a lock before stopping it, it was not waiting for and then stopping the service that actually applies the updates.