Bug 1973421

Summary: [4.8] improve dual-stack install-config validation
Product: OpenShift Container Platform Reporter: Dan Winship <danw>
Component: InstallerAssignee: Dan Winship <danw>
Installer sub component: openshift-installer QA Contact: Pedro Amoedo <pamoedom>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: bleanhar, gpei, mko, pamoedom, rfreiman
Version: 4.9   
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1972776 Environment:
Last Closed: 2021-09-21 08:01:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1972776    
Bug Blocks:    

Description Dan Winship 2021-06-17 19:21:03 UTC
+++ This bug was initially created as a clone of Bug #1972776 +++

We should make validation of dual-stack install-configs slightly better. Specifically, we should block "IPv6-primary" dual-stack configs, eg:

    networking:
      clusterNetwork:
      - cidr: fd01::/48
        hostPrefix: 64
      - cidr: 10.128.0.0/14
        hostPrefix: 23
      machineNetwork:
      - cidr: fc00::/48
      - cidr: 10.0.0.0/16
      networkType: OVNKubernetes
      serviceNetwork:
      - fd02::/112
      - 10.1.0.0/16

because that will currently result in a failed install

Comment 2 Antonio Ojea 2021-08-04 09:10:07 UTC
*** Bug 1989748 has been marked as a duplicate of this bug. ***

Comment 7 Pedro Amoedo 2021-09-10 16:20:38 UTC
[QA Summary]

[Version]

The PR "openshift/installer#5114" is not yet present within Nightly nor CI releases, therefore, I'm using the following local compiled version:

~~~
$ git --no-pager log --oneline --first-parent origin/release-4.8 -3
450e95767 (HEAD -> release-4.8, origin/release-4.8) Merge pull request #5114 from danwinship/ipv6-validation-4.8
c06e9b156 Merge pull request #5122 from shiftstack/bp48_bz1978213
24fcf7a2e Merge pull request #5051 from miabbott/bz1969651

$ ./openshift-install-local version
./openshift-install-local unreleased-master-4679-g450e95767d89f809cb1afe5a142e9c824a269de8
built from commit 450e95767d89f809cb1afe5a142e9c824a269de8
release image registry.ci.openshift.org/origin/release:4.8
~~~

[Parameters]

~~~
networking:
  clusterNetwork:
  - cidr: fd01::/48
    hostPrefix: 64
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  machineNetwork:
  - cidr: fc00::/48
  - cidr: 10.0.0.0/16
  networkType: OVNKubernetes
  serviceNetwork:
  - fd02::/112
  - 10.1.0.0/16
~~~

[Results]      

~~~
$ ./openshift-install-local create cluster --dir bz1973421/ --log-level debug
DEBUG OpenShift Installer unreleased-master-4679-g450e95767d89f809cb1afe5a142e9c824a269de8 
DEBUG Built from commit 450e95767d89f809cb1afe5a142e9c824a269de8 
DEBUG Fetching Metadata...                         
DEBUG Loading Metadata...                          
DEBUG   Loading Cluster ID...                      
DEBUG     Loading Install Config...                
DEBUG       Loading SSH Key...                     
DEBUG       Loading Base Domain...                 
DEBUG         Loading Platform...                  
DEBUG       Loading Cluster Name...                
DEBUG         Loading Base Domain...               
DEBUG         Loading Platform...                  
DEBUG       Loading Networking...                  
DEBUG         Loading Platform...                  
DEBUG       Loading Pull Secret...                 
DEBUG       Loading Platform...                    
FATAL failed to fetch Metadata: failed to load asset "Install Config": invalid "install-config.yaml" file: [networking: Invalid value: "DualStack": dual-stack IPv4/IPv6 is not supported for this platform, specify only one type of address, networking.clusterNetwork: Invalid value: "fd01::/48, 10.128.0.0/14": IPv4 addresses must be listed before IPv6 addresses, networking.machineNetwork: Invalid value: "fc00::/48, 10.0.0.0/16": IPv4 addresses must be listed before IPv6 addresses, networking.serviceNetwork: Invalid value: "fd02::/112, 10.1.0.0/16": IPv4 addresses must be listed before IPv6 addresses]
~~~

*** PASSED ***

Comment 10 errata-xmlrpc 2021-09-21 08:01:42 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.8.12 bug fix update), 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-2021:3511