Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements to CentOS Image search #502

Merged
merged 2 commits into from
Jul 13, 2020

Conversation

clintoncwolfe
Copy link
Contributor

Description

Two small fixes to the CentOS image search.

First, addressing #456, add an additional filter to the search when looking for CentOS 6 or 7 images to also filter on the ProductCode. This extra field ensures that the AMI returned is the official CentOS image, not an image created by another provider who happened to name their image "CentOS Linux".

That approach did not work for CentOS 8, however. It was found that CentOS 8 is not published to the AWS Marketplace; while the images are still public. Additionally, the Name string had changed slightly, causing the search based on "CentOS Linux" to never match centos-8. For CentOS 8+, the Name match is adjusted, and we use the OwnerID to match the publisher of the image.

Specifying simply "centos" will now provide the latest centos-8 image, as expected; previously it would provide the latest centos-7 image.

Search tested on centos 6,7,8 on regions us-east-1, us-east-2, and us-west-2.

Unit tests updated.

Issues Resolved

Fixes #456
Closes chef/chef-workstation#1311

Check List

  • All tests pass. See TESTING.md for details.
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

…l source

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
@tyler-ball tyler-ball merged commit b08af1d into test-kitchen:master Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants