Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docs/dev/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Metrics about cluster operators:
# HELP cluster_operator_conditions Report the conditions for active cluster operators. 0 is False and 1 is True.
# TYPE cluster_operator_conditions gauge
cluster_operator_conditions{condition="Available",name="version",namespace="openshift-cluster-version"} 1
cluster_operator_conditions{condition="Failing",name="version",namespace="openshift-cluster-version"} 0
cluster_operator_conditions{condition="Degraded",name="version",namespace="openshift-cluster-version"} 0
cluster_operator_conditions{condition="Progressing",name="version",namespace="openshift-cluster-version"} 0
cluster_operator_conditions{condition="RetrievedUpdates",name="version",namespace="openshift-cluster-version"} 0
# HELP cluster_operator_up Reports key highlights of the active cluster operators.
Expand Down
36 changes: 18 additions & 18 deletions pkg/cvo/cvo_scenarios_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestCVO_StartupAndSync(t *testing.T) {
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionFalse},
// report back to the user that we don't have enough info to proceed
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionTrue, Message: "No configured operator version, unable to update cluster"},
{Type: ClusterStatusFailing, Status: configv1.ConditionTrue, Message: "No configured operator version, unable to update cluster"},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Message: "Unable to apply <unknown>: an error occurred"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -204,7 +204,7 @@ func TestCVO_StartupAndSync(t *testing.T) {
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionFalse},
// cleared failing status and set progressing
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Message: "Working towards 4.0.1"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -290,7 +290,7 @@ func TestCVO_StartupAndSync(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -432,7 +432,7 @@ func TestCVO_StartupAndSyncUnverifiedPayload(t *testing.T) {
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionFalse},
// report back to the user that we don't have enough info to proceed
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionTrue, Message: "No configured operator version, unable to update cluster"},
{Type: ClusterStatusFailing, Status: configv1.ConditionTrue, Message: "No configured operator version, unable to update cluster"},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Message: "Unable to apply <unknown>: an error occurred"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -475,7 +475,7 @@ func TestCVO_StartupAndSyncUnverifiedPayload(t *testing.T) {
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionFalse},
// cleared failing status and set progressing
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Message: "Working towards 4.0.1"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -561,7 +561,7 @@ func TestCVO_StartupAndSyncUnverifiedPayload(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -648,7 +648,7 @@ func TestCVO_UpgradeUnverifiedPayload(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -732,7 +732,7 @@ func TestCVO_UpgradeUnverifiedPayload(t *testing.T) {
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
// cleared failing status and set progressing
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionTrue, Reason: "ImageVerificationFailed", Message: "The update cannot be verified: some random error"},
{Type: ClusterStatusFailing, Status: configv1.ConditionTrue, Reason: "ImageVerificationFailed", Message: "The update cannot be verified: some random error"},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Reason: "ImageVerificationFailed", Message: "Unable to apply 1.0.1-abc: the image may not be safe to use"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -836,7 +836,7 @@ func TestCVO_UpgradeUnverifiedPayload(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.1-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.1-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -874,7 +874,7 @@ func TestCVO_UpgradeVerifiedPayload(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -961,7 +961,7 @@ func TestCVO_UpgradeVerifiedPayload(t *testing.T) {
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
// cleared failing status and set progressing
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionTrue, Reason: "ImageVerificationFailed", Message: "The update cannot be verified: some random error"},
{Type: ClusterStatusFailing, Status: configv1.ConditionTrue, Reason: "ImageVerificationFailed", Message: "The update cannot be verified: some random error"},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Reason: "ImageVerificationFailed", Message: "Unable to apply 1.0.1-abc: the image may not be safe to use"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -1059,7 +1059,7 @@ func TestCVO_UpgradeVerifiedPayload(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.1-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.1-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -1104,7 +1104,7 @@ func TestCVO_RestartAndReconcile(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -1267,7 +1267,7 @@ func TestCVO_ErrorDuringReconcile(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -1423,7 +1423,7 @@ func TestCVO_ErrorDuringReconcile(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionTrue, Reason: "UpdatePayloadFailed", Message: "Could not update test \"file-yml\" (3 of 3)"},
{Type: ClusterStatusFailing, Status: configv1.ConditionTrue, Reason: "UpdatePayloadFailed", Message: "Could not update test \"file-yml\" (3 of 3)"},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Reason: "UpdatePayloadFailed", Message: "Error while reconciling 1.0.0-abc: the update could not be applied"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -1590,7 +1590,7 @@ func TestCVO_ParallelError(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionFalse},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionTrue, Reason: "ClusterOperatorsNotAvailable", Message: "Working towards 1.0.0-abc: 33% complete, waiting on operator-1, operator-2"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -1632,7 +1632,7 @@ func TestCVO_VerifyInitializingPayloadState(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down Expand Up @@ -1691,7 +1691,7 @@ func TestCVO_VerifyUpdatingPayloadState(t *testing.T) {
},
Conditions: []configv1.ClusterOperatorStatusCondition{
{Type: configv1.OperatorAvailable, Status: configv1.ConditionTrue, Message: "Done applying 1.0.0-abc"},
{Type: configv1.ClusterStatusConditionType("Failing"), Status: configv1.ConditionFalse},
{Type: ClusterStatusFailing, Status: configv1.ConditionFalse},
{Type: configv1.OperatorProgressing, Status: configv1.ConditionFalse, Message: "Cluster version is 1.0.0-abc"},
{Type: configv1.RetrievedUpdates, Status: configv1.ConditionFalse},
},
Expand Down
Loading