Bug 2128467

Summary: [RHEL9] disks_needed need to be set for the raid test cases
Product: Red Hat Enterprise Linux 9 Reporter: Zhang Yi <yizhan>
Component: rhel-system-rolesAssignee: Vojtech Trefny <vtrefny>
Status: CLOSED ERRATA QA Contact: Zhang Yi <yizhan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.1CC: rmeggins, spetrosi
Target Milestone: rcKeywords: Triaged
Target Release: 9.2Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:storage
Fixed In Version: rhel-system-roles-1.21.0-0.13.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2151355 (view as bug list) Environment:
Last Closed: 2023-05-09 07:37:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2151355    

Description Zhang Yi 2022-09-20 16:53:36 UTC
Description of problem:
[RHEL9] disks_needed need to be set for the raid test cases

Version-Release number of selected component (if applicable):
rhel-system-roles-1.20.0-1.el9.noarch

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
If the system has only one nvme disk, the raid create will be failed as only one disk is provided, we'd better skip the test if there are not enough disks.

diff --git a/tests_create_raid_pool_then_remove.yml b/tests_create_raid_pool_then_remove.yml
index 6136f54..acece71 100644
--- a/tests_create_raid_pool_then_remove.yml
+++ b/tests_create_raid_pool_then_remove.yml
@@ -27,6 +27,7 @@
     - include_tasks: get_unused_disk.yml
       vars:
         max_return: 2
+        disks_needed: 2
 
     - name: Create a RAID0 device
       include_role:
diff --git a/tests_create_raid_volume_then_remove.yml b/tests_create_raid_volume_then_remove.yml
index a5a86ca..1e21e20 100644
--- a/tests_create_raid_volume_then_remove.yml
+++ b/tests_create_raid_volume_then_remove.yml
@@ -20,6 +20,7 @@
     - include_tasks: get_unused_disk.yml
       vars:
         max_return: 2
+        disks_needed: 2
 
     - name: Create a RAID0 device mounted on "{{ mount_location }}"
       include_role:
diff --git a/tests_fatals_raid_pool.yml b/tests_fatals_raid_pool.yml
index c6e6c3c..31a1ce3 100644
--- a/tests_fatals_raid_pool.yml
+++ b/tests_fatals_raid_pool.yml
@@ -27,6 +27,7 @@
     - include_tasks: get_unused_disk.yml
       vars:
         max_return: 2
+        disks_needed: 2
 
     - name: Try to create a raid pool with invalid raid_level (expect failure)
       block:
diff --git a/tests_fatals_raid_volume.yml b/tests_fatals_raid_volume.yml
index 060a130..6f5fb73 100644
--- a/tests_fatals_raid_volume.yml
+++ b/tests_fatals_raid_volume.yml
@@ -20,6 +20,7 @@
     - include_tasks: get_unused_disk.yml
       vars:
         max_return: 2
+        disks_needed: 2
 
     - name: Try to create a raid pool with invalid raid_level (expect failure)
       block:
diff --git a/tests_null_raid_pool.yml b/tests_null_raid_pool.yml
index ac33a74..ac5d88d 100644
--- a/tests_null_raid_pool.yml
+++ b/tests_null_raid_pool.yml
@@ -23,6 +23,7 @@
     - include_tasks: get_unused_disk.yml
       vars:
         max_return: 2
+        disks_needed: 2
 
     - name: get existing raids (before run)
       command: "cat /proc/mdstat"

Comment 11 errata-xmlrpc 2023-05-09 07:37:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rhel-system-roles bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2023:2246