Skip to content

Commit 6da4190

Browse files
Merge pull request #1002 from Chakerbh/gcp_destroy
Make sure that the machine is UP before trying to destroy it in GCP
2 parents 7450f2a + a796552 commit 6da4190

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: nixops/backends/gce.py

+4
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,10 @@ def destroy(self, wipe=False):
652652
if not self.project:
653653
return True
654654

655+
if self.state != self.UP:
656+
# The machine is down, we have nothing to do.
657+
return True
658+
655659
try:
656660
node = self.node()
657661
question = "are you sure you want to destroy {0}?"

0 commit comments

Comments
 (0)