Bug 218929

Summary: anaconda tries to grab all devices with a swap signature
Product: [Fedora] Fedora Reporter: Joachim Schröder <jschrode>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: anaconda-maint-list, ddumas, jonathan, syeghiay, tomek, vanmeeuwen+fedora
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-21 18:15:40 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:
Attachments:
Description Flags
anacondas patch
none
kickstarts patch
none
The documentation that has to go with the change. none

Description Joachim Schröder 2006-12-08 15:23:29 UTC
Description of problem:
Assuming that many XEN installations will make use of the feature to directly 
assign a LVM block device as a partition to the guest, we run into a problem 
because anaconda tries to activate all reachable devices with a SWAP 
signature. Therefore any new installation of Dom0 in an environment with 
existing DomU logical volumes leads to either an error message because 
activation of an unformatted SWAP device failed or the installed Dom0 
occupying the guest's SWAP devices, which can be dangerous if nobody notices.
Anaconda should not only ask in the device dialog if you want to format a SWAP 
device but also if you want to have it activated at all.

Version-Release number of selected component (if applicable):
RHEL 5 Beta 2

How reproducible:
Install RHEL 5 Beta 2

Steps to Reproduce:
1. Create 2 logical volumes with a SWAP signature
2. try to install a new system using only one of these SWAP devices
  
Actual results:
The system will have both SWAP devices in /etc/fstab

Expected results:
Only the selected SWAP device should be in /etc/fstab

Comment 7 Joel Andres Granados 2008-02-12 09:59:15 UTC
Created attachment 294642 [details]
anacondas patch

Comment 8 Joel Andres Granados 2008-02-12 09:59:39 UTC
Created attachment 294643 [details]
kickstarts patch

Comment 9 Joel Andres Granados 2008-02-12 10:01:08 UTC
Since the anaconda stuff depends on the kickstart stuff I'm going to coordinate
with clumens and push the changes as soon as he modifies pykickstart.

Comment 10 Joel Andres Granados 2008-02-12 15:56:32 UTC
Created attachment 294670 [details]
The documentation that has to go with the change.

Comment 19 Chris Lumens 2009-10-07 15:56:45 UTC
I guess I don't understand why this is such a big problem.  Can't you just define the virtual machine in such a way that it can't see every LV that the host provides, therefore walling anaconda off from those swap partitions that you don't want accessed?

Comment 20 Tomasz Kepczynski 2009-10-07 18:48:16 UTC
It is a problem on dual (or multi) boot machine where you have older version of Solaris OS. Anaconda will happily trash such a partition.
The other problem - you have multiboot machine with a few versions of any Linux distribution (I have anything between 6 and 8 and counting on my test machines) and you use suspend/hibernation on those. As far as I know hibernation uses swap partition to save OS state. And as you can't stop anaconda from using ALL swap partitions - it will again trash those.
That's one thing. The other is that it is practically the only thing I (as a user) don't have a control when installing RHEL (or Fedora). And the behaviour is so similar to the line of the most popular OS on planet from one US software maker which happily overwrites your grub in master boot record after every installation... You know what I mean.

Comment 21 Joachim Schröder 2009-12-18 22:05:08 UTC
(In reply to comment #19)
> I guess I don't understand why this is such a big problem.  Can't you just
> define the virtual machine in such a way that it can't see every LV that the
> host provides, therefore walling anaconda off from those swap partitions that
> you don't want accessed?  

I hoped comment #20 would already contain enough arguments, but the bug still seems to be in "needinfo"... :-)

So, next to the fact that anaconda annoyes anyone who _does_ want to use multiboot installations with hibernation or _does_ want to use a raw device in a virtual guest as a swap device, it is just a bad experience for anybody who has such a setup "by accident" and has to cope with the fact that anaconda just does what it thinks is right instead of leaving the decision to the user.

Looking at the fact that virtualization is growing and people might iSCSI or fibre LUN partitions for guest swap that they will no mask against the host, we will get this request probably more often. This is the chance to fix it before it becomes a major pain.

Comment 22 David Lehman 2010-12-21 18:12:09 UTC
This needs to be in Fedora before consideration for RHEL.

Comment 23 David Lehman 2010-12-21 18:15:40 UTC

*** This bug has been marked as a duplicate of bug 70477 ***