diff --git a/pkg/frontend/openshiftcluster_putorpatch.go b/pkg/frontend/openshiftcluster_putorpatch.go index 8bd28252828..f0ce2d81965 100644 --- a/pkg/frontend/openshiftcluster_putorpatch.go +++ b/pkg/frontend/openshiftcluster_putorpatch.go @@ -343,10 +343,6 @@ func adminUpdateProvisioningState(doc *api.OpenShiftClusterDocument) { case api.MaintenanceTaskPending: doc.OpenShiftCluster.Properties.MaintenanceState = api.MaintenanceStatePending case api.MaintenanceTaskNone: - // If customer took action to fix failed maintenance, we can reset the last admin update error - if doc.OpenShiftCluster.Properties.MaintenanceState == api.MaintenanceStateCustomerActionNeeded { - doc.OpenShiftCluster.Properties.LastAdminUpdateError = "" - } doc.OpenShiftCluster.Properties.MaintenanceState = api.MaintenanceStateNone case api.MaintenanceTaskCustomerActionNeeded: doc.OpenShiftCluster.Properties.MaintenanceState = api.MaintenanceStateCustomerActionNeeded diff --git a/pkg/frontend/openshiftcluster_putorpatch_test.go b/pkg/frontend/openshiftcluster_putorpatch_test.go index bcee0379cf1..b4eaed258ee 100644 --- a/pkg/frontend/openshiftcluster_putorpatch_test.go +++ b/pkg/frontend/openshiftcluster_putorpatch_test.go @@ -1563,7 +1563,8 @@ func TestPutOrPatchOpenShiftClusterAdminAPI(t *testing.T) { ClusterProfile: api.ClusterProfile{ FipsValidatedModules: api.FipsValidatedModulesDisabled, }, - MaintenanceTask: "", + LastAdminUpdateError: "error", + MaintenanceTask: "", NetworkProfile: api.NetworkProfile{ OutboundType: api.OutboundTypeLoadbalancer, PreconfiguredNSG: api.PreconfiguredNSGDisabled, @@ -1605,8 +1606,9 @@ func TestPutOrPatchOpenShiftClusterAdminAPI(t *testing.T) { MasterProfile: admin.MasterProfile{ EncryptionAtHost: admin.EncryptionAtHostDisabled, }, - OperatorFlags: admin.OperatorFlags{"testFlag": "true"}, - MaintenanceState: admin.MaintenanceStateNone, + OperatorFlags: admin.OperatorFlags{"testFlag": "true"}, + MaintenanceState: admin.MaintenanceStateNone, + LastAdminUpdateError: "error", }, }, },