This is a clone of issue OCPBUGS-49784. The following is the description of the original issue:
—
Description of problem:
When a clusternetwork entry has an invalid hostPrefix, which is <= CIDR mask and the custom IPv4 join subnet is provided in the install-config, the installer gives a runtime panic error: negative shift amount The error is expected to occur as it is an invalid configuration, but a more descriptive error should be returned instead of panics.
Version-Release number of selected component (if applicable):
How reproducible:
Always
Steps to Reproduce:
Create a cluster with the following install-config (i.e. some fields are intentionally not included):
```
additionalTrustBundlePolicy: Proxyonly
apiVersion: v1
baseDomain: devcluster.openshift.com
compute:
- architecture: amd64
hyperthreading: Enabled
name: worker
platform: {}
replicas: 3
controlPlane:
architecture: amd64
hyperthreading: Enabled
name: master
platform: {}
replicas: 3
metadata:
creationTimestamp: null
name: thvo-dev
networking:
clusterNetwork:
- cidr: 10.128.0.0/19
hostPrefix: 18 # Bad because hostPrefix must be >= 19
- cidr: 10.128.32.0/19
hostPrefix: 23
machineNetwork:
- cidr: 10.0.0.0/16
networkType: OVNKubernetes
serviceNetwork:
- 172.30.0.0/16
ovnKubernetesConfig:
ipv4:
internalJoinSubnet: 101.64.0.0/16
platform:
aws:
region: us-east-1
publish: External
```
Actual results:
panic: runtime error: negative shift amount
Expected results:
A descriptive user-friendly error that points out why it is invalid
Additional info:
- clones
-
OCPBUGS-49784 Runtime panic occurs when clusternetwork CIDR mask is greater than hostPrefix and OVN ipv4 join subnet is provided
-
- Closed
-
- is blocked by
-
OCPBUGS-49784 Runtime panic occurs when clusternetwork CIDR mask is greater than hostPrefix and OVN ipv4 join subnet is provided
-
- Closed
-
- links to
-
RHBA-2025:1904
OpenShift Container Platform 4.18.z bug fix update