Skip to content

Commit

Permalink
chore: better lvm2 tests
Browse files Browse the repository at this point in the history
Use LVM2 tests that relies on module loading by lvm.

Fixes: #9300

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Sep 20, 2024
1 parent 32b5d01 commit 2f675e8
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-09-20T00:40:37Z by kres 8be5fa7.
# Generated on 2024-09-20T17:49:19Z by kres 8be5fa7.

name: default
concurrency:
Expand Down Expand Up @@ -1464,7 +1464,7 @@ jobs:
QEMU_EXTRA_DISKS: "3"
QEMU_MEMORY_WORKERS: "4096"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH_WORKER: '@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml'
WITH_CONFIG_PATCH_WORKER: '@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml:@hack/test/patches/dm-raid-module.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
Expand Down Expand Up @@ -2774,7 +2774,7 @@ jobs:
QEMU_EXTRA_DISKS: "3"
QEMU_EXTRA_DISKS_DRIVERS: ide,nvme
QEMU_EXTRA_DISKS_SIZE: "10240"
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml'
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml:@hack/test/patches/dm-raid-module.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
Expand Down Expand Up @@ -3086,10 +3086,10 @@ jobs:
- name: e2e-qemu
env:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_EXTRA_DISKS: "2"
QEMU_EXTRA_DISKS: "3"
QEMU_EXTRA_DISKS_DRIVERS: ide,nvme
QEMU_EXTRA_DISKS_SIZE: "10240"
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml'
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml:@hack/test/patches/dm-raid-module.yaml'
WITH_DISK_ENCRYPTION: "true"
WITH_KUBESPAN: "true"
WITH_VIRTUAL_IP: "true"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-extensions-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-09-20T00:40:37Z by kres 8be5fa7.
# Generated on 2024-09-20T17:49:19Z by kres 8be5fa7.

name: integration-extensions-cron
concurrency:
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
QEMU_EXTRA_DISKS: "3"
QEMU_MEMORY_WORKERS: "4096"
SHORT_INTEGRATION_TEST: "yes"
WITH_CONFIG_PATCH_WORKER: '@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml'
WITH_CONFIG_PATCH_WORKER: '@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml:@hack/test/patches/dm-raid-module.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-qemu-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-09-18T10:36:36Z by kres 8be5fa7.
# Generated on 2024-09-20T16:31:33Z by kres 8be5fa7.

name: integration-qemu-cron
concurrency:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
QEMU_EXTRA_DISKS: "3"
QEMU_EXTRA_DISKS_DRIVERS: ide,nvme
QEMU_EXTRA_DISKS_SIZE: "10240"
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml'
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml:@hack/test/patches/dm-raid-module.yaml'
run: |
sudo -E make e2e-qemu
- name: save artifacts
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/integration-qemu-encrypted-vip-cron.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2024-09-09T13:58:35Z by kres 8be5fa7.
# Generated on 2024-09-20T17:49:19Z by kres 8be5fa7.

name: integration-qemu-encrypted-vip-cron
concurrency:
Expand Down Expand Up @@ -81,10 +81,10 @@ jobs:
- name: e2e-qemu
env:
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_EXTRA_DISKS: "2"
QEMU_EXTRA_DISKS: "3"
QEMU_EXTRA_DISKS_DRIVERS: ide,nvme
QEMU_EXTRA_DISKS_SIZE: "10240"
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml'
WITH_CONFIG_PATCH_WORKER: '@hack/test/patches/ephemeral-nvme.yaml:@hack/test/patches/dm-raid-module.yaml'
WITH_DISK_ENCRYPTION: "true"
WITH_KUBESPAN: "true"
WITH_VIRTUAL_IP: "true"
Expand Down
8 changes: 4 additions & 4 deletions .kres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ spec:
QEMU_EXTRA_DISKS: "3"
QEMU_EXTRA_DISKS_SIZE: "10240"
QEMU_EXTRA_DISKS_DRIVERS: "ide,nvme"
WITH_CONFIG_PATCH_WORKER: "@hack/test/patches/ephemeral-nvme.yaml"
WITH_CONFIG_PATCH_WORKER: "@hack/test/patches/ephemeral-nvme.yaml:@hack/test/patches/dm-raid-module.yaml"
- name: save-talos-logs
conditions:
- always
Expand Down Expand Up @@ -1017,7 +1017,7 @@ spec:
withSudo: true
environment:
QEMU_MEMORY_WORKERS: 4096
WITH_CONFIG_PATCH_WORKER: "@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml"
WITH_CONFIG_PATCH_WORKER: "@_out/installer-extensions-patch.yaml:@hack/test/patches/extensions.yaml:@hack/test/patches/dm-raid-module.yaml"
QEMU_EXTRA_DISKS: 3
SHORT_INTEGRATION_TEST: yes
EXTRA_TEST_ARGS: -talos.extensions.qemu
Expand Down Expand Up @@ -1153,10 +1153,10 @@ spec:
WITH_VIRTUAL_IP: true
WITH_KUBESPAN: true
IMAGE_REGISTRY: registry.dev.siderolabs.io
QEMU_EXTRA_DISKS: "2"
QEMU_EXTRA_DISKS: "3"
QEMU_EXTRA_DISKS_SIZE: "10240"
QEMU_EXTRA_DISKS_DRIVERS: "ide,nvme"
WITH_CONFIG_PATCH_WORKER: "@hack/test/patches/ephemeral-nvme.yaml"
WITH_CONFIG_PATCH_WORKER: "@hack/test/patches/ephemeral-nvme.yaml:@hack/test/patches/dm-raid-module.yaml"
- name: save-talos-logs
conditions:
- always
Expand Down
4 changes: 4 additions & 0 deletions hack/test/patches/dm-raid-module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
machine:
kernel:
modules:
- name: dm_raid
5 changes: 3 additions & 2 deletions internal/integration/api/volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (suite *VolumesSuite) TestLVMActivation() {

stdout, _, err = podDef.Exec(
suite.ctx,
"nsenter --mount=/proc/1/ns/mnt -- lvcreate -n lv0 -L 1G vg0",
"nsenter --mount=/proc/1/ns/mnt -- lvcreate --mirrors=1 --type=raid1 --nosync -n lv0 -L 1G vg0",
)
suite.Require().NoError(err)

Expand Down Expand Up @@ -275,7 +275,8 @@ func (suite *VolumesSuite) lvmVolumeExists() bool {
}

// we test with creating a volume group with two logical volumes
return lvmVolumeCount == 2
// one mirrored and one not, so we expect to see 6 volumes
return lvmVolumeCount == 6
}

func init() {
Expand Down

0 comments on commit 2f675e8

Please sign in to comment.