Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes from Linstor branch #1846

Merged
merged 3 commits into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/reference/storage_ceph.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Key | Type | Condition | Default
`block.filesystem` | string | block-based volume with content type `filesystem` | same as `volume.block.filesystem` | {{block_filesystem}}
`block.mount_options` | string | block-based volume with content type `filesystem` | same as `volume.block.mount_options` | Mount options for block-backed file system volumes
`initial.gid` | int | custom volume with content type `filesystem` | same as `volume.initial.uid` or `0` | GID of the volume owner in the instance
`initial.mode` | int | custom volume with content type `filesystem` | same as `volume.initial.mode` or `711` | Mode of the volume in the instance
`initial.mode` | int | custom volume with content type `filesystem` | same as `volume.initial.mode` or `711` | Mode of the volume in the instance
`initial.uid` | int | custom volume with content type `filesystem` | same as `volume.initial.gid` or `0` | UID of the volume owner in the instance
`security.shared` | bool | custom block volume | same as `volume.security.shared` or `false` | Enable sharing the volume across multiple instances
`security.shifted` | bool | custom volume | same as `volume.security.shifted` or `false` | {{enable_ID_shifting}}
Expand Down
3 changes: 2 additions & 1 deletion test/suites/clustering.sh
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,8 @@ test_clustering_storage() {

# The 'source' config key is omitted when showing the cluster
# configuration, and included when showing the node-specific one.
! INCUS_DIR="${INCUS_TWO_DIR}" incus storage show pool1 | grep -q source || false
! INCUS_DIR="${INCUS_TWO_DIR}" incus storage show pool1 | grep -q source: || false

source1="$(basename "${INCUS_ONE_DIR}")"
source2="$(basename "${INCUS_TWO_DIR}")"
if [ "${poolDriver}" = "ceph" ]; then
Expand Down
2 changes: 1 addition & 1 deletion test/suites/incremental_copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ do_copy() {
incus storage volume set "${source_pool}" container/c1 user.foo=main

# Set size to check this is supported during copy.
incus config device set c1 root size=50MiB
incus config device set c1 root size=200MiB

targetPoolFlag=
if [ -n "${target_pool}" ]; then
Expand Down
26 changes: 13 additions & 13 deletions test/suites/projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,8 @@ test_projects_limits() {
! incus project set p1 limits.disk 1GiB || false

# Set a disk limit on the default profile and also on instance c2
incus profile device set default root size=100MiB
incus config device add c2 root disk path="/" pool="${pool}" size=50MiB
incus profile device set default root size=200MiB
incus config device add c2 root disk path="/" pool="${pool}" size=150MiB

if [ "${INCUS_BACKEND}" = "lvm" ]; then
# Can't set the project's disk limit because not all volumes have
Expand All @@ -747,30 +747,30 @@ test_projects_limits() {
incus storage volume create "${pool}" v1

# Set a size on the custom volume.
incus storage volume set "${pool}" v1 size 50MiB
incus storage volume set "${pool}" v1 size 150MiB

# Can't set the project's disk limit below the current aggregate count.
! incus project set p1 limits.disk 190MiB || false
! incus project set p1 limits.disk 490MiB || false

# Set the project's disk limit
incus project set p1 limits.disk 250MiB
incus project set p1 limits.disk 550MiB

# Can't update the project's disk limit below the current aggregate count.
! incus project set p1 limits.disk 190MiB || false
! incus project set p1 limits.disk 490MiB || false

# Changing profile or instance root device size or volume size above the
# aggregate project's limit is not possible.
! incus profile device set default root size=160MiB || false
! incus config device set c2 root size 110MiB || false
! incus storage volume set "${pool}" v1 size 110MiB || false
! incus profile device set default root size=300MiB || false
! incus config device set c2 root size 250MiB || false
! incus storage volume set "${pool}" v1 size 250MiB || false

# Can't create a custom volume without specifying a size.
! incus storage volume create "${pool}" v2 || false

# Disk limits can be updated if they stay within limits.
incus project set p1 limits.disk 204900KiB
incus profile device set default root size=90MiB
incus config device set c2 root size 60MiB
incus project set p1 limits.disk 540MiB
incus profile device set default root size=190MiB
incus config device set c2 root size 200MiB

# Can't upload an image if that would exceed the current quota.
! deps/import-busybox --project p1 --template start --alias otherimage || false
Expand Down Expand Up @@ -803,7 +803,7 @@ test_projects_limits() {
# Relax all constraints except the disk limits, which won't be enough for the
# image to be downloaded.
incus profile device set default root size=500KiB
incus project set p1 limits.disk 111MiB
incus project set p1 limits.disk 351MiB
incus project unset p1 limits.containers
incus project unset p1 limits.cpu
incus project unset p1 limits.memory
Expand Down
12 changes: 6 additions & 6 deletions test/suites/storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,13 @@ test_storage() {
)

# Test applying quota (expected size ranges are in KiB and have an allowable range to account for allocation variations).
QUOTA1="20MiB"
rootMinKiB1="13800"
rootMaxKiB1="23000"
QUOTA1="400MiB"
rootMinKiB1="320000"
rootMaxKiB1="450000"

QUOTA2="25MiB"
rootMinKiB2="18900"
rootMaxKiB2="28000"
QUOTA2="800MiB"
rootMinKiB2="720000"
rootMaxKiB2="850000"

if [ "$incus_backend" != "dir" ]; then
incus launch testimage quota1
Expand Down