Commit 8cf3e80b by Czémán Arnold

storagedriver: rework delete_dump() with Ceph block device support

parent 4812fcce
......@@ -76,8 +76,14 @@ def delete(disk_desc):
@celery.task()
def delete_dump(data_store_type, disk_path):
def delete_dump(data_store_type, dir, filename):
if data_store_type == "ceph_block":
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)
......
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