Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release 4.18] OCPBUGS-50954: In OCL, MCPs are reporting Updating=false while the image is being built #4859

Open
wants to merge 1 commit into
base: release-4.18
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pkg/controller/node/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,21 @@ func (ctrl *Controller) calculateStatus(fg featuregates.FeatureGate, mcs []*mcfg
}
}

if mosc != nil && !pool.Spec.Paused {
// MOSC exists but MOSB doesn't exist yet -> change MCP to update
if mosb == nil {
updating := apihelpers.NewMachineConfigPoolCondition(mcfgv1.MachineConfigPoolUpdating, corev1.ConditionTrue, "", fmt.Sprintf("Pool is waiting for a new OS image build to start (mosc: %s)", mosc.Name))
apihelpers.SetMachineConfigPoolCondition(&status, *updating)
} else {
// Some cases we have an old MOSB object that still exists, we still update MCP
mosbState := ctrlcommon.NewMachineOSBuildState(mosb)
if mosbState.IsBuilding() || mosbState.IsBuildPrepared() {
updating := apihelpers.NewMachineConfigPoolCondition(mcfgv1.MachineConfigPoolUpdating, corev1.ConditionTrue, "", fmt.Sprintf("Pool is waiting for OS image build to complete (mosb: %s)", mosb.Name))
apihelpers.SetMachineConfigPoolCondition(&status, *updating)
}
}
}

var nodeDegraded bool
for _, m := range degradedMachines {
klog.Infof("Degraded Machine: %v and Degraded Reason: %v", m.Name, m.Annotations[constants.MachineConfigDaemonReasonAnnotationKey])
Expand Down