Bug 1746424

Summary: [s390x] Building live-iso with composer fails with OSError: no files matched generic.prm
Product: Red Hat Enterprise Linux 8 Reporter: Alexander Todorov <atodorov>
Component: lorax-templates-rhelAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: high Docs Contact:
Priority: high    
Version: 8.1CC: bcl, jrusz, jstodola, jwboyer, tbowling, wchadwic
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lorax-templates-rhel-8.2-4.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-28 15:38:13 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:
Bug Depends On:    
Bug Blocks: 1673744    

Description Alexander Todorov 2019-08-28 12:38:56 UTC
Description of problem:

Building live-iso fails on s390x.


Version-Release number of selected component (if applicable):
lorax-templates-generic-28.14.30-1.el8.s390x
lorax-28.14.30-1.el8.s390x
lorax-templates-rhel-8.1-2.el8.noarch
lorax-composer-28.14.30-1.el8.s390x


Log:

2019-08-28 08:25:46,041 INFO pylorax: Installation complete
2019-08-28 08:25:46,041 INFO pylorax: 
2019-08-28 08:25:46,041 INFO pylorax: Use of this product is subject to the license agreement found at:
2019-08-28 08:25:46,041 INFO pylorax: /usr/share/redhat-release/EULA
2019-08-28 08:25:46,041 INFO pylorax: 
2019-08-28 08:26:11,676 INFO pylorax: Disk Image install successful
2019-08-28 08:26:11,678 INFO pylorax: working dir is /var/tmp/lmc-work-8ptqe8l_
2019-08-28 08:30:53,142 DEBUG pylorax.imgutils: make tmp mountdir /var/tmp/lorax.imgutils.txhzyijc
2019-08-28 08:30:53,418 DEBUG pylorax.treebuilder: kernels=[{'path': 'boot/vmlinuz-4.18.0-135.el8.s390x', 'version': '4.18.0-135.el8.s390x', 'arch': 's390x', 'flavor': None, 'initrd': {'path': 'boot/initramfs-4.18.0-135.el8.s390x.img'}}]
2019-08-28 08:30:53,432 DEBUG pylorax.imgutils: copytree /usr/share/lorax/templates.d/80-rhel/live/config_files/ /var/tmp/lorax.imgutils.txhzyijc/tmp/config_files
2019-08-28 08:30:53,505 WARNING pylorax: Truncating isolabel to 32 chars: Red Hat Enterprise Linux-8.1-s39
2019-08-28 08:30:53,506 INFO pylorax: Rebuilding initrds
2019-08-28 08:30:53,506 INFO pylorax: dracut args = ['--xz', '--add', 'livenet dmsquash-live convertfs pollcdrom qemu qemu-net', '--omit', 'plymouth', '--no-hostonly', '--debug', '--no-early-microcode']
2019-08-28 08:30:53,506 DEBUG pylorax.treebuilder: kernels=[{'path': 'boot/vmlinuz-4.18.0-135.el8.s390x', 'version': '4.18.0-135.el8.s390x', 'arch': 's390x', 'flavor': None, 'initrd': {'path': 'boot/initramfs-4.18.0-135.el8.s390x.img'}}]
2019-08-28 08:30:53,507 DEBUG pylorax.treebuilder: kernels=[{'path': 'boot/vmlinuz-4.18.0-135.el8.s390x', 'version': '4.18.0-135.el8.s390x', 'arch': 's390x', 'flavor': None, 'initrd': {'path': 'boot/initramfs-4.18.0-135.el8.s390x.img'}}]
2019-08-28 08:30:53,507 INFO pylorax.treebuilder: rebuilding boot/initramfs-4.18.0-135.el8.s390x.img
2019-08-28 08:31:39,087 INFO pylorax: Building boot.iso
2019-08-28 08:31:39,088 DEBUG pylorax.treebuilder: kernels=[{'path': 'boot/vmlinuz-4.18.0-135.el8.s390x', 'version': '4.18.0-135.el8.s390x', 'arch': 's390x', 'flavor': None, 'initrd': {'path': 'boot/initramfs-4.18.0-135.el8.s390x.img'}}]
2019-08-28 08:31:39,088 DEBUG pylorax.ltmpl: executing s390.tmpl with variables={'kernels': [{'path': 'boot/vmlinuz-4.18.0-135.el8.s390x', 'version': '4.18.0-135.el8.s390x', 'arch': 's390x', 'flavor': None, 'initrd': {'path': 'boot/initramfs-4.18.0-135.el8.s390x.img'}}], 'arch': {'buildarch': 's390x', 'basearch': 's390x', 'libdir': 'lib64', 'bcj': None}, 'product': {'name': 'Red Hat Enterprise Linux', 'version': '8.1', 'release': '', 'variant': '', 'bugurl': '', 'isfinal': False}, 'runtime_img': 'images/install.img', 'runtime_base': 'install.img', 'inroot': '/var/tmp/lorax.imgutils.txhzyijc', 'outroot': '/var/tmp/lmc-work-8ptqe8l_', 'basearch': 's390x', 'libdir': 'lib64', 'isolabel': 'Red Hat Enterprise Linux-8.1-s39', 'udev': <function udev_escape at 0x3ff7df69730>, 'domacboot': False, 'doupgrade': True, 'workdir': None, 'lower': <function string_lower at 0x3ff7df697b8>, 'extra_boot_args': 'custom_cmdline_arg', 'exists': <function LoraxTemplateRunner.__init__.<locals>.<lambda> at 0x3ff7b0ff488>, 'glob': <function LoraxTemplateRunner.__init__.<locals>.<lambda> at 0x3ff7b0ff268>}
2019-08-28 08:31:39,505 INFO pylorax.ltmpl: running s390.tmpl
2019-08-28 08:31:39,505 DEBUG pylorax.ltmpl: template line 1: mkdir images
2019-08-28 08:31:39,506 DEBUG pylorax.ltmpl: template line 2: install images/install.img images
2019-08-28 08:31:39,550 ERROR pylorax.ltmpl: '/var/tmp/lorax.imgutils.txhzyijc/images/install.img' and '/var/tmp/lmc-work-8ptqe8l_/images/install.img' are the same file
2019-08-28 08:31:39,551 DEBUG pylorax.ltmpl: template line 3: treeinfo stage2 mainimage images/install.img
2019-08-28 08:31:39,551 DEBUG pylorax.ltmpl: template line 4: install tmp/config_files/s390/redhat.exec images
2019-08-28 08:31:39,551 DEBUG pylorax.ltmpl: template line 5: install tmp/config_files/s390/generic.prm images
2019-08-28 08:31:39,551 DEBUG pylorax.ltmpl: template line 6: install tmp/config_files/s390/generic.ins .
2019-08-28 08:31:39,552 DEBUG pylorax.ltmpl: template line 7: replace @INITRD_LOAD_ADDRESS@ 0x02000000 generic.ins
2019-08-28 08:31:39,552 DEBUG pylorax.ltmpl: template line 8: replace @EXTRA@ custom_cmdline_arg generic.prm
2019-08-28 08:31:39,553 ERROR pylorax.ltmpl: template command error in s390.tmpl:
2019-08-28 08:31:39,553 ERROR pylorax.ltmpl:   replace @EXTRA@ custom_cmdline_arg generic.prm
2019-08-28 08:31:40,854 ERROR pylorax.ltmpl:   OSError: no files matched generic.prm
2019-08-28 08:31:40,855 DEBUG pylorax.ltmpl:   Traceback (most recent call last):
2019-08-28 08:31:40,855 DEBUG pylorax.ltmpl:     File "/usr/lib/python3.6/site-packages/pylorax/ltmpl.py", line 368, in replace
2019-08-28 08:31:40,855 DEBUG pylorax.ltmpl:       raise IOError("no files matched %s" % " ".join(fileglobs))
2019-08-28 08:31:40,855 DEBUG pylorax.ltmpl:   OSError: no files matched generic.prm
2019-08-28 08:31:40,991 DEBUG pylorax.imgutils: remove tmp mountdir /var/tmp/lorax.imgutils.txhzyijc
2019-08-28 08:31:41,055 DEBUG pylorax: Install finished, chowning results to root:weldr
2019-08-28 08:31:41,071 ERROR pylorax: traceback: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pylorax/api/queue.py", line 143, in monitor
    make_compose(cfg, os.path.realpath(dst))
  File "/usr/lib/python3.6/site-packages/pylorax/api/queue.py", line 248, in make_compose
    run_creator(install_cfg, cancel_func=cancel_build)
  File "/usr/lib/python3.6/site-packages/pylorax/creator.py", line 726, in run_creator
    result_dir = make_livecd(opts, mount_dir, work_dir)
  File "/usr/lib/python3.6/site-packages/pylorax/creator.py", line 370, in make_livecd
    tb.build()
  File "/usr/lib/python3.6/site-packages/pylorax/treebuilder.py", line 314, in build
    self._runner.run(templatefile, kernels=self.kernels)
  File "/usr/lib/python3.6/site-packages/pylorax/ltmpl.py", line 147, in run
    self._run(commands)
  File "/usr/lib/python3.6/site-packages/pylorax/ltmpl.py", line 166, in _run
    f(*args)
  File "/usr/lib/python3.6/site-packages/pylorax/ltmpl.py", line 368, in replace
    raise IOError("no files matched %s" % " ".join(fileglobs))
OSError: no files matched generic.prm

Comment 2 Brian Lane 2019-08-28 16:28:26 UTC
Bug #1712822 fixed this in lorax, but not in lorax-templates-rhel so we need to change it there as well.

I should also make sure any other important changes haven't been missed in lorax-templates-rhel

Comment 4 Alexander Todorov 2019-08-29 10:01:39 UTC
(In reply to Brian Lane from comment #2)
> Bug #1712822 fixed this in lorax, but not in lorax-templates-rhel so we need
> to change it there as well.
> 
> I should also make sure any other important changes haven't been missed in
> lorax-templates-rhel

Brian,
is the following error on aarch64 related to the templates not being updated or needs to be reported separately:

==> /var/log/lorax-composer/composer.log <==
2019-08-29 05:59:18,615 DEBUG pylorax.ltmpl: executing live-install.tmpl with variables={'basearch': 'aarch64'}
2019-08-29 05:59:18,649 INFO pylorax.ltmpl: running live-install.tmpl
2019-08-29 05:59:18,649 DEBUG pylorax.ltmpl: template line 1: installpkg efibootmgr
2019-08-29 05:59:18,651 DEBUG pylorax.ltmpl: template line 2: installpkg grub2-efi-aa64-cdboot shim-aa64
2019-08-29 05:59:18,652 DEBUG pylorax.ltmpl: template line 3: installpkg uboot-tools
2019-08-29 05:59:18,660 ERROR pylorax.ltmpl: installpkg uboot-tools failed: no package matched: uboot-tools
2019-08-29 05:59:18,661 ERROR pylorax.ltmpl: template command error in live-install.tmpl:
2019-08-29 05:59:18,661 ERROR pylorax.ltmpl:   installpkg uboot-tools
2019-08-29 05:59:18,662 ERROR pylorax.ltmpl:   Exception: Required installpkg failed.
2019-08-29 05:59:18,662 DEBUG pylorax.ltmpl:   Traceback (most recent call last):
2019-08-29 05:59:18,663 DEBUG pylorax.ltmpl:     File "/usr/lib/python3.6/site-packages/pylorax/ltmpl.py", line 885, in installpkg
2019-08-29 05:59:18,663 DEBUG pylorax.ltmpl:       raise Exception("Required installpkg failed.")
2019-08-29 05:59:18,663 DEBUG pylorax.ltmpl:   Exception: Required installpkg failed.

Comment 9 Brian Lane 2019-09-03 16:49:04 UTC
(In reply to Alexander Todorov from comment #4)
> (In reply to Brian Lane from comment #2)
> > Bug #1712822 fixed this in lorax, but not in lorax-templates-rhel so we need
> > to change it there as well.
> > 
> > I should also make sure any other important changes haven't been missed in
> > lorax-templates-rhel
> 
> Brian,
> is the following error on aarch64 related to the templates not being updated
> or needs to be reported separately:

Should be a separate bug, we need to drop uboot-tools from the aarch64 section in lorax and in lorax-templates-rhel.

Comment 17 Brian Lane 2019-10-25 18:49:14 UTC
https://github.com/weldr/lorax/pull/889

Comment 25 errata-xmlrpc 2020-04-28 15:38:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1608