Bug 1264570 - pungi does not run lorax correctly when creating fedora-kickstarts spin
Summary: pungi does not run lorax correctly when creating fedora-kickstarts spin
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: pungi
Version: 24
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-18 20:32 UTC by Mark Montague
Modified: 2016-10-10 07:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-10 07:37:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full output of the pungi command (648.38 KB, text/plain)
2015-09-18 20:32 UTC, Mark Montague
no flags Details
Proposed patch to fix the bug (795 bytes, patch)
2015-09-18 20:34 UTC, Mark Montague
no flags Details | Diff

Description Mark Montague 2015-09-18 20:32:57 UTC
Created attachment 1075044 [details]
Full output of the pungi command

Description of problem:

pungi fails to replace variables in the "repo" lines of kickstart files when it runs lorax.


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

pungi-4.0.2-1.fc23.noarch
fedora-kickstarts-0.23.4-1.fc23.noarch
lorax-23.18-1.fc23.x86_64


How reproducible:

Always.


Steps to Reproduce:
1. Run the following commands as root:

setenforce 0
time pungi --nomacboot --flavor="Kickstart" --name="Fedora" --ver="23" \
  --config=/usr/share/spin-kickstarts/fedora-install-server.ks

("--nomacboot" is not required to reproduce the bug, I only have it because I have removed the Mac filesystem modules from my kernel).


Actual results:

See attachment pungi-lorax-mirrorlist-error.log for the full results.  The last few lines of the results are:

Pungi:INFO: lorax --workdir /data/install/pungi/work/Kickstart/x86_64 --logfile /data/install/pungi/logs/lorax-x86_64.log --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch --source file:///data/install/pungi/23/Kickstart/x86_64/os --product Fedora --version 23 --release Fedora 23 --variant Kickstart --bugurl https://bugzilla.redhat.com --volid Fedora-Kickstart-23-x86_64 --nomacboot --force /data/install/pungi/23/Kickstart/x86_64/os
Pungi:INFO: Running lorax --workdir /data/install/pungi/work/Kickstart/x86_64 --logfile /data/install/pungi/logs/lorax-x86_64.log --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch --mirrorlist http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-source-$releasever&arch=$basearch --source file:///data/install/pungi/23/Kickstart/x86_64/os --product Fedora --version 23 --release "Fedora 23" --variant Kickstart --bugurl https://bugzilla.redhat.com --volid Fedora-Kickstart-23-x86_64 --nomacboot --force /data/install/pungi/23/Kickstart/x86_64/os
Pungi:ERROR: Got an error from lorax
Pungi:ERROR: 2015-09-18 19:29:53,639: Added 'lorax-repo-0': file:///data/install/pungi/23/Kickstart/x86_64/os
2015-09-18 19:29:53,639: Fetching metadata...
2015-09-18 19:29:53,676: Added 'lorax-mirrorlist-0': http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
2015-09-18 19:29:53,676: Fetching metadata...
2015-09-18 19:29:54,153: Error fetching metadata for lorax-mirrorlist-0: Failed to synchronize cache for repo 'lorax-mirrorlist-0' from 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch': Cannot prepare internal mirrorlist: No URLs in mirrorlist
error: unable to create the dnf base object

Traceback (most recent call last):
  File "/usr/bin/pungi", line 324, in <module>
    main()
  File "/usr/bin/pungi", line 177, in main
    mypungi.doBuildinstall()
  File "/usr/lib/python2.7/site-packages/pungi/gather.py", line 1444, in doBuildinstall
    pungi.util._doRunCommand(cmd, self.logger)
  File "/usr/lib/python2.7/site-packages/pungi/util.py", line 47, in _doRunCommand
    raise OSError, "Got an error (%d) from %s: %s" % (p1.returncode, command[0], err)
OSError: Got an error (1) from lorax: 2015-09-18 19:29:53,639: Added 'lorax-repo-0': file:///data/install/pungi/23/Kickstart/x86_64/os
2015-09-18 19:29:53,639: Fetching metadata...
2015-09-18 19:29:53,676: Added 'lorax-mirrorlist-0': http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
2015-09-18 19:29:53,676: Fetching metadata...
2015-09-18 19:29:54,153: Error fetching metadata for lorax-mirrorlist-0: Failed to synchronize cache for repo 'lorax-mirrorlist-0' from 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch': Cannot prepare internal mirrorlist: No URLs in mirrorlist
error: unable to create the dnf base object


real    9m3.415s
user    1m25.990s
sys     0m17.030s
[root@f23ksb pungi]# 


Expected results:

pungi runs lorax successfully.


Additional info:

Comment 1 Mark Montague 2015-09-18 20:34:36 UTC
Created attachment 1075045 [details]
Proposed patch to fix the bug

Attaching proposed patch to fix the bug.

Comment 2 Robin Lee 2015-12-03 05:49:56 UTC
I met the same problem, and Mark's patch fixes it.

Comment 3 Lyude 2016-10-06 18:21:27 UTC
This is still present as of f24

Comment 4 Lubomír Sedlář 2016-10-07 06:01:11 UTC
I have posted the patch to Pagure as a pull request (with full attribution to Mark):
https://pagure.io/pungi/pull-request/422

Comment 5 Lubomír Sedlář 2016-10-10 07:37:48 UTC
The patch is merged and included in 4.1.10.

https://bodhi.fedoraproject.org/updates/FEDORA-2016-f00a05d7b9
https://bodhi.fedoraproject.org/updates/FEDORA-2016-6cb65ea55b


Note You need to log in before you can comment on or make changes to this bug.