You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Uninstall leaking snapshot that backs the AMI #1342
After uninstalling/destroying a cluster, the snapshot that backs the AMI that gets created during installation is left hanging around.
What you expected to happen?
Clean up the snapshot that backs the AMI as part of deleting the AMI.
How to reproduce it (as minimally and precisely as possible)?
# install a cluster
# get the snapshot backing the newly created AMI
$ aws ec2 describe-images --filters "Name=tag:kubernetes.io/cluster/jdiaz-master-2nqdz,Values=owned" --region us-east-1 | jq -r .Images[].BlockDeviceMappings[].Ebs.SnapshotIdsnap-0e75eb72357f405d9
$ ./openshift-install destroy cluster
# the snapshot is still around after destroy is complete
$ aws ec2 describe-snapshots --snapshot-ids snap-0e75eb72357f405d9 --region us-east-1 | jq -r .Snapshots[].SnapshotIdsnap-0e75eb72357f405d9
Anything else we need to know?
The snapshot isn't tagged (which probably explains why it isn't getting cleaned up).
How long does it persist for? It's possible that it's been deregistered, but Amazon hasn't gotten around to reaping it yet (and will shortly, now that we've also removed the consuming instances). Checking in CI:
$ AWS_PROFILE=ci aws ec2 describe-images --owners self --query 'join(`\n`, Images[].Description)' --output text | sort | uniq -c | sort -n 1 This was provisioned 2018-02-16T19:49:58Z 2 Red Hat CoreOS "maipo" (OpenShift) 400.7.20190227.0 63 Red Hat CoreOS "maipo" (OpenShift) 47.334
63 is more than I'd expect, but it seems like most of the time we're cleaning up. Here's a recent deregister in CI:
Activity
staebler commentedon Feb 28, 2019
I delete my initial comments where I misunderstood the issue. I can reproduce this as well.
wking commentedon Mar 1, 2019
How long does it persist for? It's possible that it's been deregistered, but Amazon hasn't gotten around to reaping it yet (and will shortly, now that we've also removed the consuming instances). Checking in CI:
63 is more than I'd expect, but it seems like most of the time we're cleaning up. Here's a recent deregister in CI: