Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 904134

Summary: [RHEL7] storage test can not restore swap
Product: [Retired] Red Hat Hardware Certification Program Reporter: Greg Nichols <gnichols>
Component: Test Suite (tests)Assignee: Greg Nichols <gnichols>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Beňas <pbenas>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.7.0CC: czhang, pbenas, pstehlik, rlandry
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: v7-1.7.0-R3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-28 06:21:00 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: 904887    
Attachments:
Description Flags
storage patch unmounting tested device in all cases none

Description Greg Nichols 2013-01-25 14:23:44 UTC
Description of problem:

The storage test on RHEL7 can not restore swap.   The test hangs while attempting to restore swap.  control-C lets it continue, producing the following:

swap device has no label.
restoring swap device /dev/dm-0 ...
Warning: mkswap may have failed.
"mkswap   /dev/dm-0" has output on stderr
/dev/dm-0: Device or resource busy
Error: could not restore swap
"swapon /dev/dm-0" has output on stderr
swapon: /dev/mapper/rhel_intel--canoepass--01-swap: read swap header failed: Invalid argument
Error: restore swap error !

The system is left in a state where attempts to call mkswap on the swap device gives the "Device or resource busy" error



Version-Release number of selected component (if applicable):

v7 1.7.0 R0


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Greg Nichols 2013-01-25 14:25:09 UTC
RHEL7: RHEL-7.0-20130120.0 Server x86_64

Comment 2 Greg Nichols 2013-01-29 16:01:23 UTC
Created attachment 689918 [details]
storage patch unmounting tested device in all cases

The problem on RHEL7 is that the the swap device appears in /proc/mounts with its LVM name, so the test assumes it's not mounted, and skips calling umount on it.

example log segment:

returns 0
skipping umount: device /dev/dm-0 not in /proc/mounts
umount ok

This patch calls umount on the device whether or not it is found in /proc/mounts.

Comment 3 Greg Nichols 2013-01-29 16:03:22 UTC
The above patch also provides a way to skip lengthy test segments if debug is set, and mode is not set to auto by providing prompts to continue at key points.