Description of problem:
An unexpected validation failure occurs when creating the agent ISO image if the RendezvousIP is a substring of the next-hop-address set for a worker node.
For example this configuration snippet in agent-config.yaml:
apiVersion: v1alpha1
kind: AgentConfig
metadata:
name: agent-config
rendezvousIP: 7.162.6.1
hosts:
...
- hostname: worker-0
role: worker
networkConfig:
interfaces:
- name: eth0
type: Ethernet
state: up
ipv4:
enabled: true
address:
- ip: 7.162.6.4
prefix-length: 25
dhcp: false
routes:
config:
- destination: 0.0.0.0/0
next-hop-address: 7.162.6.126
next-hop-interface: eth0
table-id: 254
Will result in the validation failure when creating the image:
FATAL failed to fetch Agent Installer ISO: failed to fetch dependency of "Agent Installer ISO": failed to fetch dependency of "Agent Installer Artifacts": failed to fetch dependency of "Agent Installer Ignition": failed to fetch dependency of "Agent Manifests": failed to fetch dependency of "NMState Config": failed to generate asset "Agent Hosts": invalid Hosts configuration: [Hosts[3].Host: Forbidden: Host worker-0 has role 'worker' and has the rendezvousIP assigned to it. The rendezvousIP must be assigned to a control plane host.
The problem is this check here https://github.com/openshift/installer/pull/6716/files#diff-fa305fe33630f77b65bd21cc9473b620f67cfd9ce35f7ddf24d03b26ec2ccfffR293
Its checking for the IP in the raw nmConfig. The problem is the routes stanza is also included in the nmConfig and the route is
next-hop-address: 7.162.6.126
So when rendezvousIP is 7.162.6.1 that strings.Contains() check returns true and the validation fails.
- blocks
-
OCPBUGS-44261 Validation failure when RendezvousIP is a substring of next-hop-address
-
- Closed
-
- is cloned by
-
OCPBUGS-44261 Validation failure when RendezvousIP is a substring of next-hop-address
-
- Closed
-
- links to
-
RHEA-2024:6122
OpenShift Container Platform 4.18.z bug fix update