Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
storagedriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b21ada3c
authored
Jul 25, 2022
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
75fd709e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
disk.py
+3
-2
storagedriver.py
+1
-1
No files found.
disk.py
View file @
b21ada3c
...
@@ -386,6 +386,7 @@ class Disk(object):
...
@@ -386,6 +386,7 @@ class Disk(object):
def
snapshot
(
self
):
def
snapshot
(
self
):
""" Creating qcow2 snapshot with base image.
""" Creating qcow2 snapshot with base image.
"""
"""
logger
.
debug
(
'Create snapshot from base-image:
%
s'
,
self
.
get_desc
())
# Check if snapshot type and qcow2 format matchmatch
# Check if snapshot type and qcow2 format matchmatch
if
self
.
type
!=
'snapshot'
:
if
self
.
type
!=
'snapshot'
:
raise
Exception
(
'Invalid type:
%
s'
%
self
.
type
)
raise
Exception
(
'Invalid type:
%
s'
%
self
.
type
)
...
@@ -401,10 +402,10 @@ class Disk(object):
...
@@ -401,10 +402,10 @@ class Disk(object):
elif
self
.
format
==
'raw'
:
elif
self
.
format
==
'raw'
:
raise
NotImplemented
()
raise
NotImplemented
()
else
:
else
:
cmdline
=
[
'ionice'
,
'-c'
,
'idle'
,
cmdline
=
[
#
'ionice', '-c', 'idle',
'qemu-img'
,
'create'
,
'qemu-img'
,
'create'
,
'-f'
,
self
.
format
,
'-F'
,
'qcow2'
,
'-b'
,
self
.
get_base
(),
'-b'
,
self
.
get_base
(),
'-f'
,
self
.
format
,
self
.
get_path
()]
self
.
get_path
()]
# Call subprocess
# Call subprocess
subprocess
.
check_output
(
cmdline
)
subprocess
.
check_output
(
cmdline
)
...
...
storagedriver.py
View file @
b21ada3c
...
@@ -33,7 +33,7 @@ def create_ci_disk(disk_desc, meta_data, user_data):
...
@@ -33,7 +33,7 @@ def create_ci_disk(disk_desc, meta_data, user_data):
disk
=
Disk
.
deserialize
(
disk_desc
)
disk
=
Disk
.
deserialize
(
disk_desc
)
disk
.
create_ci_disk
(
meta_data
=
meta_data
,
user_data
=
user_data
)
disk
.
create_ci_disk
(
meta_data
=
meta_data
,
user_data
=
user_data
)
return
{
'size'
:
disk
.
size
,
return
{
'size'
:
disk
.
size
,
'type'
:
disk
.
format
,
'type'
:
'raw-ro'
,
'checksum'
:
disk
.
checksum
,
}
'checksum'
:
disk
.
checksum
,
}
...
...
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