fix amazon linux1 platform and version detection #394
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The case statement for platform detections seems to have a string for wildcard (*) which fails to fetch metadata for amazon linux 1 during chef install. Fixing this.
Description
We encountered many instances running Amazon Linux 1 throwing the following output, it looks like the platform and version are not correctly updated because of the wildcard being a string in the case statement.
amazon linux ami 2018.03 x86_64
Getting information for chef stable for amazon linux ami...
downloading https://omnitruck.chef.io/stable/chef/metadata?v=&p=amazon linux ami&pv=2018.03&m=x86_64
to file /tmp/install.sh.27900/metadata.txt
trying wget...
trying curl...
cat: /tmp/install.sh.27900/metadata.txt: No such file or directory
grep: /tmp/install.sh.27900/metadata.txt: No such file or directory
downloaded metadata file is corrupted or an uncaught error was encountered in downloading the file...
Version:
Please file a Bug Report at https://github.com/chef/omnitruck/issues/new
Alternatively, feel free to open a Support Ticket at https://www.chef.io/support/tickets
More Chef support resources can be found at https://www.chef.io/support
Please include as many details about the problem as possible i.e., how to reproduce
the problem (if possible), type of the Operating System and its version, etc.,
and any other relevant details that might help us with troubleshooting.
Related Issue
#393
Types of changes
Checklist:
Gemfile.lock
has changed, I have used--conservative
to do it and included the full output in the Description above.