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

Update dir hotplug tests #238

Merged
merged 1 commit into from
Jul 11, 2024
Merged
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
10 changes: 8 additions & 2 deletions tests/storage-disks-vm
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,14 @@ lxc config device set v1 block1 readonly=false
lxc exec v1 -- sh -c "for i in \$(seq 10); do test -e /sys/block/${DISK_DEV}/ro && break; echo \"Waiting for sys file to appear (\${i}s)\"; sleep 1; done"
[ "$(lxc exec v1 -- cat /sys/block/"${DISK_DEV}"/ro)" -eq 0 ]

# Hotplugging directories is not allowed and will fail
! lxc config device add v1 dir1 disk source="${testRoot}/allowed1" || false
if echo "${LXD_SNAP_CHANNEL}" | grep -E '^([45]\.0)/'; then
# Hotplugging directories is not allowed and will fail on LXD 4.0 and 5.0
! lxc config device add v1 dir1 disk source="${testRoot}/allowed1" path="/mnt/bar" || false
else
# Hotplugging directories is allowed from LXD 5.21 onwards
lxc config device add v1 dir1 disk source="${testRoot}/allowed1" path="/mnt/bar"
lxc config device remove v1 dir1
fi

# Hot plug cloud-init:config ISO.
lxc config device add v1 cloudinit disk source=cloud-init:config
Expand Down
Loading