Bug 1034235

Summary: [abrt] livecd-tools-19.6-1.fc19: live.py:762:__get_efi_image_stanza:AttributeError: 'x86LiveImageCreator' object has no attribute '_isDracut'
Product: [Fedora] Fedora Reporter: Marcel Wysocki <maci>
Component: livecd-toolsAssignee: Brian Lane <bcl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: adam.stokes, bcl, bruno, dhuff, Jasper.Hartline, Jonathon.Reinhart, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/de6126853103a29716ccfcfe86f873d8232fc962
Whiteboard: abrt_hash:61c5a32baf0212cced2cb56d9edce7264f48b120
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-25 18:13:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Marcel Wysocki 2013-11-25 13:20:49 UTC
Description of problem:
livecd-creator --verbose --config=livecd-fedora-minimal.ks --cache=/var/cache/live

ks file:

text
skipx
keyboard us
timezone Europe/Berlin --utc
lang en_US
auth  --useshadow  --passalgo=sha512
rootpw --iscrypted sdsdfdsfdsfdsfdsfsdfdsfsdnothingtoseeherepeoplewalkon

selinux --permissive
firewall --disabled
part / --fstype="ext4" --size=1000

repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
repo --name=zfs --baseurl=http://archive.zfsonlinux.org/fedora/$releasever/$basearch


%packages
@core
glusterfs
glusterfs-server
zfs
salt
grub2-efi
efibootmgr
shim

%end
%post
systemctl enable salt-minion.service

%end

Version-Release number of selected component:
livecd-tools-19.6-1.fc19

Additional info:
reporter:       libreport-2.1.9
cmdline:        /usr/bin/python -tt /bin/livecd-creator --verbose --config=livecd-fedora-minimal.ks --cache=/var/cache/live
dso_list:       python-imgcreate-19.6-1.fc19.x86_64
executable:     /bin/livecd-creator
kernel:         3.11.8-200.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
live.py:762:__get_efi_image_stanza:AttributeError: 'x86LiveImageCreator' object has no attribute '_isDracut'

Traceback (most recent call last):
  File "/bin/livecd-creator", line 237, in <module>
    sys.exit(main())
  File "/bin/livecd-creator", line 219, in main
    creator.configure()
  File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 732, in configure
    self._create_bootconfig()
  File "/usr/lib/python2.7/site-packages/imgcreate/live.py", line 253, in _create_bootconfig
    self._configure_bootloader(self.__ensure_isodir())
  File "/usr/lib/python2.7/site-packages/imgcreate/live.py", line 821, in _configure_bootloader
    self._configure_efi_bootloader(isodir)
  File "/usr/lib/python2.7/site-packages/imgcreate/live.py", line 807, in _configure_efi_bootloader
    cfg += self.__get_efi_image_stanzas(isodir, self.name)
  File "/usr/lib/python2.7/site-packages/imgcreate/live.py", line 787, in __get_efi_image_stanzas
    extra = "", index = index)
  File "/usr/lib/python2.7/site-packages/imgcreate/live.py", line 762, in __get_efi_image_stanza
    if self._isDracut:
AttributeError: 'x86LiveImageCreator' object has no attribute '_isDracut'

Local variables in innermost frame:
self: <imgcreate.live.x86LiveImageCreator object at 0x1ae0390>
args: {'liveargs': 'ro rd.live.image quiet  rhgb', 'index': 0, 'long': 'livecd-fedora-minimal-201311221648', 'fslabel': 'fedora-minim-x86_64-201311221648', 'extra': ''}

Comment 1 Marcel Wysocki 2013-11-25 13:21:05 UTC
Created attachment 828669 [details]
File: backtrace

Comment 2 Marcel Wysocki 2013-11-25 13:21:10 UTC
Created attachment 828670 [details]
File: environ

Comment 3 Brian Lane 2013-11-25 18:13:14 UTC
metalink is not mirrorlist, livecd-creator doesn't support metalink.

Comment 4 Jonathon Reinhart 2016-04-07 13:52:56 UTC
Brian,

This still seems to be a bug in livecd-tools 1:23.2-3.fc23.  My .ks file:


lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --enforcing
part / --size 1024

repo --name=fedora --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch


%packages
@core
-NetworkManager
-authconfig
-dnf-plugins-core
-dracut-config-rescue
# Leave firewalld - imgcreate expects it to be there

# Needed for EFI support
# https://lists.fedoraproject.org/pipermail/livecd/2012-September/007244.html
grub2-efi
efibootmgr
shim

# Leave out the standard group for now
#@standard

%end

%post

# Remove root password lock - allow login with no password
passwd -d root > /dev/null

%end

Comment 5 Jonathon Reinhart 2016-04-07 16:03:16 UTC
Sorry for the noise. This happens when there are no kernels installed. The "for kernel, version" loop in __get_image_stanzas() has nothing to process, so self._isDracut is never set.

This is arguably still a bug, but can be caused by trying to enable EFI support with no kernels installed (which is of course a mistake).