Bug 1412391

Summary: AttributeError: 'DefaultInstall' object has no attribute 'efi_dir'
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: anacondaAssignee: Vendula Poncova <vponcova>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: a.hussien, anaconda-maint-list, atigro, donatom.martino, g.kaviyarasu, iamesumsy, jonathan, mkolman, rcvanvo, thomasesr, upgradeservices, vanmeeuwen+fedora, vponcova
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-27.20.2-1 anaconda-27.20.2-1.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-05 21:03:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
program.log from the livemedia-creator run
none
main log from the livemedia-creator run
none
anaconda.log from the livemedia-creator run
none
dnf.librepo.log from the livemedia-creator run
none
hawkey.log from the livemedia-creator run
none
packaging.log from the livemedia-creator run
none
storage.log from the livemedia-creator run
none
fedora-rawhide-x86_64-lorax.cfg for mock
none
fedora-25-x86_64-lorax.cfg for mock (works fine)
none
flat-fedora-live-python-classroom.ks for livemedia-creator none

Description Miro Hrončok 2017-01-11 22:54:14 UTC
Created attachment 1239637 [details]
program.log from the livemedia-creator run

Description of problem:
I'm trying to build live iso images from rawhide mock and I get the following traceback:

23:41:57,387 CRIT anaconda: Traceback (most recent call last):

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

  File "/usr/lib64/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)

  File "/usr/lib64/python3.6/site-packages/pyanaconda/install.py", line 193, in doConfiguration
    configuration_queue.start()

  File "/usr/lib64/python3.6/site-packages/pyanaconda/install_tasks.py", line 321, in start
    item.start()

  File "/usr/lib64/python3.6/site-packages/pyanaconda/install_tasks.py", line 321, in start
    item.start()

  File "/usr/lib64/python3.6/site-packages/pyanaconda/install_tasks.py", line 489, in start
    self.run_task()

  File "/usr/lib64/python3.6/site-packages/pyanaconda/install_tasks.py", line 455, in run_task
    self._task(*self._task_args, **self._task_kwargs)

  File "/usr/lib64/python3.6/site-packages/pyanaconda/packaging/__init__.py", line 628, in recreateInitrds
    for kernel in self.kernelVersionList:

  File "/usr/lib64/python3.6/site-packages/pyanaconda/packaging/__init__.py", line 839, in kernelVersionList
    files.extend((f.split("/")[-1][8:] for f in unicode_fnames

  File "/usr/lib64/python3.6/site-packages/pyanaconda/packaging/__init__.py", line 841, in <genexpr>
    fnmatch(f, "/boot/efi/EFI/%s/vmlinuz-*" % self.instclass.efi_dir)))

AttributeError: 'DefaultInstall' object has no attribute 'efi_dir'

Version-Release number of selected component (if applicable):
26.18-1.fc26

How reproducible:
Happens repeatedly on my machine.

Steps to Reproduce:

1. make sure you have the following option in /etc/mock/site-defaults.cfg:

config_opts['internal_dev_setup'] = False

2. put attached fedora-rawhide-x86_64-lorax.cfg to /etc/mock/ - make sure to change /home/churchyard/rpmbuild/lorax-results inside for your user running the mock in step XXX
3. mkdir -p ~/rpmbuild/lorax-results
4. mock -r fedora-rawhide-x86_64-lorax --init
5. mock -r fedora-rawhide-x86_64-lorax --copyin flat-fedora-live-python-classroom.ks /root/  # flat-fedora-live-python-classroom.ks attached
6. mock -r fedora-rawhide-x86_64-lorax --chroot -- livemedia-creator --make-iso --no-virt --ks /root/flat-fedora-live-python-classroom.ks --resultdir=/results/try-2 --logfile=/results/logs/try-2/try-2.log --release 26

Actual results:
...
2017-01-11 23:42:07,398: Running in cmdline mode, no interactive debugging allowed.
2017-01-11 23:42:07,399: The exact error message is:
2017-01-11 23:42:07,399: 
2017-01-11 23:42:07,399: 'DefaultInstall' object has no attribute 'efi_dir'.
2017-01-11 23:42:07,399: 
2017-01-11 23:42:07,399: The installer will now terminate.
2017-01-11 23:42:07,771: Running anaconda failed: process '['anaconda', '--kickstart', '/root/flat-fedora-live-python-classroom.ks', '--cmdline', '--dirinstall', '--remotelog', '127.0.0.1:36933']' exited with status 1
2017-01-11 23:42:07,771: Shutting down log processing
2017-01-11 23:42:09,006: Install failed: novirt_install failed
2017-01-11 23:42:09,007: Removing bad disk image
2017-01-11 23:42:09,136: ERROR: Image creation failed: novirt_install failed
Finish: chroot ['livemedia-creator', '--make-iso', '--no-virt', '--ks', '/root/flat-fedora-live-python-classroom.ks', '--resultdir=/results/try-2', '--logfile=/results/logs/try-2/try-2.log', '--release', '26']
ERROR: Command failed. See logs for output.
 # livemedia-creator --make-iso --no-virt --ks /root/flat-fedora-live-python-classroom.ks --resultdir=/results/try-2 --logfile=/results/logs/try-2/try-2.log --release 26


Expected results:
create some iso files in ~/rpmbuild/lorax-results/try-2

Additional info:
All logs will be attached. Works well on Fedora 25 mock with the same config (attached as well so tou can try).

Comment 1 Miro Hrončok 2017-01-11 22:55:19 UTC
Created attachment 1239638 [details]
main log from the livemedia-creator run

Comment 2 Miro Hrončok 2017-01-11 22:55:47 UTC
Created attachment 1239639 [details]
anaconda.log  from the livemedia-creator run

Comment 3 Miro Hrončok 2017-01-11 22:56:14 UTC
Created attachment 1239640 [details]
dnf.librepo.log from the livemedia-creator run

Comment 4 Miro Hrončok 2017-01-11 22:56:38 UTC
Created attachment 1239641 [details]
hawkey.log from the livemedia-creator run

Comment 5 Miro Hrončok 2017-01-11 22:57:18 UTC
Created attachment 1239642 [details]
packaging.log from the livemedia-creator run

Comment 6 Miro Hrončok 2017-01-11 22:58:26 UTC
Created attachment 1239643 [details]
storage.log from the livemedia-creator run

Comment 7 Miro Hrončok 2017-01-11 22:59:37 UTC
Created attachment 1239644 [details]
fedora-rawhide-x86_64-lorax.cfg for mock

Comment 8 Miro Hrončok 2017-01-11 23:00:03 UTC
Created attachment 1239645 [details]
fedora-25-x86_64-lorax.cfg for mock (works fine)

Comment 9 Miro Hrončok 2017-01-11 23:01:50 UTC
The XXX in the description was a placeholder I forgot to replace with 3-6. Sorry about that.

All the attachments are uploaded.

Comment 10 Miro Hrončok 2017-01-11 23:03:11 UTC
Created attachment 1239658 [details]
flat-fedora-live-python-classroom.ks for livemedia-creator

Comment 11 Fedora End Of Life 2017-02-28 10:56:00 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 12 iamesumsy 2017-07-13 10:48:46 UTC
Ran into the same issue. Running livemedia-creator with --project filled in seems to work around it.

ie:

mock -r fedora-rawhide-x86_64-lorax --chroot -- livemedia-creator --make-iso --no-virt --ks /root/flat-fedora-live-python-classroom.ks --resultdir=/results/try-2 --logfile=/results/logs/try-2/try-2.log --releasever 26 --project Fedora

***

see also:

https://github.com/rhinstaller/anaconda/blob/f26-release/pyanaconda/product.py#L43
https://github.com/rhinstaller/anaconda/blob/f26-release/pyanaconda/installclasses/fedora.py#L28

Comment 13 ISO 2017-08-22 11:14:44 UTC
I had the same problem with the option "--project WebSchool". It only works when I use "--project Fedora".
I didn't have the time to go through the script, but the problem seems to be that, since the script uses the value provided to the "--project| option in bootloader config files, it tries to store (or locate) the bootloader in a directory named using this value under "/boot/efi/EFI/".
For some reason, the script does not create this directory, but creates a directory named fedora (or creates it only when the project is called fedora), hence, for any other name, this directory is not found. If you use "--project fedora", it tries to locate the directory "/boot/efi/EFI/fedora", which in this case exists.

Comment 14 Vendula Poncova 2017-09-01 14:58:27 UTC
Fixed in a pull request: https://github.com/rhinstaller/anaconda/pull/1172

Anyway, you can also use --project "Fedora WebSchool", or provide your own install class.

Comment 15 Vendula Poncova 2017-09-01 14:59:24 UTC
*** Bug 1481462 has been marked as a duplicate of this bug. ***

Comment 16 donatom 2017-09-11 15:47:15 UTC
Is this fix only for fedora-testing. On my up-to-date fedora 26 anaconda 26.21.12 is installed. How would I download the 27.20.2-1 version?

Comment 17 Fedora Update System 2017-09-29 16:06:57 UTC
anaconda-27.20.2-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595

Comment 18 donatom 2017-10-01 03:36:59 UTC
Why isn't the fix going to be applied to Fedora 26? Waiting for Fedora 27 to come out means months of dealing with a defective anaconda install.

Comment 19 Fedora Update System 2017-10-02 00:55:54 UTC
anaconda-27.20.2-1.fc27, pykickstart-2.39-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595

Comment 20 Fedora Update System 2017-10-02 10:50:51 UTC
anaconda-27.20.2-1.fc27 pykickstart-2.39-1.fc27 python-simpleline-0.6-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595

Comment 21 Martin Kolman 2017-10-02 11:12:00 UTC
(In reply to donatom from comment #18)
> Why isn't the fix going to be applied to Fedora 26? Waiting for Fedora 27 to
> come out means months of dealing with a defective anaconda install.

There are no installation image updates post GA, so we generally don't update the stable release Anaconda packages as well. Also I'm not sure an Anaconda backport would be enough for this - IIRC some of the EFI fixes depend on Grub packaging fixes that might not be there on F26. 

So it's not assured things will work if we just cherry pick this one patch to F26. And we really can't backport everything due to all the changes we did to reflect F26 changes.

Maybe using F27 Anaconda in Mock for directory/image install could be used as a workaround ?

Comment 22 Fedora Update System 2017-10-02 21:26:12 UTC
anaconda-27.20.2-1.fc27, pykickstart-2.39-1.fc27, python-simpleline-0.6-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6dd3da2595

Comment 23 Fedora Update System 2017-10-05 21:03:47 UTC
anaconda-27.20.2-1.fc27, pykickstart-2.39-1.fc27, python-simpleline-0.6-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Vendula Poncova 2017-10-06 06:58:37 UTC
*** Bug 1499038 has been marked as a duplicate of this bug. ***