Skip to content

Commit 6db25a8

Browse files
committed
OCPBUGS-18428: Add ip=dhcp,dhcp6 kernel param for vSphere dual-stack
We have observed that when booting up the node, IPv4 and IPv6 stacks can come up at different times causing OpenShift networking services to start when IPv4 is ready but IPv6 is not. This is not desired for dual-stack setups where both stacks should be up before we proceed further. With this PR we are adding `ip=dhcp,dhcp6` kernel param to master and worker nodes in vSphere scenario when cluster is deployed as dual-stack. This PR handles only a scenario of initial cluster installation. Conversion from single-stack to dual-stack will be handled separately. Fixes: OCPBUGS-18428 Contributes-to: OPNET-230
1 parent 9039784 commit 6db25a8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/asset/machines/master.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,8 @@ func (m *Master) Generate(dependencies asset.Parents) error {
557557
// The maximum number of networks supported on ServiceNetwork is two, one IPv4 and one IPv6 network.
558558
// The cluster-network-operator handles the validation of this field.
559559
// Reference: https://github.com/openshift/cluster-network-operator/blob/fc3e0e25b4cfa43e14122bdcdd6d7f2585017d75/pkg/network/cluster_config.go#L45-L52
560-
if ic.Platform.Name() == openstacktypes.Name && len(installConfig.Config.ServiceNetwork) == 2 {
560+
if ic.Networking != nil && len(ic.Networking.ServiceNetwork) == 2 &&
561+
(ic.Platform.Name() == openstacktypes.Name || ic.Platform.Name() == vspheretypes.Name) {
561562
// Only configure kernel args for dual-stack clusters.
562563
ignIPv6, err := machineconfig.ForDualStackAddresses("master")
563564
if err != nil {

pkg/asset/machines/worker.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ func (w *Worker) Generate(dependencies asset.Parents) error {
298298
// The maximum number of networks supported on ServiceNetwork is two, one IPv4 and one IPv6 network.
299299
// The cluster-network-operator handles the validation of this field.
300300
// Reference: https://github.com/openshift/cluster-network-operator/blob/fc3e0e25b4cfa43e14122bdcdd6d7f2585017d75/pkg/network/cluster_config.go#L45-L52
301-
if ic.Platform.Name() == openstacktypes.Name && len(installConfig.Config.ServiceNetwork) == 2 {
301+
if ic.Networking != nil && len(ic.Networking.ServiceNetwork) == 2 &&
302+
(ic.Platform.Name() == openstacktypes.Name || ic.Platform.Name() == vspheretypes.Name) {
302303
// Only configure kernel args for dual-stack clusters.
303304
ignIPv6, err := machineconfig.ForDualStackAddresses("worker")
304305
if err != nil {

0 commit comments

Comments
 (0)