Stein network-isolation template processing broken

Bug #1831885 reported by Adam Ratcliff
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Undecided
Kevin Carter

Bug Description

jinja2 rendering normal template fails at template.render (process_templates.py line 100)

while following this procedure for Stein
http://tripleo.org/install/advanced_deployment/network_isolation.html#generate-templates-from-jinja2

A bunch of templates don't render.
Exception: Error rendering template /home/stack/generated-templates/<file>.yaml : 'None' has no attribute 'append'

It stops at the first file that fails to render, so I tried moving offending j2.yaml files to a temp folder but there are many which fail.
j2 template.render trips up on something about those particular files.
here are a few:

network-isolation.j2.yaml
network-isolation-no-tunneling.j2.yaml
network-isolation-v6.j2.yaml

Expected result:
My deployments with Rocky (fail elsewhere but) don't have problems rendering the templates.

Actual result:
...
rendering j2 template to file: /home/stack/generated-templates/network/config/single-nic-vlans/controller.yaml
Error rendering template /home/stack/generated-templates/network/config/single-nic-vlans/controller.yaml : 'None' has no attribute 'append'
Traceback (most recent call last):
  File "/usr/share/openstack-tripleo-heat-templates/tools/process-templates.py", line 362, in <module>
    network_data_path, 0, 0)
  File "/usr/share/openstack-tripleo-heat-templates/tools/process-templates.py", line 216, in process_templates
    dry_run)
  File "/usr/share/openstack-tripleo-heat-templates/tools/process-templates.py", line 100, in _j2_render_to_file
    raise Exception(error_msg)
Exception: Error rendering template /home/stack/generated-templates/network/config/single-nic-vlans/controller.yaml : 'None' has no attribute 'append'

Environment:
This step (http://tripleo.org/install/advanced_deployment/network_isolation.html#generate-templates-from-jinja2) seems to work for Rocky but not Stein
KVM virtual machine, Centos7 SELinux enforcing

I don't guess you need my yum list installed for this, but see attached if you want it.

Revision history for this message
Adam Ratcliff (adamjr) wrote :
Saravanan KR (skramaja)
Changed in tripleo:
status: New → In Progress
status: In Progress → New
Revision history for this message
Adam Ratcliff (adamjr) wrote :

Workaround is to sudo yum -y update after undercloud install.
I did update after yum install python2-tripleo-repos, then undercloud install, then tried to render templates which failed with the same issue above, ran yum update, then rendering templates worked.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.opendev.org/672611

Changed in tripleo:
assignee: nobody → Kevin Carter (kevin-carter)
status: New → In Progress
Revision history for this message
Kevin Carter (kevin-carter) wrote :

The review https://review.opendev.org/#/c/672611 will resolve this issue, and is currently pending in master. Once merged, we'll need to backport it the various branches accordingly.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/672611
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=8833c2da2dcd7c78282d0d5494bb6280f03dd115
Submitter: Zuul
Branch: master

commit 8833c2da2dcd7c78282d0d5494bb6280f03dd115
Author: Kevin Carter <email address hidden>
Date: Wed Jul 24 19:07:33 2019 -0500

    Correct jinja loop logic for role_networks

    The `_role_networks` variable in network loops was being defined and then
    potentially redefined in a larger loop. If this option is first populated
    with a None type and then later discovers a hash the deployment will fail
    with a stack trace:

        'None' has no attribute 'append'

    A full traceback from the error can be seen here[0]. To reolsve this
    issue the empty array, `_role_networks` has been moved into the
    `role.networks` case statement which will ensure the option is type safe
    for every round.

    [0] - https://pasted.tech/pastes/edba7903977c841901c0e655850d4f8b08b32e6c.raw

    Closes-Bug: #1831885
    Change-Id: I480786ed4d6b0a5544535ce232ae8206d04299b1
    Signed-off-by: Kevin Carter <email address hidden>

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/673148

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.opendev.org/673149

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-heat-templates (stable/pike)

Change abandoned by Kevin Carter (cloudnull) (<email address hidden>) on branch: stable/pike
Review: https://review.opendev.org/673149
Reason: pike is no longer supported.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/stein)

Reviewed: https://review.opendev.org/673148
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=7bedd167e9dace1698fa11cb5ce2fb890b8dc6f3
Submitter: Zuul
Branch: stable/stein

commit 7bedd167e9dace1698fa11cb5ce2fb890b8dc6f3
Author: Kevin Carter <email address hidden>
Date: Wed Jul 24 19:07:33 2019 -0500

    Correct jinja loop logic for role_networks

    The `_role_networks` variable in network loops was being defined and then
    potentially redefined in a larger loop. If this option is first populated
    with a None type and then later discovers a hash the deployment will fail
    with a stack trace:

        'None' has no attribute 'append'

    A full traceback from the error can be seen here[0]. To reolsve this
    issue the empty array, `_role_networks` has been moved into the
    `role.networks` case statement which will ensure the option is type safe
    for every round.

    [0] - https://pasted.tech/pastes/edba7903977c841901c0e655850d4f8b08b32e6c.raw

    Closes-Bug: #1831885
    Change-Id: I480786ed4d6b0a5544535ce232ae8206d04299b1
    Signed-off-by: Kevin Carter <email address hidden>
    (cherry picked from commit 8833c2da2dcd7c78282d0d5494bb6280f03dd115)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.6.1

This issue was fixed in the openstack/tripleo-heat-templates 10.6.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 11.2.0

This issue was fixed in the openstack/tripleo-heat-templates 11.2.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers