Bug 1684990

Summary: controlPlane.platform.aws.zones in install-config.yaml does not take effect
Product: OpenShift Container Platform Reporter: Qin Ping <piqin>
Component: InstallerAssignee: Alex Crawford <crawford>
Installer sub component: openshift-installer QA Contact: Qin Ping <piqin>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: medium    
Priority: medium CC: wking
Version: 4.1.0   
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-08 17:42:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qin Ping 2019-03-04 05:38:12 UTC
Description of problem:
Create cluster with customized install-config.yaml. But the zones stetting for master did not take effect.

Version-Release number of the following components:
$ ./openshift-install version
./openshift-install v4.0.6-1-dirty

How reproducible:
always

Steps to Reproduce:
1. Create install-config with installer.
# ./openshift-install create install-config --dir test
2. Edit install-config.yaml to change master and worker replicas and instance type as following:
<--snip-->
compute:
- name: worker
  platform:
    aws:
      zones:
      - us-ap-northeast-2a
      - us-ap-northeast-2b
      type: m5.xlarge
  replicas: 3
controlPlane:
  name: master
  platform:
    aws:
      zones:
      - us-ap-northeast-2c
      type: m5.xlarge
  replicas: 3
<--snip-->
platform:
  aws:
    region: ap-northeast-1
<--snip-->
3. Create cluster with above install-config.
# ./openshift-install create cluster --dir test

Actual results:
APIServer launched successfully, the workers created failed.

Expected results:
APIServer should launch failed for the error platform zones.

Additional info:
$ oc get machines qe-piqin2-2ht6z-master-0 -n openshift-machine-api --config=test1/auth/kubeconfig  -oyaml
apiVersion: machine.openshift.io/v1beta1
kind: Machine
metadata:
 <--snip-->
spec:
   <--snip-->
      placement:
        availabilityZone: us-ap-northeast-2c
        region: ap-northeast-1
      publicIp: null
 <--snip-->

Comment 1 W. Trevor King 2019-03-05 07:33:19 UTC
You're asking for validation checks to ensure that the requested zones lie in the requested region?

Comment 2 Qin Ping 2019-03-05 07:42:07 UTC
I think we should launch master instances according to the controlPlane.platform.aws.zones, if the zones do not exist, master instances should not be launched.

Comment 4 Qin Ping 2019-03-08 01:30:45 UTC
Verified with:
$ ./openshift-install version
./openshift-install v4.0.16-1-dirty