Bug 1467506

Summary: livemedia-creator with "--make-pxe-live" can not unmount the device
Product: [Fedora] Fedora Reporter: Petr Ruzicka <petr.ruzicka>
Component: loraxAssignee: Brian Lane <bcl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: anaconda-maint-list, bcl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-14 12:16:00 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
Log files + kickstart file none

Description Petr Ruzicka 2017-07-04 05:35:44 UTC
Created attachment 1294089 [details]
Log files + kickstart file

Description of problem:

Hello.

I have a Fedora 25 using "lorax-25.19-1.fc25.x86_64" package to build live pxe boot squashfs image.

I'm using the following command

livemedia-creator --make-pxe-live --image-name=my_fedora_img --tmp=/var/tmp/a --ks fedora25-my.ks --iso=Fedora-Workstation-netinst-x86_64-25-1.3.iso

The "fedora25-my.ks" is pretty basic:

url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
lang en_US.UTF-8
keyboard us
timezone --utc Etc/UTC
network --bootproto=dhcp --device=link --activate
rootpw root
shutdown
zerombr
clearpart --all --initlabel --disklabel=msdos
part / --size 5120 --fstype ext4
bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8"

%packages
@core
dracut-live
%end

Qemu did the job and generates the image, but then I got the error:

2017-06-29 18:30:45,616: dracut args = ['--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode']
2017-06-29 18:30:45,630: rebuilding initramfs-4.8.6-300.fc25.x86_64.img
2017-06-29 18:30:46,088: failed to unmount /var/tmp/a/lorax.imgutils.ebqfx61_. retrying (1/3)...
2017-06-29 18:30:47,186: failed to unmount /var/tmp/a/lorax.imgutils.ebqfx61_. retrying (2/3)...
Traceback (most recent call last):
  File "/usr/sbin/livemedia-creator", line 1167, in make_live_images
    rebuild_initrds_for_live(opts, joinpaths(mnt_dir, sys_root), work_dir)
  File "/usr/sbin/livemedia-creator", line 507, in rebuild_initrds_for_live
    runcmd(cmd, root=sys_root_dir)
  File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 341, in runcmd
    return execWithRedirect(cmd[0], cmd[1:], **kwargs)
  File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 228, in execWithRedirect
    env_add=env_add, reset_handlers=reset_handlers, reset_lang=reset_lang)[0]
  File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 201, in _run_program
    raise subprocess.CalledProcessError(proc.returncode, argv, output)
subprocess.CalledProcessError: Command '['dracut', '--nomdadmconf', '--nolvmconf', '--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode', '/results/initramfs-4.8.6-300.fc25.x86_64.img', '4.8.6-300.fc25.x86_64']' returned non-zero exit status 1


Version-Release number of selected component (if applicable):
Fedora 25
"lorax-25.19-1.fc25.x86_64"

How reproducible:
<see the description>

Actual results:
2017-06-29 18:30:46,088: failed to unmount /var/tmp/a/lorax.imgutils.ebqfx61_. retrying (1/3)...
2017-06-29 18:30:47,186: failed to unmount /var/tmp/a/lorax.imgutils.ebqfx61_. retrying (2/3)...
...<fail>...

Expected results:


Additional info:
Logs attached

Comment 1 Petr Ruzicka 2017-07-14 12:16:00 UTC
It looks like package ```dracut-live``` is mandatory for successfully build.
Once I add ```dracut-live``` to the ```%packages``` section it started working...