Bug 487743 - Fedora 8 to Fedora 10 preupgrade 'content-length' problem
Summary: Fedora 8 to Fedora 10 preupgrade 'content-length' problem
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: preupgrade
Version: 8
Hardware: i386
OS: Linux
low
high
Target Milestone: ---
Assignee: Seth Vidal
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-27 18:23 UTC by Carlos de Sousa
Modified: 2014-01-21 23:08 UTC (History)
2 users (show)

Fixed In Version: 1.1.0-1.fc10
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-05-28 08:13:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Carlos de Sousa 2009-02-27 18:23:09 UTC
Description of problem:

Trying to upgrade Fedora 8 to Fedora 10 using preupgrade.
The preupgrade gives me a traceback.

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


How reproducible:

always

Steps to Reproduce:
1. preupgrade-cli "Fedora 10 (Cambridge)"
2.
3.
  
Actual results:

[root@desousa yum]# preupgrade-cli "Fedora 10 (Cambridge)"
Loaded plugins: blacklist, whiteout
Reading repository metadata in from local files
Reading repository metadata in from local files
.treeinfo                                                          | 1.1 kB 00:00
Traceback (most recent call last):
  File "/usr/share/preupgrade/preupgrade-cli.py", line 291, in <module>
    pu.main(myrelease)
  File "/usr/share/preupgrade/preupgrade-cli.py", line 183, in main
    self.retrieve_critical_boot_files()
  File "/usr/lib/python2.5/site-packages/preupgrade/__init__.py", line 589, in retrieve_critical_boot_files
    self._retrieve_file(item)
  File "/usr/lib/python2.5/site-packages/preupgrade/__init__.py", line 494, in _retrieve_file
    mysize = tmp.hdr.dict['content-length']
KeyError: 'content-length'


Expected results:



Additional info:

The system is on a RAID'd disk (only one slice/partition).
Where is the disk layout:

[root@desousa yum]# df -k
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                     149186740  14383580 127102680  11% /
/dev/mapper/isw_ccdfajcjbh_Volume0p1
                        194442     19374    165029  11% /boot
tmpfs                  1029248        12   1029236   1% /dev/shm 

Here is the platform and HW info:

[root@desousa yum]# facter
architecture => i386
domain => x.x.x.x
facterversion => 1.5.2
fqdn => desousa.x.x.x.x.x
hardwareisa => i686
hardwaremodel => i686
hostname => desousa
id => root
interfaces => eth0,pan0
ipaddress => x.x.x.x
ipaddress_eth0 => x.x.x.x
kernel => Linux
kernelrelease => 2.6.26.8-57.fc8
kernelversion => 2.6.26.8
lsbdistcodename => Werewolf
lsbdistdescription => Fedora release 8 (Werewolf)
lsbdistid => Fedora
lsbdistrelease => 8
lsbmajdistrelease => 8
lsbrelease => :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
macaddress => 00:0F:x
macaddress_eth0 => 00:0F:x
macaddress_pan0 => 1A:74:x
manufacturer => Hewlett-Packard
memoryfree => 1.39 GB
memorysize => 1.96 GB
netmask => 255.255.254.0
netmask_eth0 => 255.255.254.0
operatingsystem => Fedora
operatingsystemrelease => 8
processor0 => Intel(R) Core(TM)2 CPU          6400  @ 2.13GHz
processor1 => Intel(R) Core(TM)2 CPU          6400  @ 2.13GHz
processorcount => 2
productname => HP Compaq dc7700p Convertible Minitower
ps => ps -ef
rubysitedir => /usr/lib/ruby/site_ruby/1.8
rubyversion => 1.8.6
swapfree => 1.94 GB
swapsize => 1.94 GB
type => Mini Tower
uniqueid => 3a89be85
virtual => physical

Comment 1 seth vidal 2009-02-27 18:30:52 UTC
Do you happen to know what mirror are you using to retrieve that info?

Comment 2 seth vidal 2009-02-27 18:38:37 UTC
this patch

--- preupgrade/__init__.py	2009-02-19 19:13:15 +0000
+++ preupgrade/__init__.py	2009-02-27 18:36:45 +0000
@@ -384,7 +384,10 @@
         local = targetdir + '/' + item_fname
         # remote size
         tmp = self.instgrab.urlopen(fileinfo)
-        mysize = tmp.hdr.dict['content-length']
+        try:
+            mysize = tmp.hdr.dict['content-length']
+        except KeyError:
+            mysize = -1     
         tmp.close()
 
         # Check to see if we've already got the right file



to latest preupgrade makes sure that if we can't get content-length from the headers of the mirror, that we just download the file.

Comment 3 Will Woods 2009-02-27 22:51:22 UTC
Patch seems sensible. I've added it to preupgrade's bzr repo.

As far as I know, this behavior depends on the mirror; if you try to run preupgrade again it might pick a different mirror and work OK.

What happens if you try to run preupgrade again?

Comment 4 Carlos de Sousa 2009-02-28 00:24:09 UTC
(In reply to comment #3)
> Patch seems sensible. I've added it to preupgrade's bzr repo.
> 
> As far as I know, this behavior depends on the mirror; if you try to run
> preupgrade again it might pick a different mirror and work OK.
> 
> What happens if you try to run preupgrade again?

I did try 7-8 times and it always gave me the same result, I think I a using the Swedish mirror by default.
(In reply to comment #2)
> this patch
> 
> --- preupgrade/__init__.py 2009-02-19 19:13:15 +0000
> +++ preupgrade/__init__.py 2009-02-27 18:36:45 +0000
> @@ -384,7 +384,10 @@
>          local = targetdir + '/' + item_fname
>          # remote size
>          tmp = self.instgrab.urlopen(fileinfo)
> -        mysize = tmp.hdr.dict['content-length']
> +        try:
> +            mysize = tmp.hdr.dict['content-length']
> +        except KeyError:
> +            mysize = -1     
>          tmp.close()
> 
>          # Check to see if we've already got the right file
> 
> 
> 
> to latest preupgrade makes sure that if we can't get content-length from the
> headers of the mirror, that we just download the file.


I have added the patch and then it went through with no problems, thanks

Comment 5 Fedora Update System 2009-04-28 22:07:17 UTC
preupgrade-1.1.0-0.pre2.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/preupgrade-1.1.0-0.pre2.fc10

Comment 6 Fedora Update System 2009-05-02 16:41:32 UTC
preupgrade-1.1.0-0.pre2.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-4211

Comment 7 Fedora Update System 2009-05-13 22:46:40 UTC
preupgrade-1.1.0-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/preupgrade-1.1.0-1.fc9

Comment 8 Fedora Update System 2009-05-13 22:47:37 UTC
preupgrade-1.1.0-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/preupgrade-1.1.0-1.fc11

Comment 9 Fedora Update System 2009-05-15 23:33:38 UTC
preupgrade-1.1.0-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update preupgrade'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-4211

Comment 10 Fedora Update System 2009-05-28 07:57:51 UTC
preupgrade-1.1.0-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2009-05-28 08:10:38 UTC
preupgrade-1.1.0-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2009-05-28 08:12:37 UTC
preupgrade-1.1.0-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


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