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
10 changes: 10 additions & 0 deletions pkg/operator/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ func (optr *Operator) syncUpgradeableStatus(co *configv1.ClusterOperator) error
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"
Copy link
Member

Choose a reason for hiding this comment

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

cgroup v1 was removed in 4.19. I dunno how this block still exists in the 4.20 controller? I'm also surprised that the API repo's dev branch still includes CgroupModeV1. Not something you need to deal with; I was just looking at this block while wondering how concerned I was about this function's "last complaint wins" competition over a single coStatusCondition.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it totally makes sense to remove this dead code from the clusters > 4.19
Created a PR here for the same
This can be back-ported to release-4.20 branch as well

}

// Check for ClusterImagePolicy named "openshift" which conflicts with the cluster default ClusterImagePolicy object
if _, err = optr.configClient.ConfigV1().ClusterImagePolicies().Get(context.TODO(), "openshift", metav1.GetOptions{}); err == nil {
coStatusCondition.Status = configv1.ConditionFalse
coStatusCondition.Reason = "ConflictingClusterImagePolicy"
coStatusCondition.Message = "ClusterImagePolicy resource named 'openshift' conflicts with the cluster default ClusterImagePolicy object and blocks upgrades. Please delete the 'openshift' ClusterImagePolicy resource and reapply it with a different name if needed"
} else if !apierrors.IsNotFound(err) {
return err
}

var degraded, interrupted bool
for _, pool := range pools {
interrupted = isPoolStatusConditionTrue(pool, mcfgv1.MachineConfigPoolBuildInterrupted)
Expand Down