Skip to content

Commit

Permalink
Merge pull request kubernetes#17496 from kubernetes/revert-16398-out-…
Browse files Browse the repository at this point in the history
…of-disk-e2e

Revert "e2e test for node out of disk conditions"
  • Loading branch information
mwielgus committed Nov 19, 2015
2 parents 7c660bc + feb439c commit 94d9a2f
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 286 deletions.
1 change: 0 additions & 1 deletion hack/jenkins/e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ GCE_PARALLEL_SKIP_TESTS=(
"Resource\susage\sof\ssystem\scontainers"
"SchedulerPredicates"
"resource\susage\stracking"
"NodeOutOfDisk"
"${DISRUPTIVE_TESTS[@]}"
)

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/es_cluster_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func ClusterLevelLoggingWithElasticsearch(f *Framework) {
// Previous tests may have cause failures of some nodes. Let's skip
// 'Not Ready' nodes, just in case (there is no need to fail the test).
filterNodes(nodes, func(node api.Node) bool {
return isNodeConditionSetAsExpected(&node, api.NodeReady, true)
return isNodeReadySetAsExpected(&node, true)
})
if len(nodes.Items) < 2 {
Failf("Less than two nodes were found Ready: %d", len(nodes.Items))
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/networking.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ var _ = Describe("Networking", func() {
// previous tests may have cause failures of some nodes. Let's skip
// 'Not Ready' nodes, just in case (there is no need to fail the test).
filterNodes(nodes, func(node api.Node) bool {
return isNodeConditionSetAsExpected(&node, api.NodeReady, true)
return isNodeReadySetAsExpected(&node, true)
})

if len(nodes.Items) == 0 {
Expand Down
245 changes: 0 additions & 245 deletions test/e2e/nodeoutofdisk.go

This file was deleted.

21 changes: 20 additions & 1 deletion test/e2e/reboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,25 @@ func testReboot(c *client.Client, rebootCmd string) {
}
}

func issueSSHCommand(node *api.Node, provider, cmd string) error {
Logf("Getting external IP address for %s", node.Name)
host := ""
for _, a := range node.Status.Addresses {
if a.Type == api.NodeExternalIP {
host = a.Address + ":22"
break
}
}
if host == "" {
return fmt.Errorf("couldn't find external IP address for node %s", node.Name)
}
Logf("Calling %s on %s", cmd, node.Name)
if _, _, code, err := SSH(cmd, host, provider); code != 0 || err != nil {
return fmt.Errorf("when running %s on %s, got %d and %v", cmd, node.Name, code, err)
}
return nil
}

// rebootNode takes node name on provider through the following steps using c:
// - ensures the node is ready
// - ensures all pods on the node are running and ready
Expand Down Expand Up @@ -203,7 +222,7 @@ func rebootNode(c *client.Client, provider, name, rebootCmd string) bool {
}

// Reboot the node.
if err = issueSSHCommand(rebootCmd, provider, node); err != nil {
if err = issueSSHCommand(node, provider, rebootCmd); err != nil {
Logf("Error while issuing ssh command: %v", err)
return false
}
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/resize_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func performTemporaryNetworkFailure(c *client.Client, ns, rcName string, replica
}()

Logf("Waiting %v to ensure node %s is ready before beginning test...", resizeNodeReadyTimeout, node.Name)
if !waitForNodeToBe(c, node.Name, api.NodeReady, true, resizeNodeReadyTimeout) {
if !waitForNodeToBe(c, node.Name, true, resizeNodeReadyTimeout) {
Failf("Node %s did not become ready within %v", node.Name, resizeNodeReadyTimeout)
}

Expand All @@ -370,7 +370,7 @@ func performTemporaryNetworkFailure(c *client.Client, ns, rcName string, replica
}

Logf("Waiting %v for node %s to be not ready after simulated network failure", resizeNodeNotReadyTimeout, node.Name)
if !waitForNodeToBe(c, node.Name, api.NodeReady, false, resizeNodeNotReadyTimeout) {
if !waitForNodeToBe(c, node.Name, false, resizeNodeNotReadyTimeout) {
Failf("Node %s did not become not-ready within %v", node.Name, resizeNodeNotReadyTimeout)
}

Expand Down
Loading

0 comments on commit 94d9a2f

Please sign in to comment.