Bug 1763922

Summary: [aarch64] Image creation with Composer
Product: Red Hat Enterprise Linux 8 Reporter: Brian Lane <bcl>
Component: lorax-templates-rhelAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.1CC: atodorov, jrusz, jwboyer, release-test-team-automation
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lorax-templates-rhel-8.2-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1752002 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: 1752002    
Bug Blocks: 1673744    

Description Brian Lane 2019-10-21 23:47:46 UTC
+++ This bug was initially created as a clone of Bug #1752002 +++

Copying relevant comments from rhbz#1673744 b/c that one is becoming too big:

------

https://polarion.engineering.redhat.com/polarion/#/project/RedHatEnterpriseLinux7/testrun?id=COMPOSER_RHEL_8_1_0_20190821_0_aarch64 - aarch64 also looks relatively good. I am having another problem there for live-iso:

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.

Let me know if this is a separate issue or related to the non updated templates.


-----

(In reply to Brian Lane from comment #28)
> 
> Darn. Looks like we are not shipping uboot-tools, although for aarch64 I
> doubt they are actually needed. Can you edit the live-install.tmpl to drop
> that line and see if it works?


I went past the original failure but got another one:

==> /var/log/lorax-composer/composer.log <==
2019-09-10 07:51:05,139 DEBUG pylorax.imgutils: remove tmp mountdir /var/tmp/lorax.imgutils.7yyv8_nn
2019-09-10 07:51:05,150 DEBUG pylorax: Install finished, chowning results to root:weldr
2019-09-10 07:51:05,159 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 146, in run
    commands = t.parse(templatefile, variables)
  File "/usr/lib/python3.6/site-packages/pylorax/ltmpl.py", line 56, in parse
    textbuf = template.render(**variables)
  File "/usr/lib/python3.6/site-packages/mako/template.py", line 462, in render
    return runtime._render(self, self.callable_, args, data)
  File "/usr/lib/python3.6/site-packages/mako/runtime.py", line 838, in _render
    **_kwargs_for_callable(callable_, data))
  File "/usr/lib/python3.6/site-packages/mako/runtime.py", line 873, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/lib/python3.6/site-packages/mako/runtime.py", line 899, in _exec_template
    callable_(context, *args, **kwargs)
  File "aarch64_tmpl", line 146, in render_body
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

-----

As for the aarch64 failure in comment 30 here I cannot tell -- template errors are difficult to debug. There may be more detail in the logs, or at least the output of what variables were passed to aarch64.tmpl -- it looks like there is a None where there shouldn't be one.

-----

(In reply to Alexander Todorov from comment #30)
> 
> I went past the original failure but got another one:
>     callable_(context, *args, **kwargs)
>   File "aarch64_tmpl", line 146, in render_body
> TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

I think I see it, workdir isn't used in live.

Remove this section from the share/templates.d/99-generic/live/aarch64.tmpl file:

# Inherit iso-graft/ if it exists from external templates
<%
    import os
    if os.path.exists(workdir + "/iso-graft"):
        filegraft += " " + workdir + "/iso-graft"
%>

That's not used in the live templates. Make sure you use the modified template when re-running :)

--- Additional comment from Alexander Todorov on 2019-09-13 05:53:53 PDT ---

(In reply to Alexander Todorov from comment #0)

Removed uboot-tools from templates both in generic/ and rhel/ dirs.


> Remove this section from the share/templates.d/99-generic/live/aarch64.tmpl
> file:
> 
> # Inherit iso-graft/ if it exists from external templates
> <%
>     import os
>     if os.path.exists(workdir + "/iso-graft"):
>         filegraft += " " + workdir + "/iso-graft"
> %>
> 
> That's not used in the live templates. Make sure you use the modified
> template when re-running :)

Removed from templates both in generic/ and rhel/ dirs.


Looks like I was able to build a live-iso.

Comment 4 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