Bug 196208

Summary: bringing up arbitrary swap devices breaks hibernate and swap priorities
Product: [Fedora] Fedora Reporter: Alexandre Oliva <oliva>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: ipilcher, rvokal, zaitcev
Target Milestone: ---Keywords: EasyFix, Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.36-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-21 18:45:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexandre Oliva 2006-06-21 21:11:16 UTC
Description of problem:
A system with multiple swap devices configured in /etc/fstab will no longer
respect the swap priorities specified in this file, and will use swap devices
reserved for other sessions e.g. xen virtual machines or clustered-LVM
shared-disk units.

This is the culprit:

swappartitions=`blkid -t TYPE=swap -o device`
if [ x"$swappartitions" != x ]; then
        action $"Enabling local swap partitions: " swapon $swappartitions
fi

If it must be there for some reason, it ought to be *after*, not before swapon
-a -e.

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

How reproducible:
Every time

Steps to Reproduce:
1.Set up two swap devices
2.Boot up
3.Change their order in /etc/fstab
4.Reboot

Actual results:
The change had no effect in the priorities listed by swapon -s

Expected results:
It should have.  Hibernate relies on that.  Specifying priorities explicitly
breaks as well.

Additional info:

Comment 1 Ian Pilcher 2006-07-05 21:54:16 UTC
This needs to die a quick and unregretted death.  Just because a swap partition
is sitting there, that does not give us the right to use it.  It could, for
example, have a hibernated session from another Linux version installed on the
same system.  (Not the best idea, I know, but that doesn't mean we should
just go trampling over it.)

Trying to use RAID-1 component partitions is the least of the sins here.

Comment 2 Bill Nottingham 2006-07-21 18:45:45 UTC
Fixed in 8.36-1. You now set AUTOSWAP=yes in /etc/sysconfig/init to do it, and
the errors on duplicate device bringup are gone.