Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos
Commits
f6da94eb
Commit
f6da94eb
authored
Jun 21, 2022
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! kvm: Implement external-disk
parent
aca81eb3
Pipeline
#22229
failed with stage
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
10 deletions
+7
-10
software/kvm/buildout.hash.cfg
software/kvm/buildout.hash.cfg
+1
-1
software/kvm/instance-kvm-cluster-input-schema.json
software/kvm/instance-kvm-cluster-input-schema.json
+1
-1
software/kvm/instance-kvm-input-schema.json
software/kvm/instance-kvm-input-schema.json
+1
-1
software/kvm/template/template-kvm-run.in
software/kvm/template/template-kvm-run.in
+4
-7
No files found.
software/kvm/buildout.hash.cfg
View file @
f6da94eb
...
...
@@ -55,7 +55,7 @@ md5sum = a8cf453d20f01c707f02c4b4014580d8
[template-kvm-run]
filename = template/template-kvm-run.in
md5sum =
2b025e5828901a92d2ed25d6ee9f7412
md5sum =
d2835e75f27e3bebada549924000c0e3
[template-kvm-controller]
filename = template/kvm-controller-run.in
...
...
software/kvm/instance-kvm-cluster-input-schema.json
View file @
f6da94eb
...
...
@@ -562,7 +562,7 @@
},
"index"
:
{
"title"
:
"Index of a disk"
,
"description"
:
"An index value used to order disks for the VM,
if not specified, disk order will be random on each run
."
,
"description"
:
"An index value used to order disks for the VM,
required if more than one disk is used to have stable ordering
."
,
"type"
:
"integer"
,
"default"
:
0
}
...
...
software/kvm/instance-kvm-input-schema.json
View file @
f6da94eb
...
...
@@ -419,7 +419,7 @@
},
"index"
:
{
"title"
:
"Index of a disk"
,
"description"
:
"An index value used to order disks for the VM,
if not specified, disk order will be random on each run
."
,
"description"
:
"An index value used to order disks for the VM,
required if more than one disk is used to have stable ordering
."
,
"type"
:
"integer"
,
"default"
:
0
}
...
...
software/kvm/template/template-kvm-run.in
View file @
f6da94eb
...
...
@@ -308,15 +308,12 @@ for disk in additional_disk_list:
kvm_argument_list.extend([
'-drive', 'file=%s,if=%s' % (disk, disk_type)])
# support external-disk parameter
# allow empty index if only one disk is provided
automatic_index_applied = False
for entry in external_disk.keys():
if 'index' not in external_disk[entry]:
if automatic_index_applied:
if len(external_disk) > 1:
for key, value in external_disk.items():
if 'index' not in value:
raise ValueError('index is missing and more than one disk is present in external-disk configuration')
external_disk[entry]['index'] = 0
automatic_index_applied = True
# support external-disk parameter
for disk_info in sorted(external_disk.values(), key=operator.itemgetter('index')):
if disk_info['path'].startswith('rbd:') or disk_info['path'].startswith('/'):
path = disk_info['path']
...
...
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