Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
4
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8cf3e80b
authored
Apr 13, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storagedriver: rework delete_dump() with Ceph block device support
parent
4812fcce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
storagedriver.py
+9
-3
No files found.
storagedriver.py
View file @
8cf3e80b
...
@@ -76,10 +76,16 @@ def delete(disk_desc):
...
@@ -76,10 +76,16 @@ def delete(disk_desc):
@celery.task
()
@celery.task
()
def
delete_dump
(
data_store_type
,
di
sk_path
):
def
delete_dump
(
data_store_type
,
di
r
,
filename
):
if
disk_path
.
endswith
(
".dump"
)
and
os
.
path
.
isfile
(
disk_path
):
if
data_store_type
==
"ceph_block"
:
unlink
(
disk_path
)
with
CephConnection
(
str
(
dir
))
as
conn
:
rbd_inst
=
rbd
.
RBD
()
rbd_inst
.
remove
(
conn
.
ioctx
,
str
(
filename
))
else
:
disk_path
=
dir
+
"/"
+
filename
if
disk_path
.
endswith
(
".dump"
)
and
os
.
path
.
isfile
(
disk_path
):
unlink
(
disk_path
)
@celery.task
()
@celery.task
()
...
...
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