From 41b3de68bd241b521859ec9393c75d9e07e3d002 Mon Sep 17 00:00:00 2001 From: Abhilash Shetty Date: Tue, 9 Jul 2024 07:03:07 +0000 Subject: [PATCH 1/4] test(bdd): adding scheduler logic bdd Signed-off-by: Abhilash Shetty --- tests/bdd/scheduler.feature | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tests/bdd/scheduler.feature diff --git a/tests/bdd/scheduler.feature b/tests/bdd/scheduler.feature new file mode 100644 index 00000000..8190721b --- /dev/null +++ b/tests/bdd/scheduler.feature @@ -0,0 +1,53 @@ + Feature: Validate scheduling algorithm + Background: + Given 3 node lvmnode cluster is configured + And lvm vg "lvmvg" with 20G is created on each node + + Scenario: test CapacityWeighted scheduler logic + Given sc is created with scheduler parameter set to "CapacityWeighted" + When "pvc-1" is created using size "5G" + And "pvc-2" is created using size "5G" + And "pvc-3" is created using size "2G" + Then all three pvc lvmvolume should be placed on different nodes + When "pvc-4" is created with size "1G" + Then "pvc-4" lvmvolume should be placed on "pvc-3" lvmvolume node + When "pvc-5" is created with size "1G" + Then "pvc-5" lvmvolume should be placed on "pvc-4" lvmvolume node + When "pvc-6" is created with size "2G" + Then "pvc-6" lvmvolume should be placed on "pvc-5" lvmvolume node + When "pvc-7" is created with size "3G" + Then "pvc-7" lvmvolume should be placed on "pvc-1" or "pvc-2" lvmvolume node + When "pvc-8" is created with size "3G" + Then "pvc-8" lvmvolume should not be placed on "pvc-7" and "pvc-3" node + + Scenario: test SpaceWeighted with vgextend logic + Given sc is created by not setting scheduler parameter explicitly + When "pvc-1" is created with using size "6G" + And "pvc-2" is created with using size "2G" + And "pvc-3" is created with using size "3G" + Then all pvc lvmvolume should be placed on different nodes + When "pvc-1" vg is extended by 10G + And "pvc-4" is created with size "5G" + Then "pvc-4" lvmvolume should be placed on "pvc-1" lvmvolume node + + Scenario: test SpaceWeighted without vgextend logic + Given sc is created by not setting scheduling parameter explicitly + When "pvc-1" is created with using size "6G" + And "pvc-2" is created with using size "2G" + And "pvc-3" is created with using size "3G" + Then all pvc lvmvolume should be placed on different nodes + When "pvc-4" is created with size "5G" + Then "pvc-4" lvmvolume should be placed on "pvc-2" lvmvolume node + + Scenario: test VolumeWighted logic + Given sc is created with scheduling parameter set to "VolumeWeighted" + When "pvc-1" is created with using size "6G" + And "pvc-2" is created with using size "2G" + And "pvc-3" is created with using size "3G" + Then all pvc lvmvolume should be placed on different nodes + When "pvc-4" is created with size "4G" + Then "pvc-4" lvmvolume can be on any node + When "pvc-5" is created with size "3G" + Then "pvc-5" lvmvolume can not be on "pvc-4" node + When "pvc-6" is created with size "6G" + Then "pvc-6" can not be on "pvc-4" and "pvc-5" lvmvolume node From 4427f6ffe66aa230d50c5e26f72ed5f98db45fbd Mon Sep 17 00:00:00 2001 From: Abhilash Shetty Date: Tue, 9 Jul 2024 07:11:09 +0000 Subject: [PATCH 2/4] test(bdd): adding scheduler logic bdd Signed-off-by: Abhilash Shetty --- tests/bdd/scheduler.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bdd/scheduler.feature b/tests/bdd/scheduler.feature index 8190721b..b63b929f 100644 --- a/tests/bdd/scheduler.feature +++ b/tests/bdd/scheduler.feature @@ -31,7 +31,7 @@ Then "pvc-4" lvmvolume should be placed on "pvc-1" lvmvolume node Scenario: test SpaceWeighted without vgextend logic - Given sc is created by not setting scheduling parameter explicitly + Given sc is created by not setting scheduler parameter explicitly When "pvc-1" is created with using size "6G" And "pvc-2" is created with using size "2G" And "pvc-3" is created with using size "3G" @@ -40,7 +40,7 @@ Then "pvc-4" lvmvolume should be placed on "pvc-2" lvmvolume node Scenario: test VolumeWighted logic - Given sc is created with scheduling parameter set to "VolumeWeighted" + Given sc is created with scheduler parameter set to "VolumeWeighted" When "pvc-1" is created with using size "6G" And "pvc-2" is created with using size "2G" And "pvc-3" is created with using size "3G" From e12e8572333376c7572e8c1759da0a11aa1d6972 Mon Sep 17 00:00:00 2001 From: Abhilash Shetty Date: Thu, 11 Jul 2024 10:13:59 +0000 Subject: [PATCH 3/4] test(bdd): adding scheduler logic bdd Signed-off-by: Abhilash Shetty --- tests/bdd/scheduler.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bdd/scheduler.feature b/tests/bdd/scheduler.feature index b63b929f..a10523f8 100644 --- a/tests/bdd/scheduler.feature +++ b/tests/bdd/scheduler.feature @@ -12,9 +12,9 @@ When "pvc-4" is created with size "1G" Then "pvc-4" lvmvolume should be placed on "pvc-3" lvmvolume node When "pvc-5" is created with size "1G" - Then "pvc-5" lvmvolume should be placed on "pvc-4" lvmvolume node + Then "pvc-5" lvmvolume should be placed on "pvc-3" lvmvolume node When "pvc-6" is created with size "2G" - Then "pvc-6" lvmvolume should be placed on "pvc-5" lvmvolume node + Then "pvc-6" lvmvolume should be placed on "pvc-3" lvmvolume node When "pvc-7" is created with size "3G" Then "pvc-7" lvmvolume should be placed on "pvc-1" or "pvc-2" lvmvolume node When "pvc-8" is created with size "3G" From e71d8091f0c2d4578cd90764416ae05bff1befd1 Mon Sep 17 00:00:00 2001 From: Abhilash Shetty Date: Wed, 17 Jul 2024 05:39:50 +0000 Subject: [PATCH 4/4] test(bdd): adding scheduler logic bdd Signed-off-by: Abhilash Shetty --- tests/bdd/scheduler.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/bdd/scheduler.feature b/tests/bdd/scheduler.feature index a10523f8..52870cd5 100644 --- a/tests/bdd/scheduler.feature +++ b/tests/bdd/scheduler.feature @@ -39,7 +39,7 @@ When "pvc-4" is created with size "5G" Then "pvc-4" lvmvolume should be placed on "pvc-2" lvmvolume node - Scenario: test VolumeWighted logic + Scenario: test VolumeWeighted logic Given sc is created with scheduler parameter set to "VolumeWeighted" When "pvc-1" is created with using size "6G" And "pvc-2" is created with using size "2G"