-
Notifications
You must be signed in to change notification settings - Fork 314
Description
Bug description
-
Custom AMI creation through the
pcluster createamicommand is failing when the provided base AMI has FSx repository already configured, e.g. when using ParallelCluster AMI as base AMI -
Cluster creation/scale-up is failing when using a pre/post installation script executing a
apt updateorapt-get update.
In both cases error is:
Get:5 https://fsx-lustre-client-repo.s3.amazonaws.com/ubuntu bionic InRelease [3275 B]
E: Repository 'https://fsx-lustre-client-repo.s3.amazonaws.com/ubuntu bionic InRelease' changed its 'Origin' value from '' to 'AWS-FSx-for-Lustre'
E: Repository 'https://fsx-lustre-client-repo.s3.amazonaws.com/ubuntu bionic InRelease' changed its 'Suite' value from '' to 'stable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
How to reproduce
- Custom AMI creation
pcluster createami -ai ami-07de67a2c91b2605c -os ubuntu1804
- Cluster creation/scale-up with pre/post installation script containing
apt update
Affected Versions
Version 2.6.0+ and Ubuntu
Root Cause
Upstream FSx repository has different properties than the one known by apt, which are stored in the /var/lib/apt/lists/fsx-lustre-client-repo.s3.amazonaws.com* files.
The value of the property 'Origin' changed from ' ' to 'AWS-FSx-for-Lustre' and the value of the property 'Suite' changed from ' ' to 'stable'.
Workaround
For the custom AMI creation, avoid to use the pcluster createami command and prefer modifying a ParallelCluster AMI, following the doc here
For the cluster creation/scale-up on Ubuntu 18.04, change your pre/post installation to call apt update with additional flag
apt update --allow-releaseinfo-change
On Ubuntu 16.04 that flag is not recognized. The following can be used instead:
rm -rf /var/lib/apt/lists/* && apt update -y