Skip to content

Commit 704f74a

Browse files
committed
Remove the dead code of setting the operator status for cgroupv1
clusters - Option of configuring cgroupv1 has been removed in OCP - 4.19 - It is safe to remove this check from the operator status for all the clusters greater than OCP - 4.19 - Also removed the cluster fleet evaluation that checks if a cluster is configured with cgroupv1 Signed-off-by: Sai Ramesh Vanka <svanka@redhat.com>
1 parent 5c5e056 commit 704f74a

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

pkg/operator/status.go

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -271,16 +271,6 @@ func (optr *Operator) syncUpgradeableStatus(co *configv1.ClusterOperator) error
271271
Reason: asExpectedReason,
272272
}
273273

274-
configNode, err := optr.nodeClusterLister.Get(ctrlcommon.ClusterNodeInstanceName)
275-
if err != nil {
276-
return err
277-
}
278-
if configNode.Spec.CgroupMode == configv1.CgroupModeV1 {
279-
coStatusCondition.Status = configv1.ConditionFalse
280-
coStatusCondition.Reason = "ClusterOnCgroupV1"
281-
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"
282-
}
283-
284274
// Check for ClusterImagePolicy named "openshift" which conflicts with the cluster default ClusterImagePolicy object
285275
// Only check for Default featureSet clusters allowing 4.20 ci techpreview builds upgrades
286276
// Use SigstoreImageVerificationPKI as an featureset indicator: if it's disabled, the cluster is on Default feature set
@@ -402,14 +392,6 @@ func (optr *Operator) generateClusterFleetEvaluations() ([]string, error) {
402392
evaluations = append(evaluations, "runc: transition to default crun")
403393
}
404394

405-
enabled, err = optr.cfeEvalCgroupsV1()
406-
if err != nil {
407-
return evaluations, err
408-
}
409-
if enabled {
410-
evaluations = append(evaluations, "cgroupsv1: support has been deprecated in favor of cgroupsv2")
411-
}
412-
413395
sort.Strings(evaluations)
414396

415397
return evaluations, nil
@@ -460,21 +442,6 @@ func (optr *Operator) cfeEvalRunc() (bool, error) {
460442
return false, nil
461443
}
462444

463-
func (optr *Operator) cfeEvalCgroupsV1() (bool, error) {
464-
// check for nil so we do not have to mock within tests
465-
if optr.nodeClusterLister == nil {
466-
return false, nil
467-
}
468-
nodeClusterConfig, err := optr.nodeClusterLister.Get(ctrlcommon.ClusterNodeInstanceName)
469-
if err != nil {
470-
if apierrors.IsNotFound(err) {
471-
return false, nil
472-
}
473-
return false, err
474-
}
475-
return nodeClusterConfig.Spec.CgroupMode == configv1.CgroupModeV1, nil
476-
}
477-
478445
// GetAllManagedNodes returns the nodes managed by MCO
479446
func (optr *Operator) GetAllManagedNodes(pools []*mcfgv1.MachineConfigPool) ([]*corev1.Node, error) {
480447
nodes := []*corev1.Node{}

0 commit comments

Comments
 (0)