Skip to content

Commit 7c6b3ce

Browse files
committed
Debug blocking ipsec upgrade due to mcp pause
We noticied network operator goes ahead with deploying newer ipsec dameon though some of the custom machine config pools are in paused state (which means IPsec machine configs are not deployed on those pool nodes yet). machine config pool label selectors and processing of these labels in cno seem to be okay, so need to find out which causes cno to continue with rendering newer ipsec daemon set and it fails on these pool nodes because ipsec packages are not installed, hence networks co goes into progressing state. Signed-off-by: Periyasamy Palanisamy <[email protected]>
1 parent 6d9f739 commit 7c6b3ce

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pkg/network/ovn_kubernetes.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,8 @@ func shouldRenderIPsec(conf *operv1.OVNKubernetesConfig, bootstrapResult *bootst
632632
// While OVN ipsec is being upgraded and IPsec MachineConfigs deployment is in progress
633633
// (or) IPsec config in OVN is being disabled, then ipsec deployment is not updated.
634634
renderIPsecDaemonSetAsCreateWaitOnly = isIPsecMachineConfigNotActiveOnUpgrade || (isOVNIPsecActive && !renderIPsecOVN)
635+
klog.Infof("IPsec upgrade block: isIpsecUpgrade=%t, isIPsecMachineConfigNotActiveOnUpgrade=%t, renderIPsecDaemonSetAsCreateWaitOnly=%t",
636+
isIpsecUpgrade, isIPsecMachineConfigNotActiveOnUpgrade, renderIPsecDaemonSetAsCreateWaitOnly)
635637

636638
return
637639
}
@@ -1473,13 +1475,17 @@ func isIPsecMachineConfigActive(infra bootstrap.InfraStatus) bool {
14731475
}
14741476
for _, masterMCPStatus := range infra.MasterMCPStatuses {
14751477
if !ipSecPluginOnPool(masterMCPStatus, infra.MasterIPsecMachineConfigs) {
1478+
klog.Infof("IPsec upgrade block: master mcp %v is not ready with ipsec plugin", masterMCPStatus)
14761479
return false
14771480
}
1481+
klog.Infof("IPsec upgrade block: master mcp %v is ready with ipsec plugin", masterMCPStatus)
14781482
}
14791483
for _, workerMCPStatus := range infra.WorkerMCPStatuses {
14801484
if !ipSecPluginOnPool(workerMCPStatus, infra.WorkerIPsecMachineConfigs) {
1485+
klog.Infof("IPsec upgrade block: worker mcp %v is not ready with ipsec plugin", workerMCPStatus)
14811486
return false
14821487
}
1488+
klog.Infof("IPsec upgrade block: worker mcp %v is ready with ipsec plugin", workerMCPStatus)
14831489
}
14841490
return true
14851491
}

pkg/platform/platform.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,16 @@ func getMachineConfigPoolStatuses(ctx context.Context, client cnoclient.Client,
250250
}
251251
var mcpStatuses []mcfgv1.MachineConfigPoolStatus
252252
for _, mcp := range mcpList.Items {
253+
klog.Infof("IPsec upgrade block: retrieved machine config pool: %s", mcp.Name)
253254
mcSelector, err := metav1.LabelSelectorAsSelector(mcp.Spec.MachineConfigSelector)
254255
if err != nil {
255256
return nil, fmt.Errorf("invalid machine config label selector in %s pool", mcp.Name)
256257
}
257258
if mcSelector.Matches(mcLabel) {
259+
klog.Infof("IPsec upgrade block: machine config pool %s matches with label: %s", mcp.Name, mcLabel.String())
258260
mcpStatuses = append(mcpStatuses, mcp.Status)
259261
}
260262
}
263+
klog.Infof("IPsec upgrade block: %d number of machine config pools matches with label: %s", len(mcpStatuses), mcLabel.String())
261264
return mcpStatuses, nil
262265
}

0 commit comments

Comments
 (0)