Red Hat Bugzilla – Bug 1474297
Unable to install using kickstart with http repo due to incorrect location for dnf.package.cache dir
Last modified: 2017-07-24 06:50:23 EDT
Created attachment 1303573 [details]
Tail of journalctl -ab output
Description of problem:
To install our Fedora workstations I use a kickstart script that specifies HTTP repositories. When using HTTP repositories, before starting the actual installation of the rpms Anaconda downloads all the rpms to install to a (local) directory named dnf.package.cache. The location of this dnf.package.cache directory is determined by the method _pick_mpoint() in pyanaconda/payload/dnfpayload.py. It incorrectly selects / as most suitable download location.
In our case the download size of the rpms is about 2.7 GB. Dracut has mounted the live install image on / in read/write mode using a filesystem overlay. The image has a size of 8 GB of which about 4.5 GB is used and 3.5 GB is reported as free. However this system only has 4 GB of RAM, which is insufficient to download all the rpm files to the overlay. As a result after downloading around 550 MB the filesystem on / is corrupted and the installation hangs or ends with a fatal error message.
Conclusion: For a filesystem with an overlay the system can report more available free space than what is actually available, so Anaconda cannot rely on the df output for such a filesystem.
Version-Release number of selected component (if applicable):
download.fedoraproject.org mirror of July 24, 2017.
Success or failure depends on the amount of system RAM, the download size and the free space in the install image. In my case the installation fails with 2, 3 or 4 GB RAM, but succeeds with 8 GB RAM.
Steps to Reproduce:
1. Create a virtual host with 4 GB of RAM.
2. Create a kickstart file to use HTTP repositories and enable sufficient package groups to have a download size of about 2.7 GB.
3. Boot the host via PXE to install the system.
- When installing in graphical mode, the installer hangs after downloading +/- 16% of the packages. The screen is no longer updated, mouse can still be moved.
- When installing in text mode, the installation is aborted with the following message:
The following error occurred while installing. This is a fatal error and
installation will be aborted.
Failed to download 'kernel-modules-4.11.11-300.fc26.x86_64.rpm': 3 - Curl error (23): Failed writing received data to disk/application for http://download.fedoraproject.org/pub/fedora/linux/updates/26/x86_64/k/kernel-modules-4.11.11-300.fc26.x86_64.rpm [Failed writing body (273 != 16384)]
The installation completes successfully without errors.
See attached journal.txt for the relevant part of the log file.