View Issue Details

IDProjectCategoryView StatusLast Update
0008465CentOS-7-OTHERpublic2018-07-10 10:13
Reporterpvenkatesan.nj@gmail.com 
PrioritynormalSeveritytrivialReproducibilityalways
Status newResolutionopen 
PlatformAWS CloudOSCentosOS Version7
Product Version 
Target VersionFixed in Version 
Summary0008465: Bug fix for Amazon AMI : Orphaned Volumes after terminating ec2 instances launched using Centos 7 AMI
DescriptionEC2 instance root volume does not get deleted after terminating an ec2 instance that uses this Centos 7 AMI.
Product Info : https://aws.amazon.com/marketplace/pp/B00O7WM7QW#support


The AMI is currently set to :

    "DeleteOnTermination": false

This needs to be changed to 'true'.
Steps To Reproduce1. Launch an EC2 instance that uses the AMI ami-96a818fe in region us-east-1.
2. Terminate the instance.
3. The root volume remains available. It needs to be manually deleted.
Additional InformationWhen using this AMI in an autoscaling group leave a lot of orphaned volumes over a period of time incurring additional costs.

More info:
 aws ec2 describe-images --image-id ami-96a818fe --region us-east-1
{
    "Images": [
        {
            "ProductCodes": [
                {
                    "ProductCodeId": "aw0evgkw8e5c1q413zgy5pjce",
                    "ProductCodeType": "marketplace"
                }
            ],
            "Name": "CentOS 7 x86_64 (2014_09_29) EBS HVM-b7ee8a69-ee97-4a49-9e68-afaee216db2e-ami-d2a117ba.2",
            "VirtualizationType": "hvm",
            "Hypervisor": "xen",
            "ImageOwnerAlias": "aws-marketplace",
            "ImageId": "ami-96a818fe",
            "State": "available",
            "BlockDeviceMappings": [
                {
                    "DeviceName": "/dev/sda1",
                    "Ebs": {
                        "DeleteOnTermination": false,
                        "SnapshotId": "snap-591037fd",
                        "VolumeSize": 8,
                        "VolumeType": "standard",
                        "Encrypted": false
                    }
                }
            ],
            "Architecture": "x86_64",
            "ImageLocation": "aws-marketplace/CentOS 7 x86_64 (2014_09_29) EBS HVM-b7ee8a69-ee97-4a49-9e68-afaee216db2e-ami-d2a117ba.2",
            "RootDeviceType": "ebs",
            "OwnerId": "679593333241",
            "RootDeviceName": "/dev/sda1",
            "CreationDate": "2014-10-02T15:38:35.000Z",
            "Public": true,
            "ImageType": "machine",
            "Description": "CentOS 7 x86_64 (2014_09_29) EBS HVM"
        }
    ]
}
TagsNo tags attached.
abrt_hash
URL

Activities

shortdudey123

shortdudey123

2015-08-19 19:12

reporter   ~0023965

+1 on updating the AMI to delete on termination. I am running into this issue as well
joekiller

joekiller

2015-10-28 20:47

reporter   ~0024722

+1 this is a bug. To work around it, if using a Cloudformation in the launch config setup the volume to delete:

"BlockDeviceMappings" : [ {
          "DeviceName" : "/dev/sda1",
          "Ebs" : {"DeleteOnTermination" : "true"}
        } ]

If you are creating the launch config from the awscli try:

--block-device-mappings 'DeviceName=/dev/sda1,Ebs={DeleteOnTermination=true}'
joekiller

joekiller

2015-10-28 20:50

reporter   ~0024723

This affects CentOS 6.7 images as well.
llibicpep

llibicpep

2018-06-08 12:33

reporter   ~0032041

This is still valid. It causes sequential software bugs in different products. To my knowledge, CentOS AMIs is the only ones with that behaviour. To add to auto scaling groups above, testing IaaC/CM code in a CI environment such as Chef or Terraform leaves thousands of orphaned volumes. It must be fixed.
rbapst

rbapst

2018-07-10 09:23

reporter   ~0032219

Still the case with latest CentOS AMI "CentOS Linux 7 x86_64 HVM EBS ENA 1805_01"
siebrand

siebrand

2018-07-10 10:13

reporter   ~0032220

Does anyone know where the build scripts or the submit scripts for the CentOS images live, so that it would be possible to for me look into submitting a patch?

Issue History

Date Modified Username Field Change
2015-04-14 00:45 pvenkatesan.nj@gmail.com New Issue
2015-08-19 19:12 shortdudey123 Note Added: 0023965
2015-10-28 20:47 joekiller Note Added: 0024722
2015-10-28 20:50 joekiller Note Added: 0024723
2018-06-08 12:33 llibicpep Note Added: 0032041
2018-07-10 09:23 rbapst Note Added: 0032219
2018-07-10 10:13 siebrand Note Added: 0032220