Change:
8 tests failed, 2 jobs failed, 88 builds failed. Failure stats cover 1 day time range '3 Aug 2017 03:31 UTC' to '4 Aug 2017 03:31 UTC'.
There are no sig labels on this issue. Please by: a sig: e.g., to notify the contributor experience sig, OR the label manually: e.g., to apply the label Note: Method 1 will trigger an email to the group. You can find the group list and label list . The in the method 1 has to be replaced with one of these: bugs, feature-requests, pr-reviews, test-failures, proposals
/sig storage
This should have been fixed by /cc
The test panic is fixed, but now it's failing because it can't SSH into the node.
/assign

Discussion:
node *v1.Node // Path to the volume on the host node hostDir string <del> // Path to the volume in the local util container containerDir string </del> // PVC for this volume pvc *v1.PersistentVolumeClaim // PV for this volume

By("Creating a directory under discovery path") framework.Logf("creating local volume under path %q", volumePath) mkdirCmd := fmt.Sprintf("mkdir %v -m 777", volumePath) <del> _, err := framework.NodeExec(node0.Name, mkdirCmd) </del> <ins> err := framework.IssueSSHCommand(mkdirCmd, framework.TestContext.Provider, node0) </ins> Expect(err).NotTo(HaveOccurred()) <ins> By("Waiting for a PersitentVolume to be created") </ins> oldPV, err := waitForLocalPersistentVolume(config.client, volumePath) Expect(err).NotTo(HaveOccurred())

Expect(err).NotTo(HaveOccurred()) err = framework.WaitForPersistentVolumeClaimPhase( v1.ClaimBound, config.client, claim.Namespace, claim.Name, framework.Poll, 1*time.Minute) <del> Expect(claim.Spec.VolumeName).To(Equal(oldPV.Name)) </del> Expect(err).NotTo(HaveOccurred()) <ins> claim, err = config.client.Core().PersistentVolumeClaims(config.ns).Get(claim.Name, metav1.GetOptions{}) Expect(err).NotTo(HaveOccurred()) Expect(claim.Spec.VolumeName).To(Equal(oldPV.Name)) </ins> // Delete the persistent volume claim: file will be cleaned up and volume be re-created. By("Deleting the persistent volume claim to clean up persistent volume and re-create one") <del> writeCmd, readCmd := createWriteAndReadCmds(volumePath, testFile, testFileContent) _, err = framework.NodeExec(node0.Name, writeCmd) </del> <ins> writeCmd, _ := createWriteAndReadCmds(volumePath, testFile, testFileContent) err = framework.IssueSSHCommand(writeCmd, framework.TestContext.Provider, node0) </ins> Expect(err).NotTo(HaveOccurred()) err = config.client.Core().PersistentVolumeClaims(claim.Namespace).Delete(claim.Name, &metav1.DeleteOptions{}) Expect(err).NotTo(HaveOccurred()) <ins> By("Waiting for a new PersistentVolume to be re-created") </ins> newPV, err := waitForLocalPersistentVolume(config.client, volumePath) Expect(err).NotTo(HaveOccurred()) Expect(newPV.UID).NotTo(Equal(oldPV.UID)) <del> result, err := framework.NodeExec(node0.Name, readCmd) </del> <ins> fileDoesntExistCmd := createFileDoesntExistCmd(volumePath, testFile) err = framework.IssueSSHCommand(fileDoesntExistCmd, framework.TestContext.Provider, node0) </ins> Expect(err).NotTo(HaveOccurred()) <del> Expect(result.Code).NotTo(BeZero(), "file should be deleted across local pv recreation, but exists") </del> }) }) })

// setupLocalVolume setups a directory to user for local PV func setupLocalVolume(config *localTestConfig) *localTestVolume { testDirName := "local-volume-test-" + string(uuid.NewUUID()) <del> testDir := filepath.Join(containerBase, testDirName) </del> hostDir := filepath.Join(hostBase, testDirName) // populate volume with testFile containing testFileContent <del> writeCmd, _ := createWriteAndReadCmds(testDir, testFile, testFileContent) </del> <ins> writeCmd, _ := createWriteAndReadCmds(hostDir, testFile, testFileContent) </ins> By(fmt.Sprintf("Creating local volume on node %q at path %q", config.node0.Name, hostDir)) <del> _, err := framework.NodeExec(config.node0.Name, writeCmd) </del> <ins> err := framework.IssueSSHCommand(writeCmd, framework.TestContext.Provider, config.node0) </ins> Expect(err).NotTo(HaveOccurred()) return &localTestVolume{ <del> node:         config.node0, hostDir:      hostDir, containerDir: testDir, </del> <ins> node:    config.node0, hostDir: hostDir, </ins> } }

} By("Removing the test directory") <del> removeCmd := fmt.Sprintf("rm -r %s", volume.containerDir) _, err := framework.NodeExec(config.node0.Name, removeCmd) </del> <ins> removeCmd := fmt.Sprintf("rm -r %s", volume.hostDir) err := framework.IssueSSHCommand(removeCmd, framework.TestContext.Provider, config.node0) </ins> Expect(err).NotTo(HaveOccurred()) }

} // Create corresponding write and read commands <del> // to be executed inside containers with local PV attached </del> <ins> // to be executed via SSH on the node with the local PV </ins> func createWriteAndReadCmds(testFileDir string, testFile string, writeTestFileContent string) (writeCmd string, readCmd string) { testFilePath := filepath.Join(testFileDir, testFile) writeCmd = fmt.Sprintf("mkdir -p %s; echo %s > %s", testFileDir, writeTestFileContent, testFilePath)

return writeCmd, readCmd } <ins> // Create command to verify that the file doesn't exist // to be executed via SSH on the node with the local PV func createFileDoesntExistCmd(testFileDir string, testFile string) string { testFilePath := filepath.Join(testFileDir, testFile) return fmt.Sprintf("[ ! -e %s ]", testFilePath) } </ins> // Execute a read or write command in a pod. // Fail on error func podRWCmdExec(pod *v1.Pod, cmd string) string {

By("Initializing local volume discovery base path") mkdirCmd := fmt.Sprintf("mkdir %v -m 777", path.Join(hostBase, discoveryDir)) <del> _, err := framework.NodeExec(config.node0.Name, mkdirCmd) </del> <ins> err := framework.IssueSSHCommand(mkdirCmd, framework.TestContext.Provider, config.node0) </ins> Expect(err).NotTo(HaveOccurred()) }

By("Removing the test directory") removeCmd := fmt.Sprintf("rm -r %s", path.Join(hostBase, discoveryDir)) <del> _, err := framework.NodeExec(config.node0.Name, removeCmd) </del> <ins> err := framework.IssueSSHCommand(removeCmd, framework.TestContext.Provider, config.node0) </ins> Expect(err).NotTo(HaveOccurred()) By("Cleaning up persistent volume")