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
b5f38f5c
authored
May 05, 2016
by
Czémán Arnold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disk: small fix
parent
a2d1cd02
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
disk.py
+4
-1
No files found.
disk.py
View file @
b5f38f5c
...
@@ -492,6 +492,7 @@ class CephDisk(Disk):
...
@@ -492,6 +492,7 @@ class CephDisk(Disk):
rbd_inst
=
rbd
.
RBD
()
rbd_inst
=
rbd
.
RBD
()
logging
.
info
(
"Create ceph block:
%
s (
%
s)"
%
(
self
.
get_path
(),
logging
.
info
(
"Create ceph block:
%
s (
%
s)"
%
(
self
.
get_path
(),
str
(
self
.
size
)))
str
(
self
.
size
)))
# NOTE: http://docs.ceph.com/docs/master/rbd/rbd-snapshot/#layering
rbd_inst
.
create
(
ioctx
,
self
.
name
,
self
.
size
,
old_format
=
False
,
rbd_inst
.
create
(
ioctx
,
self
.
name
,
self
.
size
,
old_format
=
False
,
features
=
rbd
.
RBD_FEATURE_LAYERING
)
features
=
rbd
.
RBD_FEATURE_LAYERING
)
except
rbd
.
ImageExists
:
except
rbd
.
ImageExists
:
...
@@ -622,7 +623,7 @@ class CephDisk(Disk):
...
@@ -622,7 +623,7 @@ class CephDisk(Disk):
rbd_inst
=
rbd
.
RBD
()
rbd_inst
=
rbd
.
RBD
()
logging
.
info
(
"Snapshot ceph block:
%
s (
%
s)"
%
(
self
.
get_path
(),
logging
.
info
(
"Snapshot ceph block:
%
s (
%
s)"
%
(
self
.
get_path
(),
self
.
get_base
()))
self
.
get_base
()))
# NOTE: http://docs.ceph.com/docs/master/rbd/rbd-snapshot/#layering
rbd_inst
.
clone
(
ioctx
,
self
.
base_name
,
"snapshot"
,
rbd_inst
.
clone
(
ioctx
,
self
.
base_name
,
"snapshot"
,
ioctx
,
self
.
name
,
features
=
rbd
.
RBD_FEATURE_LAYERING
)
ioctx
,
self
.
name
,
features
=
rbd
.
RBD_FEATURE_LAYERING
)
except
rbd
.
ImageExists
:
except
rbd
.
ImageExists
:
...
@@ -659,6 +660,8 @@ class CephDisk(Disk):
...
@@ -659,6 +660,8 @@ class CephDisk(Disk):
logger
.
warning
(
"Aborted merge job, removing
%
s"
,
logger
.
warning
(
"Aborted merge job, removing
%
s"
,
new_disk
.
get_path
())
new_disk
.
get_path
())
with
rbd
.
Image
(
ioctx
,
new_disk
.
name
)
as
image
:
with
rbd
.
Image
(
ioctx
,
new_disk
.
name
)
as
image
:
image
.
unprotect_snap
(
"snapshot"
)
image
.
remove_snap
(
"snapshot"
)
rbd_inst
=
rbd
.
RBD
()
rbd_inst
=
rbd
.
RBD
()
rbd_inst
.
remove
(
new_disk
.
name
)
rbd_inst
.
remove
(
new_disk
.
name
)
...
...
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