Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
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
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
da9ac904
authored
Feb 06, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: block until confirmation on shutdown
parent
5d3ab4a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
circle/vm/models/instance.py
+12
-0
No files found.
circle/vm/models/instance.py
View file @
da9ac904
...
...
@@ -822,8 +822,20 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
task_uuid
=
task_uuid
,
user
=
user
):
queue_name
=
self
.
get_remote_queue_name
(
'vm'
)
self
.
__clear_libvirt_state_queue
()
vm_tasks
.
shutdown
.
apply_async
(
args
=
[
self
.
vm_name
],
queue
=
queue_name
)
.
get
()
i
=
2
while
i
>
0
:
try
:
libvirt_state
=
self
.
libvirt_state_queue
.
get
(
True
,
60
)
except
Empty
:
raise
TimeoutError
()
else
:
if
libvirt_state
==
'MISSING'
:
break
else
:
i
-=
1
def
shutdown_async
(
self
,
user
=
None
):
"""Execute shutdown asynchronously.
...
...
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