From bc6f0d0847b726fac0142bfcc1eda490cd77f4e9 Mon Sep 17 00:00:00 2001 From: Mikhail Sakhnov Date: Tue, 26 Nov 2024 09:40:19 +0100 Subject: [PATCH] WIP: trigger e2e on arm Signed-off-by: Mikhail Sakhnov --- .github/workflows/e2e-test.yaml | 4 +- .../00-assert.yaml | 4 ++ .../00-create-vm.yaml | 13 +++-- .../01-assert.yaml | 5 ++ .../01-upscale.yaml | 54 ++++++++--------- .../02-assert.yaml | 5 ++ .../02-downscale.yaml | 6 +- .../e2e/autoscaling.dimmslots/00-assert.yaml | 6 +- .../autoscaling.dimmslots/00-create-vm.yaml | 16 ++--- .../e2e/autoscaling.dimmslots/01-assert.yaml | 5 ++ .../e2e/autoscaling.dimmslots/01-upscale.yaml | 54 ++++++++--------- .../e2e/autoscaling.dimmslots/02-assert.yaml | 5 ++ .../autoscaling.dimmslots/02-downscale.yaml | 6 +- .../e2e/autoscaling.revisions/00-assert.yaml | 4 ++ .../autoscaling.revisions/00-create-vm.yaml | 15 +++-- .../e2e/autoscaling.revisions/01-assert.yaml | 5 ++ .../01-change-target-revision.yaml | 6 +- .../e2e/autoscaling.revisions/02-assert.yaml | 4 ++ .../e2e/autoscaling.revisions/02-upscale.yaml | 54 ++++++++--------- .../e2e/autoscaling.virtio-mem/00-assert.yaml | 4 ++ .../autoscaling.virtio-mem/00-create-vm.yaml | 14 +++-- .../e2e/autoscaling.virtio-mem/01-assert.yaml | 4 ++ .../autoscaling.virtio-mem/01-upscale.yaml | 54 ++++++++--------- .../e2e/autoscaling.virtio-mem/02-assert.yaml | 5 ++ .../autoscaling.virtio-mem/02-downscale.yaml | 6 +- tests/e2e/disk-quota/00-assert.yaml | 12 ++-- tests/e2e/disk-quota/00-create-vm.yaml | 16 +++-- tests/e2e/disk-quota/01-assert.yaml | 2 +- tests/e2e/disk-quota/02-test-quota.yaml | 1 - tests/e2e/image-spec.yaml | 3 - tests/e2e/restart-counted/00-assert.yaml | 5 ++ tests/e2e/restart-counted/00-create-vm.yaml | 4 ++ tests/e2e/restart-counted/01-assert.yaml | 5 ++ tests/e2e/runner-pod/00-assert.yaml | 15 +++-- tests/e2e/runner-pod/00-create-vm.yaml | 4 ++ tests/e2e/runner-pod/01-assert.yaml | 15 +++-- tests/e2e/s3/00-create-minio.yaml | 4 ++ tests/e2e/s3/01-assert.yaml | 5 ++ tests/e2e/s3/02-init.yaml | 3 +- tests/e2e/swap/00-assert.yaml | 10 ++-- tests/e2e/swap/00-create-vm.yaml | 4 ++ .../00-assert.yaml | 6 +- .../00-create-vm.yaml | 4 ++ .../vm-migration.virtio-mem/00-assert.yaml | 4 ++ .../vm-migration.virtio-mem/00-prepare.yaml | 58 +++++++++---------- .../vm-migration.virtio-mem/01-assert.yaml | 5 ++ .../vm-migration.virtio-mem/01-migrate.yaml | 2 +- tests/e2e/vm-migration/00-assert.yaml | 4 ++ tests/e2e/vm-migration/00-prepare.yaml | 58 +++++++++---------- tests/e2e/vm-migration/01-assert.yaml | 5 ++ tests/e2e/vm-migration/01-migrate.yaml | 2 +- tests/e2e/vm-neonvmd/00-assert.yaml | 15 +++-- tests/e2e/vm-neonvmd/00-create-vm.yaml | 4 ++ tests/e2e/vm-ssh/00-assert.yaml | 15 +++-- tests/e2e/vm-ssh/00-create-vm.yaml | 4 ++ 55 files changed, 401 insertions(+), 251 deletions(-) diff --git a/.github/workflows/e2e-test.yaml b/.github/workflows/e2e-test.yaml index 0e72f755f..d907c3f5a 100644 --- a/.github/workflows/e2e-test.yaml +++ b/.github/workflows/e2e-test.yaml @@ -233,8 +233,8 @@ jobs: docker image tag "$TEST_IMAGE" "$IMG_E2E_TEST" make load-example-vms - - run: make e2e - timeout-minutes: 15 + - run: make arm_patch_e2e e2e + timeout-minutes: 30 - name: Get k8s logs and events if: always() diff --git a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-assert.yaml b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-assert.yaml index 10de5a68b..b6d59dac4 100644 --- a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-assert.yaml +++ b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-assert.yaml @@ -15,3 +15,7 @@ status: cpus: 250m memorySize: 1Gi memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-create-vm.yaml b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-create-vm.yaml index f48e7075a..7be919ed7 100644 --- a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-create-vm.yaml +++ b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/00-create-vm.yaml @@ -8,10 +8,10 @@ metadata: name: example spec: ports: - - name: postgres - port: 5432 - protocol: TCP - targetPort: postgres + - name: postgres + port: 5432 + protocol: TCP + targetPort: postgres type: NodePort selector: vm.neon.tech/name: example @@ -56,7 +56,7 @@ spec: - name: monitor port: 10301 extraNetwork: - enable: false + enable: false disks: - name: pgdata mountPath: /var/lib/postgresql @@ -73,7 +73,8 @@ spec: mountPath: /neonvm/cache tmpfs: size: 1Gi - +status: + memoryProvider: VirtioMem --- apiVersion: v1 kind: ConfigMap diff --git a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-assert.yaml b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-assert.yaml index 336cca86d..71ef31ae0 100644 --- a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-assert.yaml +++ b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-assert.yaml @@ -14,6 +14,11 @@ status: status: "True" cpus: 3 memorySize: 4Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-upscale.yaml b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-upscale.yaml index d95636340..90589097c 100644 --- a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-upscale.yaml +++ b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/01-upscale.yaml @@ -9,35 +9,35 @@ metadata: spec: terminationGracePeriodSeconds: 1 initContainers: - - name: wait-for-pg - image: postgres:15-bullseye - command: - - sh - - "-c" - - | - set -e - until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do - sleep 1 - done + - name: wait-for-pg + image: postgres:15-bullseye + command: + - sh + - "-c" + - | + set -e + until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do + sleep 1 + done containers: - - name: pgbench - image: postgres:15-bullseye - volumeMounts: - - name: my-volume - mountPath: /etc/misc - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --client=20 - - --progress=1 - - --progress-timestamp - - --time=600 - - --file=/etc/misc/query.sql + - name: pgbench + image: postgres:15-bullseye + volumeMounts: + - name: my-volume + mountPath: /etc/misc + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --client=20 + - --progress=1 + - --progress-timestamp + - --time=600 + - --file=/etc/misc/query.sql volumes: - - name: my-volume - configMap: - name: query + - name: my-volume + configMap: + name: query restartPolicy: Never --- apiVersion: v1 diff --git a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-assert.yaml b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-assert.yaml index 8e97b6494..078fefc0c 100644 --- a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-assert.yaml +++ b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-assert.yaml @@ -14,3 +14,8 @@ status: status: "True" cpus: 250m memorySize: 1Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-downscale.yaml b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-downscale.yaml index 160f31462..954266cbf 100644 --- a/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-downscale.yaml +++ b/tests/e2e/autoscaling.cpu-sys-fs-state-scaling/02-downscale.yaml @@ -1,7 +1,7 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep delete: -- apiVersion: v1 - kind: Pod - name: workload + - apiVersion: v1 + kind: Pod + name: workload unitTest: false diff --git a/tests/e2e/autoscaling.dimmslots/00-assert.yaml b/tests/e2e/autoscaling.dimmslots/00-assert.yaml index 3a0b27560..b6d59dac4 100644 --- a/tests/e2e/autoscaling.dimmslots/00-assert.yaml +++ b/tests/e2e/autoscaling.dimmslots/00-assert.yaml @@ -14,4 +14,8 @@ status: status: "True" cpus: 250m memorySize: 1Gi - memoryProvider: DIMMSlots + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.dimmslots/00-create-vm.yaml b/tests/e2e/autoscaling.dimmslots/00-create-vm.yaml index 60b05ae25..313cd9b2e 100644 --- a/tests/e2e/autoscaling.dimmslots/00-create-vm.yaml +++ b/tests/e2e/autoscaling.dimmslots/00-create-vm.yaml @@ -8,10 +8,10 @@ metadata: name: example spec: ports: - - name: postgres - port: 5432 - protocol: TCP - targetPort: postgres + - name: postgres + port: 5432 + protocol: TCP + targetPort: postgres type: NodePort selector: vm.neon.tech/name: example @@ -36,7 +36,7 @@ spec: min: 1 max: 5 use: 1 - memoryProvider: DIMMSlots + memoryProvider: VirtioMem rootDisk: image: vm-postgres:15-bullseye size: 8Gi @@ -55,7 +55,7 @@ spec: - name: monitor port: 10301 extraNetwork: - enable: true + enable: true disks: - name: pgdata mountPath: /var/lib/postgresql @@ -72,7 +72,9 @@ spec: mountPath: /neonvm/cache tmpfs: size: 1Gi - + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem --- apiVersion: v1 kind: ConfigMap diff --git a/tests/e2e/autoscaling.dimmslots/01-assert.yaml b/tests/e2e/autoscaling.dimmslots/01-assert.yaml index d7531ec6e..62805eb0b 100644 --- a/tests/e2e/autoscaling.dimmslots/01-assert.yaml +++ b/tests/e2e/autoscaling.dimmslots/01-assert.yaml @@ -14,6 +14,11 @@ status: status: "True" cpus: 1 memorySize: 4Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/autoscaling.dimmslots/01-upscale.yaml b/tests/e2e/autoscaling.dimmslots/01-upscale.yaml index d95636340..90589097c 100644 --- a/tests/e2e/autoscaling.dimmslots/01-upscale.yaml +++ b/tests/e2e/autoscaling.dimmslots/01-upscale.yaml @@ -9,35 +9,35 @@ metadata: spec: terminationGracePeriodSeconds: 1 initContainers: - - name: wait-for-pg - image: postgres:15-bullseye - command: - - sh - - "-c" - - | - set -e - until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do - sleep 1 - done + - name: wait-for-pg + image: postgres:15-bullseye + command: + - sh + - "-c" + - | + set -e + until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do + sleep 1 + done containers: - - name: pgbench - image: postgres:15-bullseye - volumeMounts: - - name: my-volume - mountPath: /etc/misc - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --client=20 - - --progress=1 - - --progress-timestamp - - --time=600 - - --file=/etc/misc/query.sql + - name: pgbench + image: postgres:15-bullseye + volumeMounts: + - name: my-volume + mountPath: /etc/misc + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --client=20 + - --progress=1 + - --progress-timestamp + - --time=600 + - --file=/etc/misc/query.sql volumes: - - name: my-volume - configMap: - name: query + - name: my-volume + configMap: + name: query restartPolicy: Never --- apiVersion: v1 diff --git a/tests/e2e/autoscaling.dimmslots/02-assert.yaml b/tests/e2e/autoscaling.dimmslots/02-assert.yaml index 8e97b6494..078fefc0c 100644 --- a/tests/e2e/autoscaling.dimmslots/02-assert.yaml +++ b/tests/e2e/autoscaling.dimmslots/02-assert.yaml @@ -14,3 +14,8 @@ status: status: "True" cpus: 250m memorySize: 1Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.dimmslots/02-downscale.yaml b/tests/e2e/autoscaling.dimmslots/02-downscale.yaml index 160f31462..954266cbf 100644 --- a/tests/e2e/autoscaling.dimmslots/02-downscale.yaml +++ b/tests/e2e/autoscaling.dimmslots/02-downscale.yaml @@ -1,7 +1,7 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep delete: -- apiVersion: v1 - kind: Pod - name: workload + - apiVersion: v1 + kind: Pod + name: workload unitTest: false diff --git a/tests/e2e/autoscaling.revisions/00-assert.yaml b/tests/e2e/autoscaling.revisions/00-assert.yaml index b15db8de5..c43f20098 100644 --- a/tests/e2e/autoscaling.revisions/00-assert.yaml +++ b/tests/e2e/autoscaling.revisions/00-assert.yaml @@ -19,3 +19,7 @@ status: revision: value: 123 flags: 456 +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.revisions/00-create-vm.yaml b/tests/e2e/autoscaling.revisions/00-create-vm.yaml index 9b480f41c..e448a858c 100644 --- a/tests/e2e/autoscaling.revisions/00-create-vm.yaml +++ b/tests/e2e/autoscaling.revisions/00-create-vm.yaml @@ -8,10 +8,10 @@ metadata: name: example spec: ports: - - name: postgres - port: 5432 - protocol: TCP - targetPort: postgres + - name: postgres + port: 5432 + protocol: TCP + targetPort: postgres type: NodePort selector: vm.neon.tech/name: example @@ -58,8 +58,9 @@ spec: port: 9100 - name: monitor port: 10301 + memoryProvider: VirtioMem extraNetwork: - enable: true + enable: true disks: - name: pgdata mountPath: /var/lib/postgresql @@ -76,7 +77,9 @@ spec: mountPath: /neonvm/cache tmpfs: size: 1Gi - + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem --- apiVersion: v1 kind: ConfigMap diff --git a/tests/e2e/autoscaling.revisions/01-assert.yaml b/tests/e2e/autoscaling.revisions/01-assert.yaml index a65939fea..728cc0788 100644 --- a/tests/e2e/autoscaling.revisions/01-assert.yaml +++ b/tests/e2e/autoscaling.revisions/01-assert.yaml @@ -11,3 +11,8 @@ status: revision: value: 1 flags: 123 + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.revisions/01-change-target-revision.yaml b/tests/e2e/autoscaling.revisions/01-change-target-revision.yaml index 716d7b309..e48bb1567 100644 --- a/tests/e2e/autoscaling.revisions/01-change-target-revision.yaml +++ b/tests/e2e/autoscaling.revisions/01-change-target-revision.yaml @@ -2,7 +2,6 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep unitTest: false --- - apiVersion: vm.neon.tech/v1 kind: VirtualMachine metadata: @@ -15,3 +14,8 @@ spec: value: 1 flags: 123 updatedAt: 2020-01-02T15:04:05Z + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.revisions/02-assert.yaml b/tests/e2e/autoscaling.revisions/02-assert.yaml index b8b35bb47..e9ae68089 100644 --- a/tests/e2e/autoscaling.revisions/02-assert.yaml +++ b/tests/e2e/autoscaling.revisions/02-assert.yaml @@ -11,6 +11,9 @@ spec: revision: value: 124 # we had 123 as the initial revision flags: 1 # 1 for Upscale + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem status: phase: Running restartCount: 0 @@ -23,6 +26,7 @@ status: revision: value: 124 flags: 1 + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/autoscaling.revisions/02-upscale.yaml b/tests/e2e/autoscaling.revisions/02-upscale.yaml index d95636340..90589097c 100644 --- a/tests/e2e/autoscaling.revisions/02-upscale.yaml +++ b/tests/e2e/autoscaling.revisions/02-upscale.yaml @@ -9,35 +9,35 @@ metadata: spec: terminationGracePeriodSeconds: 1 initContainers: - - name: wait-for-pg - image: postgres:15-bullseye - command: - - sh - - "-c" - - | - set -e - until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do - sleep 1 - done + - name: wait-for-pg + image: postgres:15-bullseye + command: + - sh + - "-c" + - | + set -e + until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do + sleep 1 + done containers: - - name: pgbench - image: postgres:15-bullseye - volumeMounts: - - name: my-volume - mountPath: /etc/misc - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --client=20 - - --progress=1 - - --progress-timestamp - - --time=600 - - --file=/etc/misc/query.sql + - name: pgbench + image: postgres:15-bullseye + volumeMounts: + - name: my-volume + mountPath: /etc/misc + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --client=20 + - --progress=1 + - --progress-timestamp + - --time=600 + - --file=/etc/misc/query.sql volumes: - - name: my-volume - configMap: - name: query + - name: my-volume + configMap: + name: query restartPolicy: Never --- apiVersion: v1 diff --git a/tests/e2e/autoscaling.virtio-mem/00-assert.yaml b/tests/e2e/autoscaling.virtio-mem/00-assert.yaml index 10de5a68b..b6d59dac4 100644 --- a/tests/e2e/autoscaling.virtio-mem/00-assert.yaml +++ b/tests/e2e/autoscaling.virtio-mem/00-assert.yaml @@ -15,3 +15,7 @@ status: cpus: 250m memorySize: 1Gi memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.virtio-mem/00-create-vm.yaml b/tests/e2e/autoscaling.virtio-mem/00-create-vm.yaml index bdfa2b591..313cd9b2e 100644 --- a/tests/e2e/autoscaling.virtio-mem/00-create-vm.yaml +++ b/tests/e2e/autoscaling.virtio-mem/00-create-vm.yaml @@ -8,10 +8,10 @@ metadata: name: example spec: ports: - - name: postgres - port: 5432 - protocol: TCP - targetPort: postgres + - name: postgres + port: 5432 + protocol: TCP + targetPort: postgres type: NodePort selector: vm.neon.tech/name: example @@ -55,7 +55,7 @@ spec: - name: monitor port: 10301 extraNetwork: - enable: true + enable: true disks: - name: pgdata mountPath: /var/lib/postgresql @@ -72,7 +72,9 @@ spec: mountPath: /neonvm/cache tmpfs: size: 1Gi - + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem --- apiVersion: v1 kind: ConfigMap diff --git a/tests/e2e/autoscaling.virtio-mem/01-assert.yaml b/tests/e2e/autoscaling.virtio-mem/01-assert.yaml index 45d7193a2..62805eb0b 100644 --- a/tests/e2e/autoscaling.virtio-mem/01-assert.yaml +++ b/tests/e2e/autoscaling.virtio-mem/01-assert.yaml @@ -15,6 +15,10 @@ status: cpus: 1 memorySize: 4Gi memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/autoscaling.virtio-mem/01-upscale.yaml b/tests/e2e/autoscaling.virtio-mem/01-upscale.yaml index d95636340..90589097c 100644 --- a/tests/e2e/autoscaling.virtio-mem/01-upscale.yaml +++ b/tests/e2e/autoscaling.virtio-mem/01-upscale.yaml @@ -9,35 +9,35 @@ metadata: spec: terminationGracePeriodSeconds: 1 initContainers: - - name: wait-for-pg - image: postgres:15-bullseye - command: - - sh - - "-c" - - | - set -e - until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do - sleep 1 - done + - name: wait-for-pg + image: postgres:15-bullseye + command: + - sh + - "-c" + - | + set -e + until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do + sleep 1 + done containers: - - name: pgbench - image: postgres:15-bullseye - volumeMounts: - - name: my-volume - mountPath: /etc/misc - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --client=20 - - --progress=1 - - --progress-timestamp - - --time=600 - - --file=/etc/misc/query.sql + - name: pgbench + image: postgres:15-bullseye + volumeMounts: + - name: my-volume + mountPath: /etc/misc + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --client=20 + - --progress=1 + - --progress-timestamp + - --time=600 + - --file=/etc/misc/query.sql volumes: - - name: my-volume - configMap: - name: query + - name: my-volume + configMap: + name: query restartPolicy: Never --- apiVersion: v1 diff --git a/tests/e2e/autoscaling.virtio-mem/02-assert.yaml b/tests/e2e/autoscaling.virtio-mem/02-assert.yaml index 8e97b6494..078fefc0c 100644 --- a/tests/e2e/autoscaling.virtio-mem/02-assert.yaml +++ b/tests/e2e/autoscaling.virtio-mem/02-assert.yaml @@ -14,3 +14,8 @@ status: status: "True" cpus: 250m memorySize: 1Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/autoscaling.virtio-mem/02-downscale.yaml b/tests/e2e/autoscaling.virtio-mem/02-downscale.yaml index 160f31462..954266cbf 100644 --- a/tests/e2e/autoscaling.virtio-mem/02-downscale.yaml +++ b/tests/e2e/autoscaling.virtio-mem/02-downscale.yaml @@ -1,7 +1,7 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep delete: -- apiVersion: v1 - kind: Pod - name: workload + - apiVersion: v1 + kind: Pod + name: workload unitTest: false diff --git a/tests/e2e/disk-quota/00-assert.yaml b/tests/e2e/disk-quota/00-assert.yaml index ef3b88bad..c4fc945c9 100644 --- a/tests/e2e/disk-quota/00-assert.yaml +++ b/tests/e2e/disk-quota/00-assert.yaml @@ -5,7 +5,7 @@ commands: - script: | set -eux pod="$(kubectl get neonvm -n "$NAMESPACE" example -o jsonpath='{.status.podName}')" - + # Run repquota to display enabled project quotas full_quota_report=$(kubectl exec -n "$NAMESPACE" "$pod" -- ssh guest-vm /neonvm/bin/repquota -P -a) @@ -20,10 +20,10 @@ metadata: app.kubernetes.io/name: NeonVM vm.neon.tech/name: example ownerReferences: - - apiVersion: vm.neon.tech/v1 - blockOwnerDeletion: true - controller: true - kind: VirtualMachine - name: example + - apiVersion: vm.neon.tech/v1 + blockOwnerDeletion: true + controller: true + kind: VirtualMachine + name: example status: phase: Running diff --git a/tests/e2e/disk-quota/00-create-vm.yaml b/tests/e2e/disk-quota/00-create-vm.yaml index 087ebd389..510c6551b 100644 --- a/tests/e2e/disk-quota/00-create-vm.yaml +++ b/tests/e2e/disk-quota/00-create-vm.yaml @@ -21,10 +21,14 @@ spec: rootDisk: image: vm-postgres:15-bullseye size: 1Gi + memoryProvider: VirtioMem disks: - - emptyDisk: - discard: true - size: 2Gi - enableQuotas: true - mountPath: /var/db/postgres/compute - name: pgdata + - emptyDisk: + discard: true + size: 2Gi + enableQuotas: true + mountPath: /var/db/postgres/compute + name: pgdata + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/disk-quota/01-assert.yaml b/tests/e2e/disk-quota/01-assert.yaml index 964a9cb56..c2dc65437 100644 --- a/tests/e2e/disk-quota/01-assert.yaml +++ b/tests/e2e/disk-quota/01-assert.yaml @@ -5,7 +5,7 @@ commands: - script: | set -eux pod="$(kubectl get neonvm -n "$NAMESPACE" example -o jsonpath='{.status.podName}')" - + # Run repquota in CSV format and capture the output csv_output=$(kubectl exec -n "$NAMESPACE" "$pod" -- ssh guest-vm /neonvm/bin/repquota -a -P -O csv) diff --git a/tests/e2e/disk-quota/02-test-quota.yaml b/tests/e2e/disk-quota/02-test-quota.yaml index 19233735c..b61b70ee8 100644 --- a/tests/e2e/disk-quota/02-test-quota.yaml +++ b/tests/e2e/disk-quota/02-test-quota.yaml @@ -34,4 +34,3 @@ commands: else echo "Test passed: 1000MB file creation failed as expected." fi - diff --git a/tests/e2e/image-spec.yaml b/tests/e2e/image-spec.yaml index a66c39ca2..b26ff2d99 100644 --- a/tests/e2e/image-spec.yaml +++ b/tests/e2e/image-spec.yaml @@ -17,7 +17,6 @@ commands: user: nobody sysvInitAction: respawn shell: 'DATA_SOURCE_NAME="user=cloud_admin sslmode=disable dbname=postgres" /bin/postgres_exporter' - files: - filename: cgconfig.conf content: | @@ -48,7 +47,6 @@ files: max_client_conn=10000 default_pool_size=16 max_prepared_statements=0 - build: | # Build vm-monitor FROM rust:1.79-alpine AS monitor-builder @@ -126,7 +124,6 @@ build: | && LDFLAGS=-static ./configure --prefix=/usr/local/pgbouncer --without-openssl \ && make -j $(nproc) \ && make install - merge: | RUN adduser --system --disabled-login --no-create-home --home /nonexistent --gecos "monitor user" --shell /bin/false vm-monitor diff --git a/tests/e2e/restart-counted/00-assert.yaml b/tests/e2e/restart-counted/00-assert.yaml index cd40ee35b..b6d59dac4 100644 --- a/tests/e2e/restart-counted/00-assert.yaml +++ b/tests/e2e/restart-counted/00-assert.yaml @@ -14,3 +14,8 @@ status: status: "True" cpus: 250m memorySize: 1Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/restart-counted/00-create-vm.yaml b/tests/e2e/restart-counted/00-create-vm.yaml index 335741642..9a66ec346 100644 --- a/tests/e2e/restart-counted/00-create-vm.yaml +++ b/tests/e2e/restart-counted/00-create-vm.yaml @@ -21,3 +21,7 @@ spec: rootDisk: image: vm-postgres:15-bullseye size: 1Gi + memoryProvider: VirtioMem + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/restart-counted/01-assert.yaml b/tests/e2e/restart-counted/01-assert.yaml index 40dc57203..b61123713 100644 --- a/tests/e2e/restart-counted/01-assert.yaml +++ b/tests/e2e/restart-counted/01-assert.yaml @@ -14,3 +14,8 @@ status: status: "True" cpus: 250m memorySize: 1Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/runner-pod/00-assert.yaml b/tests/e2e/runner-pod/00-assert.yaml index 7ac4263f0..140a7af5a 100644 --- a/tests/e2e/runner-pod/00-assert.yaml +++ b/tests/e2e/runner-pod/00-assert.yaml @@ -16,6 +16,11 @@ status: cpus: 250m memorySize: 1Gi restartCount: 0 + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: Pod @@ -24,10 +29,10 @@ metadata: app.kubernetes.io/name: NeonVM vm.neon.tech/name: example ownerReferences: - - apiVersion: vm.neon.tech/v1 - blockOwnerDeletion: true - controller: true - kind: VirtualMachine - name: example + - apiVersion: vm.neon.tech/v1 + blockOwnerDeletion: true + controller: true + kind: VirtualMachine + name: example status: phase: Running diff --git a/tests/e2e/runner-pod/00-create-vm.yaml b/tests/e2e/runner-pod/00-create-vm.yaml index 335741642..9a66ec346 100644 --- a/tests/e2e/runner-pod/00-create-vm.yaml +++ b/tests/e2e/runner-pod/00-create-vm.yaml @@ -21,3 +21,7 @@ spec: rootDisk: image: vm-postgres:15-bullseye size: 1Gi + memoryProvider: VirtioMem + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/runner-pod/01-assert.yaml b/tests/e2e/runner-pod/01-assert.yaml index 383f72db7..b464b2dba 100644 --- a/tests/e2e/runner-pod/01-assert.yaml +++ b/tests/e2e/runner-pod/01-assert.yaml @@ -16,6 +16,11 @@ status: cpus: 250m memorySize: 1Gi restartCount: 1 + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: Pod @@ -24,10 +29,10 @@ metadata: app.kubernetes.io/name: NeonVM vm.neon.tech/name: example ownerReferences: - - apiVersion: vm.neon.tech/v1 - blockOwnerDeletion: true - controller: true - kind: VirtualMachine - name: example + - apiVersion: vm.neon.tech/v1 + blockOwnerDeletion: true + controller: true + kind: VirtualMachine + name: example status: phase: Running diff --git a/tests/e2e/s3/00-create-minio.yaml b/tests/e2e/s3/00-create-minio.yaml index 3f128e391..62bdc2960 100644 --- a/tests/e2e/s3/00-create-minio.yaml +++ b/tests/e2e/s3/00-create-minio.yaml @@ -71,3 +71,7 @@ spec: rootDisk: image: vm-postgres:15-bullseye size: 1Gi + memoryProvider: VirtioMem + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/s3/01-assert.yaml b/tests/e2e/s3/01-assert.yaml index 8c0f04e61..e9ccf12e2 100644 --- a/tests/e2e/s3/01-assert.yaml +++ b/tests/e2e/s3/01-assert.yaml @@ -29,3 +29,8 @@ status: status: "True" cpus: 250m memorySize: 1Gi + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem diff --git a/tests/e2e/s3/02-init.yaml b/tests/e2e/s3/02-init.yaml index 1e9b24598..23c03be54 100644 --- a/tests/e2e/s3/02-init.yaml +++ b/tests/e2e/s3/02-init.yaml @@ -8,7 +8,7 @@ commands: export AWS_SECRET_ACCESS_KEY=minio123 kubectl set env daemonset autoscaler-agent -n kube-system AWS_ACCESS_KEY_ID=minio kubectl set env daemonset autoscaler-agent -n kube-system AWS_SECRET_ACCESS_KEY=minio123 - + ../.venv/bin/python3 utils.py step2_init # The reason we put the assert here as well is that a separate @@ -18,4 +18,3 @@ commands: # until it succeeds or the test times out ../.venv/bin/python3 utils.py step2_assert ../.venv/bin/python3 utils.py restore - diff --git a/tests/e2e/swap/00-assert.yaml b/tests/e2e/swap/00-assert.yaml index 9b2c3c085..0f408860b 100644 --- a/tests/e2e/swap/00-assert.yaml +++ b/tests/e2e/swap/00-assert.yaml @@ -18,10 +18,10 @@ metadata: app.kubernetes.io/name: NeonVM vm.neon.tech/name: example ownerReferences: - - apiVersion: vm.neon.tech/v1 - blockOwnerDeletion: true - controller: true - kind: VirtualMachine - name: example + - apiVersion: vm.neon.tech/v1 + blockOwnerDeletion: true + controller: true + kind: VirtualMachine + name: example status: phase: Running diff --git a/tests/e2e/swap/00-create-vm.yaml b/tests/e2e/swap/00-create-vm.yaml index 51587c28e..8beceeef2 100644 --- a/tests/e2e/swap/00-create-vm.yaml +++ b/tests/e2e/swap/00-create-vm.yaml @@ -24,3 +24,7 @@ spec: settings: # use old format swap: 1Gi + memoryProvider: VirtioMem + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/tmp-default-cpu-scaling-mode/00-assert.yaml b/tests/e2e/tmp-default-cpu-scaling-mode/00-assert.yaml index 98bf6f0e1..ea984ef79 100644 --- a/tests/e2e/tmp-default-cpu-scaling-mode/00-assert.yaml +++ b/tests/e2e/tmp-default-cpu-scaling-mode/00-assert.yaml @@ -10,4 +10,8 @@ metadata: # field spec.cpuScalingMode should go to default value `qmp_scaling` if it is not set # TODO: delete once the https://github.com/neondatabase/autoscaling/issues/1082 went live spec: - cpuScalingMode: qmpScaling + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/tmp-default-cpu-scaling-mode/00-create-vm.yaml b/tests/e2e/tmp-default-cpu-scaling-mode/00-create-vm.yaml index 335741642..9a66ec346 100644 --- a/tests/e2e/tmp-default-cpu-scaling-mode/00-create-vm.yaml +++ b/tests/e2e/tmp-default-cpu-scaling-mode/00-create-vm.yaml @@ -21,3 +21,7 @@ spec: rootDisk: image: vm-postgres:15-bullseye size: 1Gi + memoryProvider: VirtioMem + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/vm-migration.virtio-mem/00-assert.yaml b/tests/e2e/vm-migration.virtio-mem/00-assert.yaml index f6cc18db2..221031859 100644 --- a/tests/e2e/vm-migration.virtio-mem/00-assert.yaml +++ b/tests/e2e/vm-migration.virtio-mem/00-assert.yaml @@ -13,6 +13,10 @@ status: - type: Available status: "True" memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/vm-migration.virtio-mem/00-prepare.yaml b/tests/e2e/vm-migration.virtio-mem/00-prepare.yaml index dfef6b0ab..74133c10e 100644 --- a/tests/e2e/vm-migration.virtio-mem/00-prepare.yaml +++ b/tests/e2e/vm-migration.virtio-mem/00-prepare.yaml @@ -1,7 +1,7 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep apply: -- ../../../neonvm/samples/vm-example.virtio-mem.yaml + - ../../../neonvm/samples/vm-example.virtio-mem.yaml unitTest: false --- apiVersion: v1 @@ -11,33 +11,33 @@ metadata: spec: terminationGracePeriodSeconds: 1 initContainers: - - name: wait-for-pg - image: postgres:15-bullseye - command: - - sh - - "-c" - - | - set -e - until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do - sleep 1 - done - - name: pgbench-initialize - image: postgres:15-bullseye - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --initialize - - --scale=10 + - name: wait-for-pg + image: postgres:15-bullseye + command: + - sh + - "-c" + - | + set -e + until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do + sleep 1 + done + - name: pgbench-initialize + image: postgres:15-bullseye + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --initialize + - --scale=10 containers: - - name: pgbench - image: postgres:15-bullseye - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --client=2 - - --progress=1 - - --progress-timestamp - - --time=600 + - name: pgbench + image: postgres:15-bullseye + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --client=2 + - --progress=1 + - --progress-timestamp + - --time=600 restartPolicy: Never diff --git a/tests/e2e/vm-migration.virtio-mem/01-assert.yaml b/tests/e2e/vm-migration.virtio-mem/01-assert.yaml index 9416c0d72..be37735e2 100644 --- a/tests/e2e/vm-migration.virtio-mem/01-assert.yaml +++ b/tests/e2e/vm-migration.virtio-mem/01-assert.yaml @@ -19,6 +19,11 @@ status: conditions: - type: Available status: "True" + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/vm-migration.virtio-mem/01-migrate.yaml b/tests/e2e/vm-migration.virtio-mem/01-migrate.yaml index 1866a7d58..8273d763c 100644 --- a/tests/e2e/vm-migration.virtio-mem/01-migrate.yaml +++ b/tests/e2e/vm-migration.virtio-mem/01-migrate.yaml @@ -1,5 +1,5 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep apply: -- ../../../neonvm/samples/vm-example-migration.yaml + - ../../../neonvm/samples/vm-example-migration.yaml unitTest: false diff --git a/tests/e2e/vm-migration/00-assert.yaml b/tests/e2e/vm-migration/00-assert.yaml index f6cc18db2..221031859 100644 --- a/tests/e2e/vm-migration/00-assert.yaml +++ b/tests/e2e/vm-migration/00-assert.yaml @@ -13,6 +13,10 @@ status: - type: Available status: "True" memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/vm-migration/00-prepare.yaml b/tests/e2e/vm-migration/00-prepare.yaml index 66d1af845..e060ee9b1 100644 --- a/tests/e2e/vm-migration/00-prepare.yaml +++ b/tests/e2e/vm-migration/00-prepare.yaml @@ -1,7 +1,7 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep apply: -- ../../../neonvm/samples/vm-example.yaml + - ../../../neonvm/samples/vm-example.yaml unitTest: false --- apiVersion: v1 @@ -11,33 +11,33 @@ metadata: spec: terminationGracePeriodSeconds: 1 initContainers: - - name: wait-for-pg - image: postgres:15-bullseye - command: - - sh - - "-c" - - | - set -e - until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do - sleep 1 - done - - name: pgbench-initialize - image: postgres:15-bullseye - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --initialize - - --scale=10 + - name: wait-for-pg + image: postgres:15-bullseye + command: + - sh + - "-c" + - | + set -e + until pg_isready --username=postgres --dbname=postgres --host=example --port=5432; do + sleep 1 + done + - name: pgbench-initialize + image: postgres:15-bullseye + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --initialize + - --scale=10 containers: - - name: pgbench - image: postgres:15-bullseye - command: - - pgbench - args: - - postgres://postgres@example:5432/postgres - - --client=2 - - --progress=1 - - --progress-timestamp - - --time=600 + - name: pgbench + image: postgres:15-bullseye + command: + - pgbench + args: + - postgres://postgres@example:5432/postgres + - --client=2 + - --progress=1 + - --progress-timestamp + - --time=600 restartPolicy: Never diff --git a/tests/e2e/vm-migration/01-assert.yaml b/tests/e2e/vm-migration/01-assert.yaml index 9416c0d72..be37735e2 100644 --- a/tests/e2e/vm-migration/01-assert.yaml +++ b/tests/e2e/vm-migration/01-assert.yaml @@ -19,6 +19,11 @@ status: conditions: - type: Available status: "True" + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: pod diff --git a/tests/e2e/vm-migration/01-migrate.yaml b/tests/e2e/vm-migration/01-migrate.yaml index 1866a7d58..8273d763c 100644 --- a/tests/e2e/vm-migration/01-migrate.yaml +++ b/tests/e2e/vm-migration/01-migrate.yaml @@ -1,5 +1,5 @@ apiVersion: kuttl.dev/v1beta1 kind: TestStep apply: -- ../../../neonvm/samples/vm-example-migration.yaml + - ../../../neonvm/samples/vm-example-migration.yaml unitTest: false diff --git a/tests/e2e/vm-neonvmd/00-assert.yaml b/tests/e2e/vm-neonvmd/00-assert.yaml index 7f79bc96f..99841dbf0 100644 --- a/tests/e2e/vm-neonvmd/00-assert.yaml +++ b/tests/e2e/vm-neonvmd/00-assert.yaml @@ -20,6 +20,11 @@ status: cpus: 250m memorySize: 1Gi sshSecretName: ssh-neonvm-example + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: Secret @@ -28,8 +33,8 @@ immutable: true metadata: name: ssh-neonvm-example ownerReferences: - - apiVersion: vm.neon.tech/v1 - blockOwnerDeletion: true - controller: true - kind: VirtualMachine - name: example + - apiVersion: vm.neon.tech/v1 + blockOwnerDeletion: true + controller: true + kind: VirtualMachine + name: example diff --git a/tests/e2e/vm-neonvmd/00-create-vm.yaml b/tests/e2e/vm-neonvmd/00-create-vm.yaml index 2bb3c345d..bb44f145e 100644 --- a/tests/e2e/vm-neonvmd/00-create-vm.yaml +++ b/tests/e2e/vm-neonvmd/00-create-vm.yaml @@ -22,3 +22,7 @@ spec: rootDisk: image: vm-postgres:15-bullseye size: 1Gi + memoryProvider: VirtioMem + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem diff --git a/tests/e2e/vm-ssh/00-assert.yaml b/tests/e2e/vm-ssh/00-assert.yaml index 9ffc3f869..dfae4edaf 100644 --- a/tests/e2e/vm-ssh/00-assert.yaml +++ b/tests/e2e/vm-ssh/00-assert.yaml @@ -30,6 +30,11 @@ status: cpus: 250m memorySize: 1Gi sshSecretName: ssh-neonvm-example + memoryProvider: VirtioMem +spec: + cpuScalingMode: sysfsScaling + guest: + memoryProvider: VirtioMem --- apiVersion: v1 kind: Secret @@ -38,8 +43,8 @@ immutable: true metadata: name: ssh-neonvm-example ownerReferences: - - apiVersion: vm.neon.tech/v1 - blockOwnerDeletion: true - controller: true - kind: VirtualMachine - name: example + - apiVersion: vm.neon.tech/v1 + blockOwnerDeletion: true + controller: true + kind: VirtualMachine + name: example diff --git a/tests/e2e/vm-ssh/00-create-vm.yaml b/tests/e2e/vm-ssh/00-create-vm.yaml index 2bb3c345d..bb44f145e 100644 --- a/tests/e2e/vm-ssh/00-create-vm.yaml +++ b/tests/e2e/vm-ssh/00-create-vm.yaml @@ -22,3 +22,7 @@ spec: rootDisk: image: vm-postgres:15-bullseye size: 1Gi + memoryProvider: VirtioMem + cpuScalingMode: sysfsScaling +status: + memoryProvider: VirtioMem