Bug 594803 - asks me which device to install to, when there's only one
asks me which device to install to, when there's only one
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Chris Lumens
Release Test Team
: 558689 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2010-05-21 12:30 EDT by Bill Nottingham
Modified: 2014-03-16 23:23 EDT (History)
4 users (show)

See Also:
Fixed In Version: anaconda-13.21.51-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-07-16 11:28:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
storage log (192.30 KB, text/plain)
2010-05-24 14:28 EDT, Bill Nottingham
no flags Details
storage log w/updates image (2.42 KB, text/plain)
2010-05-26 15:24 EDT, Bill Nottingham
no flags Details
anaconda log (6.18 KB, text/plain)
2010-05-26 15:24 EDT, Bill Nottingham
no flags Details
patch (1.55 KB, patch)
2010-05-28 23:09 EDT, Bill Nottingham
no flags Details | Diff
storage.log (117.98 KB, text/x-log)
2010-07-14 13:02 EDT, Alexander Todorov
no flags Details
tarball of all logs from stage2 (40.70 KB, application/x-gzip)
2010-07-14 13:03 EDT, Alexander Todorov
no flags Details

  None (edit)
Description Bill Nottingham 2010-05-21 12:30:32 EDT
Description of problem:

Installing on a laptop with only one hard drive, I choose 'basic' storage.

I'm then asked which drives I'd like to install to. Since there's only one choice, it should skip this.

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

20100521 nightly

How reproducible:

Comment 2 Chris Lumens 2010-05-21 16:00:08 EDT
Could you attach /tmp/storage.log and the output of udevadm info --export-db (switch to tty2, hit up arrow a bunch) to this bug report?
Comment 3 Bill Nottingham 2010-05-24 14:28:13 EDT
Created attachment 416192 [details]
storage log

Here's the anaconda storage.log from the installed system. I'll try and get the udevadm output once I'm in a position to do the test install again.
Comment 4 Chris Lumens 2010-05-24 16:02:24 EDT
According to your storage.log, you have two devices:  sda is a USB device of some description, and sdb is a drive with two partitions on it.  Are you doing a hard drive installation method where a USB device is the source?
Comment 5 Bill Nottingham 2010-05-25 10:29:49 EDT
sda is a USB card reader. It had no media in it, and was not ever shown in the UI.
Comment 6 Chris Lumens 2010-05-25 11:16:39 EDT
Does updates=http://clumens.fedorapeople.org/594803.img fix this issue and not drastically slow everything down?
Comment 7 Bill Nottingham 2010-05-26 15:23:17 EDT
It doesn't slow anything down (that I could notice), but it doesn't fix the issue either.
Comment 8 Bill Nottingham 2010-05-26 15:24:04 EDT
Created attachment 416993 [details]
storage log w/updates image

storage log w/updates image
Comment 9 Bill Nottingham 2010-05-26 15:24:36 EDT
Created attachment 416994 [details]
anaconda log
Comment 10 Chris Lumens 2010-05-26 16:25:15 EDT
Can you also jump over to tty2, start python, and paste the output of:

> import parted
> partedDevice = parted.Device("/dev/sda")
> print int(partedDevice.getSize())
Comment 11 Bill Nottingham 2010-05-26 16:34:51 EDT
> partedDevice = parted.Device("/dev/sda")

_ped.IOException: Error opening /dev/sda: No medium found
Comment 12 Bill Nottingham 2010-05-26 16:36:38 EDT
Looks like the populate() step that does the skipping for the device is done after we've decided to show the menu b/c there are there are two devices total.
Comment 13 Chris Lumens 2010-05-26 16:50:54 EDT
Right, that's what I was trying to solve with my updates.img:

diff --git a/iw/filter_gui.py b/iw/filter_gui.py
index a85cd1f..9f5b2f5 100644
--- a/iw/filter_gui.py
+++ b/iw/filter_gui.py
@@ -520,6 +520,8 @@ class FilterWindow(InstallWindow):
     def getScreen(self, anaconda):
+        global totalDevices
         (self.xml, self.vbox) = gui.getGladeWidget("filter.glade", "vbox")
         self.buttonBox = self.xml.get_widget("buttonBox")
         self.notebook = self.xml.get_widget("notebook")
@@ -575,12 +577,14 @@ class FilterWindow(InstallWindow):
         (raids, nonraids) = self.split_list(lambda d: isRAID(d) and not isCCISS(d),
+        self.populate(nonraids, mpaths, raids)
         if anaconda.id.simpleFilter:
             # In the typical use case, the user likely only has one drive and
             # there's no point showing either the filtering UI or the
             # cleardisks UI.  Unfortunately, that means we need to duplicate
             # some of the getNext method.
-            if len(singlepaths) == 1:
+            if totalDevices == 1:
                 anaconda.id.storage.exclusiveDisks = [udev_device_get_name(singlepaths[0])]
                 return None
@@ -592,8 +596,6 @@ class FilterWindow(InstallWindow):
                           self._makeMPath(), self._makeOther(),
-        self.populate(nonraids, mpaths, raids)
         # If the "Add Advanced" button is ever clicked, we need to have a list
         # of what devices previously existed so we know what's new.  Then we
         # can just add the new devices to the UI.  This is going to be slow,
Comment 14 RHEL Product and Program Management 2010-05-27 09:55:59 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
Comment 15 Chris Lumens 2010-05-27 16:24:08 EDT
I think I'm going to need access to a machine with this problem, as I don't see anything else obvious in the code that could be a problem.
Comment 16 Bill Nottingham 2010-05-28 23:09:35 EDT
Created attachment 417795 [details]

The issue with the prior patch was that populate() was called before the pages were set up, so totalDevices would never get incremented correctly. On fixing that, I noticed that there would still be an issue because simplepaths could still contain multiple devices.

The attached fixes it by filtering simplepaths based on the size of the device. I decided to read it out of sysfs, but we could create a partedDevice here and do it too... just seemed overkill to init parted on each device.
Comment 17 Chris Lumens 2010-06-04 14:20:30 EDT
Is that patch on top of the one I initially put into this report?
Comment 18 Bill Nottingham 2010-06-04 14:30:26 EDT
It's instead of that patch.
Comment 20 Alexander Todorov 2010-07-07 12:03:41 EDT
I have an ASUS eeePC laptop with integrated USB card reader to test this bug. However I've hit bug #612232 while trying snapshot #7.
Comment 21 Alexander Todorov 2010-07-14 08:53:48 EDT
*** Bug 558689 has been marked as a duplicate of this bug. ***
Comment 22 Alexander Todorov 2010-07-14 13:02:18 EDT
This is not fixed with snapshot #7 / anaconda 13.21.56. 

I have a single disk (sdc) and USB SD card reader (sdb) with no media in it. The Basic storage screen asked me which disk I want to install to and was showing only sdc. Moving back to ASSIGNED.

Will attach storage.log shortly.

Also I went to tty2 and executed:
> import parted
> partedDevice = parted.Device("/dev/sdb")
 a traceback follows: _ped.IOException: Error opening /dev/sdb: No medium found

which is expected.
Comment 23 Alexander Todorov 2010-07-14 13:02:55 EDT
Created attachment 431847 [details]
Comment 24 Alexander Todorov 2010-07-14 13:03:16 EDT
Created attachment 431848 [details]
tarball of all logs from stage2

Note You need to log in before you can comment on or make changes to this bug.