Bug 1824357 - Kickstart with liveimg --url and noauto in fsoptions causes traceback
Summary: Kickstart with liveimg --url and noauto in fsoptions causes traceback
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 32
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Vendula Poncova
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2020-04-16 01:55 UTC by Arun S A G
Modified: 2021-03-29 00:15 UTC (History)
8 users (show)

Fixed In Version: anaconda-34.24.6-1 anaconda-34.24.6-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-03-29 00:15:21 UTC
Type: Bug

Attachments (Terms of Use)

Description Arun S A G 2020-04-16 01:55:42 UTC
Description of problem:

When 'noauto' is used as an fsoption and liveimgurl (livepayload) used in kickstart, it causes anaconda to Traceback and fail

Sample kickstart:

firewall --disabled
selinux --disabled
auth --enableshadow --passalgo=sha512

rootpw --lock
timezone --utc --ntpservers=ntp1.ops Etc/UTC
services --disabled=autofs,cups,gpm,isdn,kudzu,,pcmcia,xfs,nfslock,readahead,readahead_early,rhnsd,rpcgssd,rpcidmapd,xinetd --enabled=cpuspeed,diskdump,ntpd,snmpd
bootloader --location=mbr --append="hda=noprobe panic=5 numa=acpi"

liveimg --url=https://webserver/88b9302a-90a8-47b5-a2a9-3a521806740c/os_image.tar.gz

# System bootloader configuration
bootloader --location=mbr --driveorder="sda" --timeout=5
# Partition clearing information
clearpart --all --drives=sda
# Disk partitioning information
part biosboot --asprimary --fstype="biosboot" --ondisk=sda --size=1
part /boot --asprimary --fstype="ext4" --ondisk=sda --size=512 --label=boot
part pv.02 --asprimary --grow --ondisk=sda --size=466944
volgroup sys --pesize=4096 pv.02
logvol /home  --fstype="ext4" --size=10240 --name=home --vgname=sys
logvol /  --fstype="ext4" --size=10240 --name=root --vgname=sys
logvol swap  --fstype="swap" --size=24576 --name=swap --vgname=sys
logvol /tmp  --fstype="ext4" --size=4096 --name=tmp --vgname=sys
logvol /var  --fstype="ext4" --size=4096 --name=var --vgname=sys
logvol /storage  --fstype="ext4" --grow --size=1 --fsoptions="noauto" --name=storage --vgname=sys

In above kickstart, the /storage logical volume is not mounted because we pass --fsoptions="noauto"

This makes the installer fail with the following Traceback and Error message:
01:10:21,643 CRIT anaconda: Traceback (most recent call last):

  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 227, in run
    threading.Thread.run(self, *args, **kwargs)

  File "/usr/lib64/python2.7/threading.py", line 765, in run
    self.__target(*self.__args, **self.__kwargs)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/packaging/livepayload.py", line 109, in progress
    mnt_stat = iutil.eintr_retry_call(os.statvfs, iutil.getSysroot()+mnt)

  File "/usr/lib64/python2.7/site-packages/pyanaconda/iutil.py", line 1157, in eintr_retry_call
    return func(*args)

OSError: [Errno 2] No such file or directory: '/mnt/sysimage/storage'

The error seems to be from the "progress method" https://github.com/rhinstaller/anaconda/blob/master/pyanaconda/payload/livepayload.py#L122. The method tries to calculate the size using 'stat' regardless whether the mountpoint is mounted or not, here /storage isn't mounted. 

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

How reproducible:

Steps to Reproduce:
1. PXE boot anaconda use 'liveimg --url' for OS image and partition a disk add use --fsoptions="noauto" on it.

Actual results:

Expected results:

Anaconda continuous to work when 'liveimg' and '--fsoptions' are specified.

Additional info:

Comment 1 Renaud Métrich 2020-04-27 06:51:43 UTC
See also BZ #1826760 against RHEL.

Comment 2 Vendula Poncova 2021-03-19 13:05:49 UTC
Fixed in https://github.com/rhinstaller/anaconda/pull/3251.

Comment 3 Fedora Update System 2021-03-22 17:53:24 UTC
FEDORA-2021-a12fa51168 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-a12fa51168

Comment 4 Fedora Update System 2021-03-23 02:01:34 UTC
FEDORA-2021-a12fa51168 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-a12fa51168`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-a12fa51168

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-03-29 00:15:21 UTC
FEDORA-2021-a12fa51168 has been pushed to the Fedora 34 stable repository.
If problem still persists, 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.