deployment fails when networks are disabled

Bug #1842001 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Harald Jensås

Bug Description

Downstream references:
 https://bugzilla.redhat.com/show_bug.cgi?id=1746273
 https://bugzilla.redhat.com/show_bug.cgi?id=1746252

Error during stack creation: ERROR: Property error: : resources.allNodesConfig.properties: : Property cloud_name_storage not assigned

As a workaround, if I comment on the following section, my deployment goes forward.

/usr/share/openstack-tripleo-heat-templates/puppet/all-nodes-config.j2.yaml
{%- for network in networks if network.vip|default(false) %}
  cloud_name_{{network.name_lower}}:
    type: string
{%- endfor %}

----
When deploying environment with all networks disabled, the deployment validation fails with following error.

Error validating environment for plan overcloud: ERROR: Property error: resources.ControllerIpListMap.properties: Unknown Property StorageIpList

This issue / failure is seen because {{role.name}}IpListMap unnecessarily defines '{{network.name}}IpList' for even disabled networks in
/usr/share/openstack-tripleo-heat-templates/overcloud.j2.yaml .

  {{role.name}}IpListMap:
    type: OS::TripleO::Network::Ports::NetIpListMap
    properties:
      ControlPlaneIpList: {get_attr: [{{role.name}}, ip_address]}
  {%- for network in networks %}
    {%- if network.enabled|default(true) and network.name in role.networks|default([]) %}
      {{network.name}}IpList: {get_attr: [{{role.name}}, {{network.name_lower}}_ip_address]}
    {%- else %}
      {{network.name}}IpList: {get_attr: [{{role.name}}, ip_address]}
    {%- endif %}
  {%- endfor %}
      EnabledServices: {get_attr: [{{role.name}}ServiceNames, value]}
      ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
      ServiceHostnameList: {get_attr: [{{role.name}}, hostname]}
      NetworkHostnameMap: {get_attr: [{{role.name}}NetworkHostnameMap, value]}

For disabling these '{{network.name}}IpList' properties in {{role.name}}IpListMap , i tried the following known options . ( a and (b or c))

  a. the networks are disabled in network_data.yaml file.
  b. Or set 'networks: []' in roles file.
  c. Or comment 'networks' section in roles file.

As a workaround, if I comment the section that defines '{{network.name}}IpList' properties for other networks (than ControlPkaneIpList) , the deployment goes ahead.

Revision history for this message
Harald Jensås (harald-jensas) wrote :

https://review.opendev.org/666447 most likely fixed the first issue in all-nodes-config.j2.yaml.

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/679354

Changed in tripleo:
assignee: nobody → Harald Jensås (harald-jensas)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-heat-templates (stable/stein)

Related fix proposed to branch: stable/stein
Review: https://review.opendev.org/679356

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

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

commit 231372441cd6070910d48ad46bd9ba07e3d35ddc
Author: Harald Jensås <email address hidden>
Date: Fri Aug 30 00:11:26 2019 +0200

    No cloud_name_$NET_NAME for disabled networks

    The cloud_name_{{network.name_lower}} parameter should
    not be added for networks that are disabled in network
    data.

    When disabling networks adding the parameter causes
    an not assigned error.

    NOTE: This is a stein only change. In master this problem
          was fixed in: https://review.opendev.org/666447

    Related-Bug: #1842001
    Change-Id: I9660b37f814673a27d2c3928a72be082e11f6adc

tags: added: in-stable-stein
Changed in tripleo:
milestone: train-3 → ussuri-1
Changed in tripleo:
milestone: ussuri-1 → ussuri-2
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-2 → ussuri-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/710574

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/710574
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=997cb781bd057e0243e7795a3a301ca2eac69485
Submitter: Zuul
Branch: master

commit 997cb781bd057e0243e7795a3a301ca2eac69485
Author: Harald Jensås <email address hidden>
Date: Sat Feb 29 18:43:57 2020 +0100

    Only add host entries for role_networks

    When network isolastion was added there was no have
    composable networks and no jinja2 generated heat
    templates. Because of this the "standard" networks
    was always included, but the port template was
    overridden to use the ctlplane's ip address for
    disabled networks.

    The result is that we have kept host entries for
    networks that are irrelevant for some roles. This
    was fixed in https://review.opendev.org/614457 but
    re-intruduced in tripleo-ansibe.

    This fixes the tripleo_hosts_entries role to only
    write host entries for networks relavant to the
    tripleo role.

    Related-Bug: #1842001
    Related-Bug: #1800811
    Change-Id: I2c8f0eb33be26ebe6d4077b25de47c2b2ab1fca0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (stable/train)

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/711795

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

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

commit f222681a435b19ef28d30a8293fb615863b094d6
Author: Harald Jensås <email address hidden>
Date: Thu Aug 29 23:57:10 2019 +0200

    Don't add IpList for disabled networks

    When disabling networks in network data an IpList
    entry was added in {{role.name}}IpListMap. This
    caused a validation error.

    Add a yaql expression to filter on role networks in
    network/ports/net_ip_list_map.j2.yaml. RoleNetIpMap
    should'nt have entries for networks not used by the
    role that maps to the ctlplane IP.

    Depends-On: https://review.opendev.org/710574
    Closes-Bug: #1842001
    Change-Id: I0cda298b0ed27705a8b6e0f62633af2253d8d0de

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-ansible (stable/train)

Reviewed: https://review.opendev.org/711795
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=0c9a9afbf24555082204fd9619885634deea4f19
Submitter: Zuul
Branch: stable/train

commit 0c9a9afbf24555082204fd9619885634deea4f19
Author: Harald Jensås <email address hidden>
Date: Sat Feb 29 18:43:57 2020 +0100

    Only add host entries for role_networks

    When network isolastion was added there was no have
    composable networks and no jinja2 generated heat
    templates. Because of this the "standard" networks
    was always included, but the port template was
    overridden to use the ctlplane's ip address for
    disabled networks.

    The result is that we have kept host entries for
    networks that are irrelevant for some roles. This
    was fixed in https://review.opendev.org/614457 but
    re-intruduced in tripleo-ansibe.

    This fixes the tripleo_hosts_entries role to only
    write host entries for networks relavant to the
    tripleo role.

    Related-Bug: #1842001
    Related-Bug: #1800811
    Change-Id: I2c8f0eb33be26ebe6d4077b25de47c2b2ab1fca0
    (cherry picked from commit 997cb781bd057e0243e7795a3a301ca2eac69485)

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/712822

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

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

commit 7c01813e248b9b92b370b2c67e5dbaecb61a6f82
Author: Harald Jensås <email address hidden>
Date: Thu Aug 29 23:57:10 2019 +0200

    Don't add IpList for disabled networks

    When disabling networks in network data an IpList
    entry was added in {{role.name}}IpListMap. This
    caused a validation error.

    Add a yaql expression to filter on role networks in
    network/ports/net_ip_list_map.j2.yaml. RoleNetIpMap
    should'nt have entries for networks not used by the
    role that maps to the ctlplane IP.

    Depends-On: https://review.opendev.org/710574
    Closes-Bug: #1842001
    Change-Id: I0cda298b0ed27705a8b6e0f62633af2253d8d0de
    (cherry picked from commit f222681a435b19ef28d30a8293fb615863b094d6)

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

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

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

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

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.