Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

CIRCLE / cloud

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 94
  • Merge Requests 10
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Closed
Open
Issue #410 opened May 14, 2015 by Bach Dániel@bachdaniel 
  • Report abuse
  • New issue
Report abuse New issue

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:
  • Bach Dániel @bachdaniel

    Reassigned to @kviktor

    May 21, 2015

    Reassigned to @kviktor

    Reassigned to @kviktor
    Toggle commit list
  • Bach Dániel @bachdaniel commented May 21, 2015
    Owner

    sleep

    ![sleep](https://git.ik.bme.hu/circle/cloud/uploads/fcde504417bbc9261fe1d932105a7a57/sleep.png)
  • Kálmán Viktor @kviktor

    mentioned in commit ede013ee

    May 29, 2015

    mentioned in commit ede013ee

    mentioned in commit ede013eea37fd900ddef31cc9c94fd5d535f510a
    Toggle commit list
  • Kálmán Viktor @kviktor

    mentioned in merge request !336 (merged)

    May 29, 2015

    mentioned in merge request !336 (merged)

    mentioned in merge request !336
    Toggle commit list
  • Bach Dániel @bachdaniel

    mentioned in commit 8f05251d

    May 31, 2015

    mentioned in commit 8f05251d

    mentioned in commit 8f05251d4065d2d5d14f5ebca3910a388df058dc
    Toggle commit list
  • Kálmán Viktor @kviktor

    Status changed to closed

    Jun 08, 2015

    Status changed to closed

    Status changed to closed
    Toggle commit list
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View labels
2
2 participants
Reference: circle/cloud#410