update-manager free space check broken when /var/cache/apt/archive is a symlink

Bug #106804 reported by Simon Oosthoek
10
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: update-manager

when testing the "update-manager -d" to upgrade from kubuntu edgy to feisty beta4, the program broke off, because it didn't find enough space available in /var/cache/apt. Ok, fine, I ran apt-get clean, re-ran update-manager, the same problem (less now, of course). So I moved /var/cache to another partition and created a symlink to that (ln -s /local/cache cache).

Another run should have found the disk-space to be plenty large enough
/dev/sda9 223G 169G 55G 76% /local

but, no go!

I don't want to have to repartition the disk to try this upgrade procedure!.
I would like to upgrade. because I'd like to test whether the photo printing has improved over edgy...

Cheers

Simon

Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

Can you please attach the files in /var/log/dist-upgrade ? This will help us diagnose the problem.

Thanks,
 Michael

Changed in update-manager:
status: Unconfirmed → Needs Info
Revision history for this message
Simon Oosthoek (simon-margo) wrote :
Revision history for this message
Simon Oosthoek (simon-margo) wrote :
Revision history for this message
Simon Oosthoek (simon-margo) wrote :

term.log was empty

From the main.log, I suppose that the correct mount-point isn't found
18:13:36,050 DEBUG Dir /var/cache/apt/archives/ mounted on /var

but in actual fact, /var/cache is a symlink to another fs.

BTW, the symlinks command
$ symlinks /var
other_fs: /var/cache -> /local/cache

shows that it's on another fs, however, this command isn't installed by default :-(

/Simon

Michael Vogt (mvo)
Changed in update-manager:
importance: Undecided → High
status: Needs Info → Confirmed
Michael Vogt (mvo)
Changed in update-manager:
status: Confirmed → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :

Here is a patch that should work. Please test it with the following commands:
$ mkdir /tmp/upgrader
$ cd /tmp/upgrader
$ wget http://archive.ubuntu.com/ubuntu/dists/feisty/main/dist-upgrader-all/current/feisty.tar.gz
$ tar xzvf feisty.tar.gz
$ patch -p1 < symlink-fix.diff
$ sudo ./feisty

and let me know if it fixes the issue.

Thanks,
 michael

Changed in update-manager:
status: In Progress → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

If your /var/cache/apt/archives dir is symlinked and you get this error, you can workaround the problem editing (or creating):
/etc/apt/apt.conf
with the following line:

Dir::Cache::archives "/path/to/your/archive/dir";

Changed in update-manager:
importance: High → Medium
Revision history for this message
Simon Oosthoek (simon-margo) wrote :

Thanks for the fix, the symlink patch changes the behaviour so that it doesn't cancel for lack of diskspace anymore. I haven't actually started the upgrade yet, but I see no reason why it wouldn't.

Of course, requiring so much diskspace in /var is rediculous, as well as the by default not-cleaning after apt-get install is run. But that's another bugreport ;-)

Revision history for this message
Heiko (schueler-heiko) wrote :

Dear All,

I had a similiar problem to during updating from 6.10 to 7.04.
The installation seems to crash after the following exception in the KDE Adept Manager:
<<
2007-04-20 20:03:44,648 ERROR Exception in KDE frontend (invoking crash handler):
2007-04-20 20:03:44,759 ERROR Traceback (most recent call last):
  File "/tmp/kde-root/adept_updater4oTfjc.tmp-extract/dist-upgrade.py", line 56, in ?
    app.run()
[....]
OSError: [Errno 12] Cannot allocate memory
>>
I have attached the two documents in /var/log/dist-upgrade as requested.

However, after a restart the new version seems to be installed.
How can I find out if the installation has been completed correctly and my system works
stabil as before?

Revision history for this message
Heiko (schueler-heiko) wrote :
Revision history for this message
Heiko (schueler-heiko) wrote :

Many thanks, of course

Regards
Heiko

Revision history for this message
Adolf Belka (adolfbelka-deactivatedaccount) wrote :

I am having similarish problems with not enough disk space but in my case it is the boot partition that has the problem. The main.log says that the Upgrade manager requires 41M free space on boot but my whole boot size is only 45M. This more than enough for all normal operations and I can have two or three boot images available without any problems. I have three partitions, /boot at 45M, swap at 500M and / at 92G with 85G still free. There was never any advice in any of the installs that /boot should be a minimum size to allow upgrade manager to function. Is there any way to use the large free space on / or is my only option to do a complete re-install from a downloaded CD iso? I paste in here the relevant sections of my main.log file:-

2007-04-21 20:57:34,553 DEBUG Free space on /: 90663870464
2007-04-21 20:57:34,554 DEBUG Dir /usr mounted on /
2007-04-21 20:57:34,555 DEBUG Dir /var mounted on /
2007-04-21 20:57:34,555 DEBUG Free space on /boot: 31030272
2007-04-21 20:57:34,556 DEBUG Dir /var/cache/apt/archives/ mounted on /
2007-04-21 20:57:34,556 DEBUG Dir /home mounted on /
2007-04-21 20:57:34,556 DEBUG fs_free contains: '{'/var': <DistUpgradeControler.FreeSpace object at 0xb4c506ac>, '/
home': <DistUpgradeControler.FreeSpace object at 0xb4c506ac>, '/boot': <DistUpgradeControler.FreeSpace object at 0x
b4c506ec>, '/usr': <DistUpgradeControler.FreeSpace object at 0xb4c506ac>, '/': <DistUpgradeControler.FreeSpace obje
ct at 0xb4c506ac>, '/var/cache/apt/archives/': <DistUpgradeControler.FreeSpace object at 0xb4c506ac>}'
2007-04-21 20:57:34,819 DEBUG dir '/var/cache/apt/archives/' needs '614975078.0' of '<DistUpgradeControler.FreeSpac
e object at 0xb4c506ac>' (90663870464.000000)
2007-04-21 20:57:34,820 DEBUG dir '/usr' needs '349130752.0' of '<DistUpgradeControler.FreeSpace object at 0xb4c506
ac>' (90048895386.000000)
2007-04-21 20:57:34,820 DEBUG dir '/usr' needs '52428800' of '<DistUpgradeControler.FreeSpace object at 0xb4c506ac>
' (89699764634.000000)
2007-04-21 20:57:34,820 DEBUG dir '/boot' needs '41943040' of '<DistUpgradeControler.FreeSpace object at 0xb4c506ec
>' (31030272.000000)
2007-04-21 20:57:34,820 ERROR not enough free space on /boot (missing 10.9M)

Revision history for this message
Michael Vogt (mvo) wrote :
Changed in update-manager:
status: Fix Committed → Fix Released
Revision history for this message
Noel J. Bergman (noeljb) wrote :

This is marked as Fix Released, but see Bug 442456.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.