Bug 1867975 - [aws-custom-region]If no amiID specified in us-gov region, installer will try to copy AMI image which is not allowed from us-gov.
Summary: [aws-custom-region]If no amiID specified in us-gov region, installer will try...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 4.6.0
Assignee: Abhinav Dahiya
QA Contact: Yunfei Jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-11 10:00 UTC by Yunfei Jiang
Modified: 2020-10-27 16:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 16:27:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
install log (412.04 KB, text/plain)
2020-08-11 10:00 UTC, Yunfei Jiang
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4103 0 None closed Bug 1867975: aws: ensure users set ami id for us-gov and cn regions 2021-01-23 09:18:45 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:27:43 UTC

Description Yunfei Jiang 2020-08-11 10:00:09 UTC
Created attachment 1711057 [details]
install log

Copy AMI image is not supported by us-gov region, the custom AMI must be specified.
When trying to install a cluster without amiID, the installer will also try to do `copy ami` action:

time="2020-08-10T14:31:14Z" level=error msg="Error: InvalidRequest: Copy image not allowed from specified region."
time="2020-08-10T14:31:14Z" level=error msg="\tstatus code: 400, request id: cb654de4-8e1e-400d-ac98-303cffce8a62"

If install a cluster in us-gov region, but do not provide amiID, install should be report a validation error instead of trying to do an unsupported action which is a known limitation.

install config:
```
compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform: {}
  replicas: 3
controlPlane:
  architecture: amd64
  hyperthreading: Enabled
  name: master
  platform: {}
  replicas: 3
metadata:
  creationTimestamp: null
  name: yunjiang-us-noep
networking:
  clusterNetwork:
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  machineNetwork:
  - cidr: 10.0.0.0/16
  networkType: OpenShiftSDN
  serviceNetwork:
  - 172.30.0.0/16
platform:
  aws:
    region: us-gov-west-1
publish: Internal
```

Version-Release number of the following components: 
4.6.0-0.nightly-2020-08-09-151434
 
How reproducible: 
Always 
 
Steps to Reproduce: 
1. Create a private cluster with abobe install-config
 
Actual results: 

time="2020-08-10T14:31:14Z" level=error msg="Error: InvalidRequest: Copy image not allowed from specified region."
time="2020-08-10T14:31:14Z" level=error msg="\tstatus code: 400, request id: cb654de4-8e1e-400d-ac98-303cffce8a62"
time="2020-08-10T14:31:14Z" level=error
time="2020-08-10T14:31:14Z" level=error msg="  on ../../../tmp/openshift-install-651586325/main.tf line 114, in resource \"aws_ami_copy\" \"imported\":"
time="2020-08-10T14:31:14Z" level=error msg=" 114: resource \"aws_ami_copy\" \"imported\" {"
time="2020-08-10T14:31:14Z" level=error

Expected results: 
do not try to do copy action, install reports a validation error

Additional info:

Comment 3 Yunfei Jiang 2020-09-11 09:16:47 UTC
verified. PASS.
version: 4.6.0-0.nightly-2020-09-10-195619

Comment 5 errata-xmlrpc 2020-10-27 16:27:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.