Bug 1835867 - AWS: installer is leaving unused network ranges when it shouldn't
Summary: AWS: installer is leaving unused network ranges when it shouldn't
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Abhinav Dahiya
QA Contact: Yunfei Jiang
URL:
Whiteboard:
Depends On:
Blocks: 1836982
TreeView+ depends on / blocked
 
Reported: 2020-05-14 16:05 UTC by Abhinav Dahiya
Modified: 2021-01-29 17: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-07-13 17:38:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3599 0 None closed Bug 1835867: data/data/aws/vpc: create subnet sizes based on az count 2021-01-25 15:46:18 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:39:10 UTC

Description Abhinav Dahiya 2020-05-14 16:05:07 UTC
Description of problem:

When trying to create a cluster with,
- machineNetwork: 10.0.0.0/16
- only one AZ ca-central-1b
the installer creates subnets with 10.0.0.0/20 and  10.0.128.0/20.
With this setup only 4096*2 machines can be created. and the rest of the VPC range is left completely used. This is esp problematic for smaller machineNetworks.

The installer should have created the subnets with 10.0.0.0/17 and 10.0.128.0/17 ranges.

example of the install-config.yaml used.
```
apiVersion: v1
baseDomain: XXXXXX
controlPlane:
  name: master
  replicas: 3
  platform:
    aws:
      zones:
      - ca-central-1b
compute:
- name: worker
  replicas: 3
  platform:
    aws:
      zones:
        - ca-central-1b
metadata:
  name: xxxxx
networking:
  machineNetwork:
  - cidr: 10.0.0.0/16
platform:
  aws:
    region: ca-central-1
```

Comment 3 errata-xmlrpc 2020-07-13 17:38:54 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, 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:2409

Comment 4 To Hung Sze 2021-01-29 17:27:14 UTC
Just capturing results from my test run just now with 4.7 fc4:

Started with
compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform: 
    aws:
      zones:
      - us-east-2b 
  replicas: 3
controlPlane:
  architecture: amd64
  hyperthreading: Enabled
  name: master
  platform:  
    aws:
      zones:
      - us-east-2b
  replicas: 3
...
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-east-2 

Ends with two subnets:
tszeaws012921b-674lr-public-us-east-2b     10.0.0.0/17
tszeaws012921b-674lr-private-us-east-2b    10.0.128.0/17

It also doesn't apply to GCP as GCP uses one subnet across all zones (AWS needs different subnets for each zone).


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