Bug 505388

Summary: Preupgrade loads packages from net, not from hard disk
Product: [Fedora] Fedora Reporter: Juhani Jaakola <juhani.jaakola>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: anaconda-maint-list, rmaximo, vanmeeuwen+fedora, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-30 14:55:48 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
anaconda.log, program.log, storage.log, X.log none

Description Juhani Jaakola 2009-06-11 18:05:24 UTC
Description of problem:
I started preupgrade, which loaded 3 GB of packages to my hard disk. It also complained that my /boot partition is too small to contain stage2. Then I booted and the installer loaded install.img from net (this is OK). But then when it started to install the packages, the Ethernet and hard disk LEDs show that the installer is loading ALL packages from net AGAIN, although they are already in the hard disk!

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


How reproducible:


Steps to Reproduce:
1. Run preupgrade with a small /boot partition
2. reboot
3. after install.img is loaded, observe network and hard disk traffic
  
Actual results:
Lots of network traffic, very little hard disk activity, very slow progress

Expected results:
No network traffic after install.img is loaded

Additional info:

Comment 1 Juhani Jaakola 2009-06-11 19:29:39 UTC
Created attachment 347464 [details]
anaconda.log, program.log, storage.log, X.log

Snapshot of logs while packages are being updated

Comment 2 Juhani Jaakola 2009-06-11 19:34:24 UTC
Oh, I forgot to mention that I'm upgrading from fully yum-updated F10 to F11.

Here is the line in grub.conf:

	kernel /upgrade/vmlinuz preupgrade repo=hd::/var/cache/yum/preupgrade stage2=http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/images/install.img ks=hd:UUID=fd25fa39-9940-4676-82c1-ef8772ae6922:/upgrade/ks.cfg

Here is the ks.cfg:

# ks.cfg generated by preupgrade
lang en_US.UTF-8
keyboard fi
bootloader --upgrade --location=none
upgrade --root-device=UUID=a45c5859-23b8-4fb9-84b5-6cfce9b75291
reboot


%post
grubby --remove-kernel=/boot/upgrade/vmlinuz
rm -rf /boot/upgrade /var/cache/yum/preupgrade*
%end

And ps -ef shows the following arguments:

root       758    78  4 20:35 tty1     00:04:34 /usr/bin/python /usr/bin/anaconda --stage2 http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/images/install.img --kickstart /tmp/ks.cfg --graphical --selinux --lang en_US.UTF-8 --keymap fi --repo http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os
root       760   758  0 20:35 tty1     00:00:00 /usr/bin/python /usr/bin/anaconda --stage2 http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/images/install.img --kickstart /tmp/ks.cfg --graphical --selinux --lang en_US.UTF-8 --keymap fi --repo http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os

Comment 3 Will Woods 2009-06-11 20:56:47 UTC
anaconda.log says:

20:35:02 INFO    : got stage2 at url http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os/images/install.img
20:35:02 INFO    : reset repo= parameter to http://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os

i.e. anaconda is discarding the repo set by preupgrade on the boot commandline. 

I'm not sure how we can prevent that from happening here.

Comment 4 Chris Lumens 2009-06-11 21:06:01 UTC
stage2= implies the repo location for transitional reasons, unfortunately.  We could probably just put a check for the preupgrade parameter in at the point where we reset repo=.  That'd be easy, but doesn't help at all for F11 since it's all loader code.

Comment 5 Juhani Jaakola 2009-11-24 23:28:11 UTC
Does anybody know whether this bug still exists? I'm about to use preupgrade to upgrade Fedora 11 to Fedora 12 now.

If this bug still exists, is there a work-around? For example, can I create a bootable USB memory and move /boot/upgrade to it, and then load stage2.img to the USB memory and finally manually edit grub.conf and ks.cfg (and what else) so that I can boot into Anaconda from the USB memory and it would then read the downloaded packages from my hard disk and upgrade the system?

Comment 6 Juhani Jaakola 2009-11-25 08:24:45 UTC
It works! At the moment preupgrade is upgrading my system from Fedora 11 to Fedora 12, and this time it reads the packages from the hard disk! It had to load install.img (stage2) from the Net, but otherwise it does not use the Net.

Comment 7 Will Woods 2009-11-30 14:39:50 UTC
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 23, in <module>
    from cli import *
  File "/usr/share/yum-cli/cli.py", line 26, in <module>
    import random
  File "/usr/lib/python2.6/random.py", line 48, in <module>
    from binascii import hexlify as _hexlify
KeyboardInterrupt

A KeyboardInterrupt normally indicates that the user hit Ctrl-C or otherwise interrupted the process. Which is not a bug.

What were you doing when this happened?

Comment 8 Juhani Jaakola 2009-11-30 14:51:09 UTC
Ugrade using preupgrade from Fedora 11 to Fedora 12 worked fine last week.

Last June preupgrade from Fedora 10 to Fedora 11 loaded the packages twice. I did not interrupt the upgrade. Sorry I can't remember all of the details any more after almost six months.

Comment 9 Will Woods 2009-11-30 14:55:48 UTC
Ack, comment misfire - that comment was supposed to go to a different bug. My sincere apologies for any confusion. 

I'm going to close this bug, since it seems to work as expected now. Thanks for testing!