View Issue Details

IDProjectCategoryView StatusLast Update
0017035CentOS-7Cloud-Imagespublic2020-02-13 08:39
Reporterthoris 
PriorityhighSeveritymajorReproducibilityalways
Status assignedResolutionopen 
Product Version7.7-1908 
Target VersionFixed in Version 
Summary0017035: The latest AWS CentOS 7 image disappeared from search by product code in us-east-1
DescriptionThe current version of the official CentOS7 cloud image in the us-east-1 region of AWS is ami-02eac2c0129f6376b, however, this AMI somehow "lost" its product code some when between Feb 7 10:48 CET and Feb 10 13:29 CET. The product code is no longer listed in the web console AMI search (see attached screenshot).

This breaks automated selection of the latest AMI e.g. in terraform and other API based management solutions and scripts.
Steps To ReproduceSearch with in us-east-1 for product code aw0evgkw8e5c1q413zgy5pjce:

Example 1 (aws cli):
aws ec2 describe-images --region us-east-1 --filter "Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce" --output json --query 'Images[*].ImageId '
[
    "ami-02e98f78",
    "ami-46c1b650",
    "ami-4bf3d731",
    "ami-6d1c2007",
    "ami-9887c6e7",
    "ami-b81dbfc5",
    "ami-d5bf2caa",
    "ami-db48ada1"
]

Expected result: ami-02eac2c0129f6376b included in result array.

Example 2 (terraform) :

provider "aws" {
  alias = "us"
  region = "us-east-1"
}

data "aws_ami_ids" "ami_lnx_centos_7_ids_us" {
  provider = "aws.us"
  owners = ["aws-marketplace"]

  filter {
    name = "product-code"
    values = ["aw0evgkw8e5c1q413zgy5pjce"]
  }

  filter {
    name = "architecture"
    values = ["x86_64"]
  }
}

locals {
  ami_lnx_centos_7_id_us = "${element(concat(data.aws_ami_ids.ami_lnx_centos_7_ids_us.ids, list("")), 0)}"
}

output "ami_lnx_centos_7_id_us" {
  value = "${local.ami_lnx_centos_7_id_us}"
}

output "ami_lnx_centos_7_ids_us" {
  value = "${data.aws_ami_ids.ami_lnx_centos_7_ids_us.ids}"
}

terraform apply
data.aws_ami_ids.ami_lnx_centos_7_ids_us: Refreshing state...

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

ami_lnx_centos_7_id_us = ami-9887c6e7
ami_lnx_centos_7_ids_us = [
    ami-9887c6e7,
    ami-d5bf2caa,
    ami-b81dbfc5,
    ami-4bf3d731,
    ami-02e98f78,
    ami-db48ada1,
    ami-46c1b650,
    ami-6d1c2007
]

Expected result:

Outputs:

ami_lnx_centos_7_id_us = ami-02eac2c0129f6376b
ami_lnx_centos_7_ids_us = [
    ami-02eac2c0129f6376b,
    ami-9887c6e7,
    ami-d5bf2caa,
    ami-b81dbfc5,
    ami-4bf3d731,
    ami-02e98f78,
    ami-db48ada1,
    ami-46c1b650,
    ami-6d1c2007
]




TagsNo tags attached.
abrt_hash
URL

Activities

thoris

thoris

2020-02-11 08:30

reporter  

ami-02eac2c0129f6376b.JPG (91,827 bytes)
ami-02eac2c0129f6376b.JPG (91,827 bytes)
arrfab

arrfab

2020-02-13 06:50

administrator   ~0036280

Last edited: 2020-02-13 06:54

View 2 revisions

I just had a look in us-east-1, tried to deploy an instance, search in marketplace for CentOS 7 and here is the link we have for the AMI :
https://aws.amazon.com/marketplace/pp/B00O7WM7QW?ref=cns_srchrow

EC2 instance was provisioned with "CentOS Linux 7 x86_64 HVM EBS ENA 1901_01-b7ee8a69-ee97-4a49-9e68-afaee216db2e-ami-05713873c6794f575.4 (ami-02eac2c0129f6376b)"

thoris

thoris

2020-02-13 08:39

reporter   ~0036282

Hi,
thanks for looking into this!

Yes, the 1901_01 AMI seems to be available in the marketplace and it is possible to deploy an instance in us-east-1 from the marketplace and from the AMI when it is searched for directly by ami id in the ec2 console.

However, when you try to access it by searching for the product code (from https://wiki.centos.org/Cloud/AWS) via the AWS API it will not show up.

Example in us-east-1:

Search for product code aw0evgkw8e5c1q413zgy5pjce, the 1901_01 ami is missing:
aws ec2 describe-images --region us-east-1 --filter "Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce" --output json --query 'Images[*].ImageId'
[
    "ami-02e98f78",
    "ami-46c1b650",
    "ami-4bf3d731",
    "ami-6d1c2007",
    "ami-9887c6e7",
    "ami-b81dbfc5",
    "ami-d5bf2caa",
    "ami-db48ada1"
]

Product code id of on of the images returned by the last search:
aws ec2 describe-images --region us-east-1 --filter "Name=image-id,Values=ami-02e98f78" --output json --query 'Images[*].ProductCodes[].ProductCodeId'
[
    "aw0evgkw8e5c1q413zgy5pjce"
]

Product code id of the 1901_01 image returns empty in us-east-1:
[thr@cos8-1 ~]$ aws ec2 describe-images --region us-east-1 --filter "Name=image-id,Values=ami-02eac2c0129f6376b" --output json --query 'Images[*].ProductCodes[].ProductCodeId'
[]

In eu-west-1 for instance, the search for product code id returns the ami id of the 1901_01 image as expected:

aws ec2 describe-images --region eu-west-1 --filter "Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce" --output json --query 'Images[*].ImageId'
[
    "ami-061b1560",
    "ami-0ff760d16d9497662",
    "ami-192a9460",
    "ami-1caef165",
    "ami-3548444c",
    "ami-4c457735",
    "ami-5f76b626",
    "ami-6e28b517",
    "ami-7abd0209"
]

and the ami-id is tagged with the product code id as expected.

aws ec2 describe-images --region eu-west-1 --filter "Name=image-id,Values=ami-0ff760d16d9497662" --output json --query 'Images[*].ProductCodes[].ProductCodeId'
[
    "aw0evgkw8e5c1q413zgy5pjce"
]

I contacted AWS support and they confirmed the problem, but told me to
<quote>
"As discussed the marketplace vendor must have done some changes with the mapping which we do not have visibility to product codes and control over as they are third party vendors."
</quote>

Thanks & best regards!

Issue History

Date Modified Username Field Change
2020-02-11 08:30 thoris New Issue
2020-02-11 08:30 thoris File Added: ami-02eac2c0129f6376b.JPG
2020-02-13 06:50 arrfab Note Added: 0036280
2020-02-13 06:54 arrfab Note Edited: 0036280 View Revisions
2020-02-13 06:54 arrfab Status new => feedback
2020-02-13 08:39 thoris Note Added: 0036282
2020-02-13 08:39 thoris Status feedback => assigned