io/disk: Added disk_cleanup module and refactor test teardown#3188
io/disk: Added disk_cleanup module and refactor test teardown#3188maramsmurthy wants to merge 1 commit into
Conversation
7d5544d to
5f629df
Compare
|
RHEL run TestSuite TestRun Summary host_io_disk_cleanup_bonnie_bonnie Run Successfully executed host_io_disk_cleanup_tiobench_tiobench Run Successfully executed host_io_disk_cleanup_disk_info_disk_info Run Successfully executed host_io_disk_cleanup_disktest_disktest Run Successfully executed host_io_disk_cleanup_fiotest_fio Run Successfully executed host_io_disk_cleanup_softwareraid_softwareraid Run Successfully executed host_io_disk_cleanup_ltp_fsstress_ltp_fsstress Run Successfully executed host_io_disk_cleanup_ltp_fs_ltp_fs Run Successfully executed host_io_disk_cleanup_parallel_dd_parallel_dd Run Successfully executed host_io_disk_cleanup_fs_mark_fs_mark Run Successfully executed host_io_disk_cleanup_ioping_ioping Run Successfully executed host_io_disk_cleanup_iozone_iozone Run Successfully executed host_io_disk_cleanup_lvsetup_lvsetup Run Successfully executed SUSE bucket run host_io_disk_cleanup_bonnie_bonnie Run Successfully executed host_io_disk_cleanup_tiobench_tiobench Run Successfully executed host_io_disk_cleanup_disk_info_disk_info Run Successfully executed host_io_disk_cleanup_disktest_disktest Run Successfully executed host_io_disk_cleanup_fiotest_fio Run Successfully executed host_io_disk_cleanup_softwareraid_softwareraid Run Successfully executed host_io_disk_cleanup_ltp_fsstress_ltp_fsstress Run Successfully executed host_io_disk_cleanup_ltp_fs_ltp_fs Run Successfully executed host_io_disk_cleanup_parallel_dd_parallel_dd Run Successfully executed host_io_disk_cleanup_fs_mark_fs_mark Run Successfully executed host_io_disk_cleanup_ioping_ioping Run Successfully executed host_io_disk_cleanup_iozone_iozone Run Successfully executed host_io_disk_cleanup_lvsetup_lvsetup Run Successfully executed No issues observed with the the flow with respect to io_bucket/CR flow. |
35e614e to
7aa7868
Compare
|
@Naresh-ibm @abdhaleegit @PraveenPenguin @sacsant The current cleanup code PR is an advancement to the existing flow. Advantages:
Let me know if required any other information |
7aa7868 to
be707c0
Compare
PraveenPenguin
left a comment
There was a problem hiding this comment.
I feel move cleanup disk utility on avocado it self
This commit refactors disk I/O test teardown to use centralized cleanup utilities from the avocado framework's disk utility module instead of local implementations. Key changes: - Remove local disk_cleanup.py module (functionality migrated to avocado.utils.disk) - Update 13 test files to import cleanup_disks from avocado.utils.disk: * bonnie.py, dbench.py, disk_info.py, disktest.py, fiotest.py * fs_mark.py, iozone.py, ltp_fs.py, ltp_fsstress.py, lvsetup.py * parallel_dd.py, softwareraid.py, tiobench.py - Improve RAID cleanup: Use log.info for forced stop (normal flow) instead of log.warning to reduce noise in test logs Benefits: - Centralized maintenance in avocado framework - Consistent cleanup behavior across all disk tests - Disk-type agnostic utilities (NVMe, SCSI, IDE, virtio, etc.) - Dependency-aware cleanup order (mounts → swap → LVM → RAID → metadata) - Enhanced error handling and logging The cleanup utilities in avocado.utils.disk provide: - Automatic multipath device detection and normalization - Intelligent dependency graph resolution - Auto-detection mode for 'light' or 'full' cleanup - Orphaned device-mapper and VG directory cleanup - Enhanced RAID array detection using /sys/block slaves - Comprehensive metadata wiping with retry logic Signed-off-by: Maram Srimannarayana Murthy <msmurthy@linux.vnet.ibm.com>
be707c0 to
e80c150
Compare
|
Moved all the disk cleanup utilities to avocado framework Update all the files to use utils from avocado CR run is also successful without any issues TestSuite TestRun Summary host_io_disk_cleanup_bonnie_bonnie Run Successfully executed host_io_disk_cleanup_rawread_rawread Run Successfully executed host_io_disk_cleanup_tiobench_tiobench Run Successfully executed host_io_disk_cleanup_disktest_disktest Run Successfully executed host_io_disk_cleanup_fiotest_fio Run Successfully executed host_io_disk_cleanup_softwareraid_softwareraid Run Successfully executed host_io_disk_cleanup_ltp_fsstress_ltp_fsstress Run Successfully executed host_io_disk_cleanup_ltp_fs_ltp_fs Run Successfully executed host_io_disk_cleanup_parallel_dd_parallel_dd Run Successfully executed host_io_disk_cleanup_fs_mark_fs_mark Run Successfully executed host_io_disk_cleanup_ioping_ioping Run Successfully executed host_io_disk_cleanup_iozone_iozone Run Successfully executed host_io_disk_cleanup_lvsetup_lvsetup Run Successfully executed |
|
Just for the Information As this PR depends on utils PR avocado-framework/avocado#6312 It should be merged only after successful merge on utils PR |
Added new disk_cleanup.py module providing comprehensive disk cleanup functionality for storage test teardown. This module handles:
Refactor 13 test files to use the new cleanup_disks() function:
Benefits: