Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
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
8cb300de
authored
Sep 18, 2023
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
3eb04d1b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
3 deletions
+20
-3
circle/dashboard/forms.py
+1
-1
circle/storage/migrations/0008_disk_cluster_size.py
+18
-0
circle/storage/models.py
+0
-1
circle/vm/operations.py
+1
-1
No files found.
circle/dashboard/forms.py
View file @
8cb300de
...
...
@@ -864,7 +864,7 @@ class VmCreateDiskForm(OperationForm):
help_text
=
_
(
'Metadata cache size, '
'like KB, MB'
))
cluster_size
=
forms
.
CharField
(
widget
=
FileSizeWidget
,
initial
=
(
1
<<
1
4
),
label
=
_
(
'Cluster size'
),
widget
=
FileSizeWidget
,
initial
=
(
1
<<
1
6
),
label
=
_
(
'Cluster size'
),
help_text
=
_
(
'Disk cluster (block) size, '
'like KB'
))
...
...
circle/storage/migrations/0008_disk_cluster_size.py
0 → 100644
View file @
8cb300de
# Generated by Django 3.2.3 on 2023-09-18 14:06
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'storage'
,
'0007_disk_cache_size'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'disk'
,
name
=
'cluster_size'
,
field
=
models
.
IntegerField
(
default
=
64
,
help_text
=
'Disk cluster (block) size (Kbyte)'
,
verbose_name
=
'cluster size'
),
),
]
circle/storage/models.py
View file @
8cb300de
...
...
@@ -366,7 +366,6 @@ class Disk(TimeStampedModel):
'size'
:
self
.
size
,
'base_name'
:
self
.
base
.
filename
if
self
.
base
else
None
,
'type'
:
'snapshot'
if
self
.
base
else
'normal'
,
'cache_size'
:
self
.
cache_size
,
'base_dir'
:
self
.
base
.
datastore
.
path
if
self
.
base
else
None
,
'cluster_size'
:
self
.
cluster_size
}
...
...
circle/vm/operations.py
View file @
8cb300de
...
...
@@ -297,7 +297,7 @@ class CreateDiskOperation(InstanceOperation):
if
not
name
:
name
=
"new disk"
disk
=
Disk
.
create
(
size
=
size
,
name
=
name
,
datastore
=
datastore
.
name
,
type
=
"qcow2-norm"
,
cache_size
=
cache_size
)
disk
=
Disk
.
create
(
size
=
size
,
name
=
name
,
datastore
=
datastore
.
name
,
type
=
"qcow2-norm"
,
cache_size
=
cache_size
,
cluster_size
=
cluster_size
)
disk
.
full_clean
()
devnums
=
list
(
ascii_lowercase
)
for
d
in
self
.
instance
.
disks
.
all
():
...
...
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