test-kitchen/kitchen-ec2

AWS Product Code for CentOS-7 not found

jjperry opened this issue · 0 comments

🗣️ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

👻 Brief Description

When running Kitchen tests using platform centos-7 the test fails the create action with
Neither image_id nor image_search specified for instance default-centos-7! Please specify one or the other.

centos.rb is specifying product code "aw0evgkw8e5c1q413zgy5pjce" which is now marked as a Legacy CentOS Public Image on CentOS Official AWS Cloud EC2 images.

The replacement Product Code for CentOS 7 is cvugziknvmxgqna9noibqnnsy1.

Version

Kitchen 1.24.0

Environment

The kitchen tests are run inside a CentOS 7 pod. The Kitchen Test is using a default CentOS-7 without any additional driver parameters:
`
platforms:

  • name: centos-7
    driver:
    instance_type: t2.small
    block_device_mappings:
    • device_name: /dev/sda1
      ebs:
      volume_size: 10
      delete_on_termination: true
      `

Scenario

Run a kitchen test on against a CentOS-7 instance via a Jenkins Pipeline.

Steps to Reproduce

Setup a .kitchen.yaml with a platform block specifying
platforms: -name: centos-7
and trying to run a kitchen test.

Expected Result

Properly pulls a CentOS-7 image and runs the kitchen test.

Actual Result

I, [2022-11-02T20:45:48.539467 #484] INFO -- default-centos-7: -----> Testing
I, [2022-11-02T20:45:48.539527 #484] INFO -- default-centos-7: -----> Creating ...
E, [2022-11-02T20:45:49.428380 #484] ERROR -- default-centos-7: Search returned 0 images.
E, [2022-11-02T20:45:49.428517 #484] ERROR -- default-centos-7: Create failed on instance .
E, [2022-11-02T20:45:49.428570 #484] ERROR -- default-centos-7: ------Exception-------
E, [2022-11-02T20:45:49.428580 #484] ERROR -- default-centos-7: Class: RuntimeError
E, [2022-11-02T20:45:49.428588 #484] ERROR -- default-centos-7: Message: Neither image_id nor an image_search specified for instance default-centos-7! Please specify one or the other.
E, [2022-11-02T20:45:49.428596 #484] ERROR -- default-centos-7: ----------------------

➕ Additional context