Skip to content
Merged
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
32 changes: 0 additions & 32 deletions pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,6 @@ func (optr *Operator) syncUpgradeableStatus(co *configv1.ClusterOperator) error
Reason: asExpectedReason,
}

configNode, err := optr.nodeClusterLister.Get(ctrlcommon.ClusterNodeInstanceName)
if err != nil {
return err
}
if configNode.Spec.CgroupMode == configv1.CgroupModeV1 {
Copy link
Member

Choose a reason for hiding this comment

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

Can you also remove this CgroupModeV1 constant from the API repo? Simplifying API docs by removing options we no longer allow users to set seems like a win with no downsides.

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree with you @wking . The only reason this wasn't removed earlier was the clusterfleetevaluation check.
But I think this check can also be removed with the cgroupv1 getting removed from all the ocp>4.19 clusters.
Let me update the commit with those changes as well.

Copy link
Member Author

@sairameshv sairameshv Nov 11, 2025

Choose a reason for hiding this comment

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

Here are the follow-up PRs @wking , Could you help tagging them?

openshift/api#2579
openshift/cluster-node-tuning-operator#1428

coStatusCondition.Status = configv1.ConditionFalse
coStatusCondition.Reason = "ClusterOnCgroupV1"
coStatusCondition.Message = "Cluster is using deprecated cgroup v1 and is not upgradable. Please update the `CgroupMode` in the `nodes.config.openshift.io` object to 'v2'. Once upgraded, the cluster cannot be changed back to cgroup v1"
}
var degraded, interrupted bool
for _, pool := range pools {
interrupted = isPoolStatusConditionTrue(pool, mcfgv1.MachineConfigPoolBuildInterrupted)
Expand Down Expand Up @@ -386,14 +377,6 @@ func (optr *Operator) generateClusterFleetEvaluations() ([]string, error) {
evaluations = append(evaluations, "runc: transition to default crun")
}

enabled, err = optr.cfeEvalCgroupsV1()
if err != nil {
return evaluations, err
}
if enabled {
evaluations = append(evaluations, "cgroupsv1: support has been deprecated in favor of cgroupsv2")
}

sort.Strings(evaluations)

return evaluations, nil
Expand Down Expand Up @@ -444,21 +427,6 @@ func (optr *Operator) cfeEvalRunc() (bool, error) {
return false, nil
}

func (optr *Operator) cfeEvalCgroupsV1() (bool, error) {
// check for nil so we do not have to mock within tests
if optr.nodeClusterLister == nil {
return false, nil
}
nodeClusterConfig, err := optr.nodeClusterLister.Get(ctrlcommon.ClusterNodeInstanceName)
if err != nil {
if apierrors.IsNotFound(err) {
return false, nil
}
return false, err
}
return nodeClusterConfig.Spec.CgroupMode == configv1.CgroupModeV1, nil
}

// GetAllManagedNodes returns the nodes managed by MCO
func (optr *Operator) GetAllManagedNodes(pools []*mcfgv1.MachineConfigPool) ([]*corev1.Node, error) {
nodes := []*corev1.Node{}
Expand Down