File tree Expand file tree Collapse file tree 3 files changed +494
-0
lines changed
cmd/openshift-tests/health-check Expand file tree Collapse file tree 3 files changed +494
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ import (
22
22
collectdiskcertificates "github.com/openshift/origin/pkg/cmd/openshift-tests/collect-disk-certificates"
23
23
"github.com/openshift/origin/pkg/cmd/openshift-tests/dev"
24
24
"github.com/openshift/origin/pkg/cmd/openshift-tests/disruption"
25
+ cluster_health_check "github.com/openshift/origin/pkg/cmd/openshift-tests/health-check"
25
26
"github.com/openshift/origin/pkg/cmd/openshift-tests/images"
26
27
"github.com/openshift/origin/pkg/cmd/openshift-tests/list"
27
28
"github.com/openshift/origin/pkg/cmd/openshift-tests/monitor"
@@ -100,6 +101,7 @@ func main() {
100
101
monitor .NewMonitorCommand (ioStreams ),
101
102
disruption .NewDisruptionCommand (ioStreams ),
102
103
risk_analysis .NewTestFailureRiskAnalysisCommand (),
104
+ cluster_health_check .NewTestFailureClusterHealthCheckCommand (),
103
105
run_resource_watch .NewRunResourceWatchCommand (),
104
106
timeline .NewTimelineCommand (ioStreams ),
105
107
run_disruption .NewRunInClusterDisruptionMonitorCommand (ioStreams ),
Original file line number Diff line number Diff line change
1
+ package healthcheckpkg
2
+
3
+ import (
4
+ healthcheck "github.com/openshift/origin/pkg/health-check"
5
+ "github.com/spf13/cobra"
6
+ "k8s.io/kubectl/pkg/util/templates"
7
+ )
8
+
9
+ func NewTestFailureClusterHealthCheckCommand () * cobra.Command {
10
+ healthCheckOpts := & healthcheck.Options {}
11
+
12
+ cmd := & cobra.Command {
13
+ Use : "health-check" ,
14
+ Short : "Performs health check against the cluster" ,
15
+ Long : templates .LongDesc (`
16
+ Check cluster health, including:
17
+ all machines should be in Running state;
18
+ all nodes should be ready;
19
+ ready node count should match or exceed running machine count;
20
+ operators health ordered by dependency;
21
+ ` ),
22
+ RunE : func (cmd * cobra.Command , args []string ) error {
23
+ return healthCheckOpts .Run ()
24
+ },
25
+ }
26
+ cmd .Flags ().StringVar (& healthCheckOpts .JUnitDir ,
27
+ "junit-dir" , healthCheckOpts .JUnitDir ,
28
+ "The directory where test reports were written, and operators health file will be stored." )
29
+
30
+ return cmd
31
+ }
You can’t perform that action at this time.
0 commit comments