Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
eb5c95c3
authored
Sep 08, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: handle TimeLimitExceeded in ShutdownOperation
fixes #278
parent
56542470
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
circle/vm/operations.py
+11
-0
No files found.
circle/vm/operations.py
View file @
eb5c95c3
...
...
@@ -620,6 +620,17 @@ class ShutdownOperation(InstanceOperation):
self
.
instance
.
yield_node
()
self
.
instance
.
yield_vnc_port
()
def
on_abort
(
self
,
activity
,
error
):
if
isinstance
(
error
,
TimeLimitExceeded
):
activity
.
result
=
humanize_exception
(
ugettext_noop
(
"The virtual machine did not switch off in the provided time "
"limit. Most of the time this is caused by incorrect ACPI "
"settings. You can also try to power off the machine from the "
"operating system manually."
),
error
)
activity
.
resultant_state
=
None
else
:
super
(
ShutdownOperation
,
self
)
.
on_abort
(
activity
,
error
)
register_operation
(
ShutdownOperation
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment