Prevent all VM operation when the Node is offline/missing
diff --git a/circle/vm/operations.py b/circle/vm/operations.py
index fa63c11..d7f7845 100644
--- a/circle/vm/operations.py
+++ b/circle/vm/operations.py
@@ -133,6 +133,10 @@ class InstanceOperation(Operation):
super(InstanceOperation, self).check_auth(user=user)
+ if (self.instance.node and not self.instance.node.online
+ and not user.is_superuser):
+ raise self.instance.WrongStateError(self.instance)
+
def create_activity(self, parent, user, kwargs):
name = self.get_activity_name(kwargs)
if parent:
-
-
Owner
-
-
-
Status changed to closed
Toggle commit list
Please
register
or
sign in
to comment