Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
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
e36f5b11
authored
Dec 14, 2017
by
Fukász Rómeó Ervin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceph: fix disk save
parent
86c27c67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
ceph.py
+4
-3
No files found.
ceph.py
View file @
e36f5b11
...
...
@@ -72,11 +72,12 @@ def unmap_rbd(conf, local_path):
def
map_rbd
(
conf
,
ceph_path
,
local_path
):
cmd
=
[
"/usr/bin/rbd"
,
"map"
,
ceph_path
,
]
+
conf
.
cmd_args
()
try
:
sudo
(
"/usr/bin/rbd"
,
"map"
,
ceph_path
,
*
conf
.
cmd_args
()
)
sudo
(
*
cmd
)
except
:
unmap_rbd
(
conf
,
local_path
)
sudo
(
"/usr/bin/rbd"
,
"map"
,
ceph_path
,
*
conf
.
cmd_args
()
)
sudo
(
*
cmd
)
def
get_secret_key
(
conf
):
...
...
@@ -117,7 +118,7 @@ def save(domain, poolname, diskname, ram_size, user):
with
CephConnection
(
poolname
,
user
=
user
)
as
conn
:
rbd_inst
=
rbd
.
RBD
()
try
:
rbd_inst
.
create
(
conn
.
ioctx
,
diskname
,
disk_size
)
rbd_inst
.
create
(
conn
.
ioctx
,
diskname
,
disk_size
,
old_format
=
False
)
except
rbd
.
ImageExists
:
rbd_inst
.
remove
(
conn
.
ioctx
,
diskname
)
rbd_inst
.
create
(
conn
.
ioctx
,
diskname
,
disk_size
)
...
...
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