Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1342041 - Lorax failed at a 'modinfo' command error when run under pungi
Summary: Lorax failed at a 'modinfo' command error when run under pungi
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: lorax
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Brian Lane
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-02 10:22 UTC by Robin Lee
Modified: 2016-06-03 17:45 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-03 17:45:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robin Lee 2016-06-02 10:22:15 UTC
Description of problem:
Run 'pungi --nosource --nodebuginfo -c kvm.ks' and then failed with:

2016-06-02 18:15:27,145: backing up installroot
backing up installroot
2016-06-02 18:15:27,455: generating kernel module metadata
generating kernel module metadata
2016-06-02 18:15:27,456: doing depmod and module-info for 3.10.0-327.18.2.el7.x86_64
doing depmod and module-info for 3.10.0-327.18.2.el7.x86_64
Traceback (most recent call last):
  File "/usr/sbin/lorax", line 353, in <module>
    main(sys.argv)
  File "/usr/sbin/lorax", line 209, in main
    remove_temp=True, verify=opts.verify)
  File "/usr/lib/python3.5/site-packages/pylorax/__init__.py", line 301, in run
    rb.generate_module_data()
  File "/usr/lib/python3.5/site-packages/pylorax/treebuilder.py", line 212, in generate_module_data
    generate_module_info(moddir+kver, outfile=moddir+"module-info")
  File "/usr/lib/python3.5/site-packages/pylorax/treebuilder.py", line 62, in generate_module_info
    desc = module_desc(joinpaths(root,mod)) or "%s driver" % name
  File "/usr/lib/python3.5/site-packages/pylorax/treebuilder.py", line 50, in module_desc
    output = runcmd_output(["modinfo", "-F", "description", mod])
  File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 345, in runcmd_output
    return execWithCapture(cmd[0], cmd[1:], **kwargs)
  File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 247, in execWithCapture
    reset_handlers=reset_handlers, reset_lang=reset_lang)[1]
  File "/usr/lib/python3.5/site-packages/pylorax/executils.py", line 199, in _run_program
    raise subprocess.CalledProcessError(proc.returncode, argv, output)
subprocess.CalledProcessError: Command '['modinfo', '-F', 'description', '/builddir/work/x86_64/installtree/lib/modules/3.10.0-327.18.2.el7.x86_64/weak-updates/ahci/ahci.ko']' returned non-zero exit status 1

kvm.ks is a trivial config:
repo --name=base --baseurl=http://XXXX/centos/7/os/$basearch/
repo --name=updates --baseurl=http://XXXX/centos/7/updates/$basearch/
%packages
kernel
perl
@core
@base
@^virtualization-host-environment
%end

The CentOS repo is just local mirror of the official one.

Version-Release number of selected component (if applicable):
pungi-4.0.14-3.fc24.noarch
lorax-24.18-1.fc24.x86_64

Comment 1 Brian Lane 2016-06-02 17:30:15 UTC
Looks like modinfo is provided by kmod, and since this is running on the host, not the installtree, lorax.spec needs to add a Requires on it.

Comment 2 Brian Lane 2016-06-02 17:33:27 UTC
https://github.com/rhinstaller/lorax/pull/128

Comment 3 Robin Lee 2016-06-03 01:28:29 UTC
kmod is installed. If this is running on the host, the path /builddir/work/x86_64/installtree/lib/modules/3.10.0-327.18.2.el7.x86_64/weak-updates/ahci/ahci.ko becomes a broken symlink:

# file  /builddir/work/x86_64/installtree/lib/modules/3.10.0-327.18.2.el7.x86_64/weak-updates/ahci/ahci.ko
/builddir/work/x86_64/installtree/lib/modules/3.10.0-327.18.2.el7.x86_64/weak-updates/ahci/ahci.ko: broken symbolic link to /lib/modules/3.10.0-327.4.4.el7.x86_64/extra/ahci/ahci.ko

So modinfo running on this will fail.

Comment 4 Brian Lane 2016-06-03 17:45:15 UTC
I think there's a couple problems here. First is that the Fedora 24 version of lorax and pungi aren't designed to be used with RHEL7. So even if you get this working you're likely to run into a series of issues. AFAIK there is no pungi for RHEL7, but there is lorax for creating boot.isos.

Second, that symlink, AFAIK, isn't part of the normal distribution. You are correct that an incorrect symlink there will break things, but I don't think it's supposed to be there at all.


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