mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Merge pull request #49334 from saad-ali/fixPDgcloudListInstances
Automatic merge from submit-queue (batch tested with PRs 49330, 49252, 49262, 49278, 49334) Add project to pd delete node gcloud command **What this PR does / why we need it**: Add `--project=` to `gcloud compute instances list` calls from `Pod Disks should be able to detach from a node which was deleted`. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: Fixes #https://github.com/kubernetes/kubernetes/issues/49185 **Special notes for your reviewer**: CC @kubernetes/sig-storage-pr-reviews
This commit is contained in:
commit
04df1f562b
@ -449,7 +449,7 @@ var _ = SIGDescribe("Pod Disks", func() {
|
||||
// Verify that disk shows up in node 0's volumeInUse list
|
||||
framework.ExpectNoError(waitForPDInVolumesInUse(nodeClient, diskName, host0Name, nodeStatusTimeout, true /* should exist*/))
|
||||
|
||||
output, err := exec.Command("gcloud", "compute", "instances", "list").CombinedOutput()
|
||||
output, err := exec.Command("gcloud", "compute", "instances", "list", "--project="+framework.TestContext.CloudConfig.ProjectID).CombinedOutput()
|
||||
framework.ExpectNoError(err, fmt.Sprintf("Unable to get list of node instances err=%v output=%s", err, output))
|
||||
Expect(true, strings.Contains(string(output), string(host0Name)))
|
||||
|
||||
@ -458,7 +458,7 @@ var _ = SIGDescribe("Pod Disks", func() {
|
||||
output, err = exec.Command("gcloud", "compute", "instances", "delete", string(host0Name), "--project="+framework.TestContext.CloudConfig.ProjectID, "--zone="+framework.TestContext.CloudConfig.Zone).CombinedOutput()
|
||||
framework.ExpectNoError(err, fmt.Sprintf("Failed to delete host0pod: err=%v output=%s", err, output))
|
||||
|
||||
output, err = exec.Command("gcloud", "compute", "instances", "list").CombinedOutput()
|
||||
output, err = exec.Command("gcloud", "compute", "instances", "list", "--project="+framework.TestContext.CloudConfig.ProjectID).CombinedOutput()
|
||||
framework.ExpectNoError(err, fmt.Sprintf("Unable to get list of node instances err=%v output=%s", err, output))
|
||||
Expect(false, strings.Contains(string(output), string(host0Name)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user