You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ClusterOperators should not go Progressing only for a node reboot
This is to cover the node rebooting case from the rule [1] that
is introduced recently:
```
Operators should not report Progressing only because DaemonSets
owned by them are adjusting to a new node from cluster scaleup or
a node rebooting from cluster upgrade.
```
The test fails if
- `co/machine-config` never became Progressing=True during a
cluster upgrade, or
- some CO left Progressing=False during the upgrade after
`machine-config` became Progressing=True. This should not
have taken place as `machine-config` was rebooting the nodes
which was the only thing ongoing to the cluster during that
time.
[1]. https://github.com/openshift/api/blob/61248d910ff74aef020492922d14e6dadaba598b/config/v1/types_cluster_operator.go#L163-L164
Name: fmt.Sprintf("[bz-Machine Config Operator] clusteroperator/machine-config must go Progressing=True during an upgrade test"),
637
+
Duration: duration,
638
+
}
639
+
ifmachineConfigProgressing.IsZero() {
640
+
mcTestCase.FailureOutput=&junitapi.FailureOutput{
641
+
Output: fmt.Sprintf("machine-config was never Progressing=True during the upgrade window from %s to %s", start.Format(time.RFC3339), stop.Format(time.RFC3339)),
642
+
}
643
+
return []*junitapi.JUnitTestCase{mcTestCase}
644
+
} else {
645
+
mcTestCase.SystemOut=fmt.Sprintf("machine-config became Progressing=True at %s during the upgrade window from %s to %s", machineConfigProgressing.Format(time.RFC3339), start.Format(time.RFC3339), stop.Format(time.RFC3339))
output:=fmt.Sprintf("%d unexpected clusteroperator state transitions while machine-config is progressing during the upgrade window from %s to %s", len(fatal), start.Format(time.RFC3339), stop.Format(time.RFC3339))
698
+
iflen(fatal) >0 {
699
+
output=fmt.Sprintf("%s. These did not match any known exceptions, so they cause this test-case to fail:\n\n%v\n", output, strings.Join(fatal, "\n"))
700
+
} else {
701
+
output=fmt.Sprintf("%s, as desired.", output)
702
+
}
703
+
output=fmt.Sprintf("%s\n%d unwelcome but acceptable clusteroperator state transitions while machine-config is progressing during the upgrade window from %s to %s", output, len(excepted), start.Format(time.RFC3339), stop.Format(time.RFC3339))
704
+
iflen(excepted) >0 {
705
+
output=fmt.Sprintf("%s. These should not happen, but because they are tied to exceptions, the fact that they did happen is not sufficient to cause this test-case to fail:\n\n%v\n", output, strings.Join(excepted, "\n"))
706
+
} else {
707
+
output=fmt.Sprintf("%s, as desired.", output)
708
+
}
709
+
710
+
iflen(fatal) >0||len(excepted) >0 {
711
+
ret=append(ret, &junitapi.JUnitTestCase{
712
+
Name: testName,
713
+
Duration: duration,
714
+
SystemOut: output,
715
+
FailureOutput: &junitapi.FailureOutput{
716
+
Output: output,
717
+
},
718
+
})
719
+
}
720
+
721
+
iflen(fatal) ==0 {
722
+
// add a success so we flake (or pass) and don't fail
0 commit comments