Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
6014f0de
authored
Mar 13, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
instance: hotfix for missing disks
parent
7c7909b2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
circle/vm/models/instance.py
+5
-1
No files found.
circle/vm/models/instance.py
View file @
6014f0de
...
@@ -409,7 +409,11 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -409,7 +409,11 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
It is always on the first hard drive storage named cloud-<id>.dump
It is always on the first hard drive storage named cloud-<id>.dump
"""
"""
try
:
datastore
=
self
.
disks
.
all
()[
0
]
.
datastore
datastore
=
self
.
disks
.
all
()[
0
]
.
datastore
except
:
return
None
else
:
path
=
datastore
.
path
+
'/'
+
self
.
vm_name
+
'.dump'
path
=
datastore
.
path
+
'/'
+
self
.
vm_name
+
'.dump'
return
{
'datastore'
:
datastore
,
'path'
:
path
}
return
{
'datastore'
:
datastore
,
'path'
:
path
}
...
@@ -717,9 +721,9 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
...
@@ -717,9 +721,9 @@ class Instance(AclBase, VirtualMachineDescModel, TimeStampedModel):
:param act: Parent activity.
:param act: Parent activity.
"""
"""
# Delete mem. dump if exists
# Delete mem. dump if exists
try
:
queue_name
=
self
.
mem_dump
[
'datastore'
]
.
get_remote_queue_name
(
queue_name
=
self
.
mem_dump
[
'datastore'
]
.
get_remote_queue_name
(
'storage'
)
'storage'
)
try
:
from
storage.tasks.remote_tasks
import
delete_dump
from
storage.tasks.remote_tasks
import
delete_dump
delete_dump
.
apply_async
(
args
=
[
self
.
mem_dump
[
'path'
]],
delete_dump
.
apply_async
(
args
=
[
self
.
mem_dump
[
'path'
]],
queue
=
queue_name
)
.
get
(
timeout
=
timeout
)
queue
=
queue_name
)
.
get
(
timeout
=
timeout
)
...
...
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