Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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