Bug 875422 - Anaconda fails with Could not run transaction if not enough disk space
Anaconda fails with Could not run transaction if not enough disk space
Status: CLOSED DUPLICATE of bug 873106
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
: 875421 (view as bug list)
Depends On:
Blocks: F18-accepted/F18FinalFreezeExcept
  Show dependency treegraph
 
Reported: 2012-11-11 00:34 EST by Shawn Starr
Modified: 2012-11-11 23:21 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-11 23:21:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot showing "Could not run transaction." message (34.53 KB, image/png)
2012-11-11 09:32 EST, Steve Tyler
no flags Details
[18.28 log anaconda-tb-Yhv0R3] PayloadInstallError: Could not run transaction. (349.50 KB, text/plain)
2012-11-11 09:40 EST, Steve Tyler
no flags Details

  None (edit)
Description Shawn Starr 2012-11-11 00:34:10 EST
Description of problem:

Anaconda aborts install with poor error

"The following error occurred while installing. This is a fatal error and installation will be aborted.

Could not run transaction
"

Version-Release number of selected component (if applicable):
Any Fedora 18 build of Anaconda

How reproducible: 100%

Steps to Reproduce:
1. Set VM image disk size to 5GiB
2. Select GNOME Desktop for install
3. Dialog box pops up that it cannot continue 'transaction error'
  
Actual results:
package.log shows:

various errors (not enough space)

ERR packaging: installing package ibus-typing-booster-0.0.20-1.fc18.noarch needs 77MB on the / filesystem


Expected results:
Should gracefully fail with a error a user can understand


Additional info:

Legacy Anaconda would gracefully tell user not enough space.
Comment 1 Shawn Starr 2012-11-11 00:37:43 EST
*** Bug 875421 has been marked as a duplicate of this bug. ***
Comment 2 Shawn Starr 2012-11-11 01:12:46 EST
This is a regression
Comment 3 Steve Tyler 2012-11-11 09:32:30 EST
Created attachment 642860 [details]
screenshot showing "Could not run transaction." message

Reproduced with:
anaconda 18.28
Fedora-18-Beta-TC8-x86_64-DVD.iso

Reproducer:

1. Create a 5120M disc image:
qemu-img create f18-test-4.img 5120M

2. Start installer from DVD:
$ qemu-kvm -m 1024 -hda f18-test-4.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC8/Fedora-18-Beta-TC8-x86_64-DVD.iso -usb -vga qxl -boot menu=on -usbdevice mouse

3. Auto-create partitions and filesystems.

4. Begin Installation.
Comment 4 Steve Tyler 2012-11-11 09:40:57 EST
Created attachment 642884 [details]
[18.28 log anaconda-tb-Yhv0R3] PayloadInstallError: Could not run transaction.

anaconda 18.28 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/yumpayload.py", line 1323, in install
    raise exn
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 124, in doInstall
    payload.install()
  File "/usr/lib64/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 91, in run
    threading.Thread.run(self, *args, **kwargs)
PayloadInstallError: Could not run transaction.
Comment 5 Steve Tyler 2012-11-11 09:58:38 EST
See also:
Bug 875329 - [rsync] "No space left on device" not reported to user

Bug 875329 is for the Live CD case, in which rsync fails with:
"... rsync: ... No space left on device (28)"

This bug is for the DVD case. Unfortunately, the error messages are not nearly as informative, and they repeat for every package install attempt after there is no disk space left. ISTM that the first package install failure would be reason enough to abort the install:

[snippet from /tmp/packaging.log in the attached anaconda-tb-Yhv0R3]
...
09:07:17,992 INFO packaging: running transaction
09:07:21,461 ERR packaging: error running transaction: Could not run transaction.
09:07:21,462 ERR packaging: installing package evolution-help-3.6.1-1.fc18.noarch needs 17MB on the / filesystem
...
09:07:21,564 ERR packaging: installing package xorg-x11-drv-nouveau-1:1.0.3-1.fc18.x86_64 needs 721MB on the / filesystem
09:08:39,084 INFO packaging: ==== start rpm scriptlet logs ====
09:08:39,085 INFO packaging: warning: filesystem-3.1-2.fc18.x86_64: Header V3 RSA/SHA256 Signature, key ID de7f38bd: NOKEY

09:08:39,085 INFO packaging: ==== end rpm scriptlet logs ====
Comment 6 Steve Tyler 2012-11-11 10:16:37 EST
(In reply to comment #5)
...
> 09:07:17,992 INFO packaging: running transaction
> 09:07:21,461 ERR packaging: error running transaction: Could not run
> transaction.
> 09:07:21,462 ERR packaging: installing package
> evolution-help-3.6.1-1.fc18.noarch needs 17MB on the / filesystem
> ...

There are 269 of these "needs" messages:
$ grep ERR anaconda-tb-Yhv0R3 | grep needs | wc -l
269

And nowhere is disk space mentioned. This search returns no matches:
$ egrep -i 'no space|disk space' anaconda-tb-Yhv0R3

There is, however, this record:
    _intf.payload._space_required: 2.81 GB
Comment 7 Steve Tyler 2012-11-11 11:00:52 EST
"df -h" shows 2.4G available on /dev/mapper/fedora-root. So the problem may not be that there is "No space left on device", but that yum is computing the amount of disk space needed for the transaction and not returning a concise error message:

"yum: Not enough disk space to run transaction: XX GB available, YY GB required."

$ cat df-h-1.txt 
Filesystem               Size  Used Avail Use% Mounted on
rootfs                  1008M  699M  309M  70% /
devtmpfs                 483M     0  483M   0% /dev
tmpfs                    498M     0  498M   0% /dev/shm
tmpfs                    498M  2.5M  496M   1% /run
tmpfs                    498M     0  498M   0% /sys/fs/cgroup
rpc_pipefs              1008M  699M  309M  70% /var/lib/nfs/rpc_pipefs
/dev/sr0                 4.4G  4.4G     0 100% /run/install/repo
/dev/mapper/live-rw     1008M  699M  309M  70% /
tmpfs                    498M   64M  435M  13% /tmp
/dev/mapper/fedora-root  2.5G   69M  2.4G   3% /mnt/sysimage
/dev/sda1                485M   11M  449M   3% /mnt/sysimage/boot
devtmpfs                 483M     0  483M   0% /mnt/sysimage/dev
/dev/tmpfs               498M     0  498M   0% /mnt/sysimage/dev/shm
/dev/tmpfs               498M     0  498M   0% /dev/shm
Comment 8 Steve Tyler 2012-11-11 11:18:30 EST
(In reply to comment #7)
> ... yum is computing
> the amount of disk space needed for the transaction and not returning a
> concise error message:
> 
> "yum: Not enough disk space to run transaction: XX GB available, YY GB
> required."
...

It looks like the installer is dumping everything it gets back from yum. The YumRPMTransError exception may need to be refined to provide a better summary of what went wrong.

$ less -N anaconda-18.28-1/pyanaconda/packaging/yumpayload.py
...
   1310             try:
   1311                 self._yum.runTransaction(cb=rpmcb)
...
   1317             except YumRPMTransError as e:
   1318                 log.error("error running transaction: %s" % e)
   1319                 for error in e.errors:
   1320                     log.error(error[0])
   1321                 exn = PayloadInstallError(str(e))
   1322                 if errorHandler.cb(exn) == ERROR_RAISE:
   1323                     raise exn
...
Comment 9 Steve Tyler 2012-11-11 12:05:18 EST
Shawn: Thanks for reporting this bug. Before anaconda 18.28, the installer on the Live CD didn't even report an exception when there was "No space left on device". Instead, the installer kept going until it drove off a cliff: :-)

Bug 868755 - error: rpmdb open failed

Skip down to Bug 868755, Comment 19.
(The earlier comments concern unrelated triage error.)

With anaconda 18.28 on the F18-Beta-TC8 Live CD[1], you now get an exception dialog:

Bug 875329 - [rsync] "No space left on device" not reported to user
See the attached screenshot "rsync exited with code 12": Attachment 642180 [details].

[1] $ qemu-kvm -m 1024 -hda f18-test-4.img -cdrom ~/xfr/fedora/F18/F18-Beta/TC8/Fedora-18-Beta-TC8-x86_64-Live-Desktop.iso -usb -vga qxl -boot menu=on -usbdevice mouse
Comment 10 Steve Tyler 2012-11-11 12:43:42 EST
It's not yum:

$ less -N /usr/lib/python2.7/site-packages/yum/__init__.py
...
   1708         errors = self.ts.run(cb.callback, '')
   1709         # ts.run() exit codes are, hmm, "creative": None means all ok, empty 
   1710         # list means some errors happened in the transaction and non-empty 
   1711         # list that there were errors preventing the ts from starting...
...

$ rpm -qf /usr/lib/python2.7/site-packages/yum/__init__.py
yum-3.4.3-29.fc17.noarch
Comment 11 Steve Tyler 2012-11-11 13:16:53 EST
Yum has a lot of big pieces. This bit generates exactly what is needed:

$ less -N /usr/share/yum-cli/cli.py
...
    424     def errorSummary(self, errstring):
    425         """Parse the error string for 'interesting' errors which can
    426         be grouped, such as disk space issues.
...
    441         if disk:
    442             summary += _('Disk Requirements:\n')
    443             for k in disk:
    444                 summary += P_('  At least %dMB more space needed on the %s filesystem.\n', '  At least %dMB more space needed on the %s filesystem.\n', disk[k]) % (disk[k], k)
...

$ rpm -qf /usr/share/yum-cli/cli.py
yum-3.4.3-29.fc17.noarch
Comment 12 Chris Lumens 2012-11-11 23:21:53 EST

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

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