@@ -140,6 +140,7 @@ jobs:
140
140
- lvm
141
141
- zfs
142
142
- ceph
143
+ - linstor
143
144
- random
144
145
os :
145
146
- ubuntu-22.04
@@ -391,6 +392,48 @@ jobs:
391
392
sudo microceph.ceph status
392
393
sudo rm -f /snap/bin/rbd
393
394
395
+ - name : Setup LINSTOR
396
+ if : ${{ matrix.backend == 'linstor' }}
397
+ run : |
398
+ set -x
399
+
400
+ # As with Ceph, we hope for a spare disk.
401
+ if [ "$(stat -c '%d' /)" = "$(stat -c '%d' /mnt)" ]; then
402
+ echo "FAIL: rootfs and ephemeral part on the same disk, aborting"
403
+ exit 1
404
+ fi
405
+
406
+ sudo add-apt-repository ppa:linbit/linbit-drbd9-stack -y
407
+
408
+ # Install everything required to compile DRBD and run LINSTOR tools.
409
+ sudo apt-get install --no-install-recommends -y \
410
+ drbd-dkms \
411
+ linstor-client \
412
+ linstor-controller \
413
+ linstor-satellite \
414
+ linux-headers-generic \
415
+ python3-setuptools
416
+
417
+ # Enable DRBD.
418
+ sudo modprobe -r drbd
419
+ sudo modprobe drbd
420
+
421
+ # Get the runner IP.
422
+ runner_ip="$(hostname -I | cut -d' ' -f1)"
423
+
424
+ # Create a single local node.
425
+ sudo linstor node create local "${runner_ip}" --node-type combined
426
+
427
+ # Repurpose the ephemeral disk for LINSTOR physical storage.
428
+ sudo swapoff /mnt/swapfile
429
+ ephemeral_disk="$(findmnt --noheadings --output SOURCE --target /mnt | sed 's/[0-9]\+$//')"
430
+ sudo umount /mnt
431
+ sudo wipefs -a "${ephemeral_disk}"
432
+ sudo linstor physical-storage create-device-pool --storage-pool incus --pool-name linstor-incus lvmthin local "${ephemeral_disk}"
433
+
434
+ # Update the runner env.
435
+ echo "INCUS_LINSTOR_CLUSTER=${runner_ip}" >> "$GITHUB_ENV"
436
+
394
437
- name : " Ensure offline mode (block image server)"
395
438
run : |
396
439
sudo nft add table inet filter
@@ -404,6 +447,7 @@ jobs:
404
447
INCUS_CEPH_CLUSTER : " ceph"
405
448
INCUS_CEPH_CEPHFS : " cephfs"
406
449
INCUS_CEPH_CEPHOBJECT_RADOSGW : " http://127.0.0.1"
450
+ INCUS_LINSTOR_LOCAL_SATELLITE : " local"
407
451
INCUS_CONCURRENT : " 1"
408
452
INCUS_VERBOSE : " 1"
409
453
INCUS_OFFLINE : " 1"
@@ -413,7 +457,7 @@ jobs:
413
457
chmod +x ~
414
458
echo "root:1000000:1000000000" | sudo tee /etc/subuid /etc/subgid
415
459
cd test
416
- sudo --preserve-env=PATH,GOPATH,GITHUB_ACTIONS,INCUS_VERBOSE,INCUS_BACKEND,INCUS_CEPH_CLUSTER,INCUS_CEPH_CEPHFS,INCUS_CEPH_CEPHOBJECT_RADOSGW,INCUS_OFFLINE,INCUS_SKIP_TESTS,INCUS_REQUIRED_TESTS, INCUS_BACKEND=${{ matrix.backend }} ./main.sh ${{ matrix.suite }}
460
+ sudo --preserve-env=PATH,GOPATH,GITHUB_ACTIONS,INCUS_VERBOSE,INCUS_BACKEND,INCUS_CEPH_CLUSTER,INCUS_CEPH_CEPHFS,INCUS_CEPH_CEPHOBJECT_RADOSGW,INCUS_LINSTOR_LOCAL_SATELLITE,INCUS_LINSTOR_CLUSTER, INCUS_OFFLINE,INCUS_SKIP_TESTS,INCUS_REQUIRED_TESTS, INCUS_BACKEND=${{ matrix.backend }} ./main.sh ${{ matrix.suite }}
417
461
418
462
client :
419
463
name : Client
0 commit comments