Skip to content

OCPBUGS-38869: MCN are not updated when we use OCL #4579

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

Closed
Closed
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
17 changes: 17 additions & 0 deletions pkg/daemon/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,23 @@ func (dn *Daemon) updateOnClusterBuild(oldConfig, newConfig *mcfgv1.MachineConfi
return err
}

// Determine the pool (worker or master) based on the node's labels
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Couldn't this be custom pool (ie non-{worker/master}), too?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MCN technically doesn't yet support custom pools: https://issues.redhat.com/browse/MCO-1299

pool := ""
var ok bool
if dn.node != nil {
if _, ok = dn.node.Labels["node-role.kubernetes.io/worker"]; ok {
pool = "worker"
} else if _, ok = dn.node.Labels["node-role.kubernetes.io/master"]; ok {
pool = "master"
}
}

// Ensure the MCN spec is updated with the correct desiredConfig
err = upgrademonitor.GenerateAndApplyMachineConfigNodeSpec(dn.featureGatesAccessor, pool, dn.node, dn.mcfgClient)
if err != nil {
return fmt.Errorf("error updating MCN spec for node %s: %w", dn.node.Name, err)
}

defer func() {
if retErr != nil {
odc.currentConfig = oldConfig
Expand Down