[openstack-dev] [tripleo][heat][jinja] resources.RedisVirtualIP: Property error: resources.VipPort.properties.network: Error validating value 'internal_api': Unable to find network with name or id 'internal_api'

Mark Hamzy hamzy at us.ibm.com
Thu Jun 14 12:48:37 UTC 2018


I am trying to delete the Storage, StorageMgmt, Tenant, and Management 
networks and trying to deploy using TripleO.

The following patch 
https://hamzy.fedorapeople.org/0001-RedisVipPort-error-internal_api.patch 
applied on top of /usr/share/openstack-tripleo-heat-templates from 
openstack-tripleo-heat-templates-8.0.2-14.el7ost.noarch

yields the following error:

(undercloud) [stack at oscloud5 ~]$ openstack overcloud deploy --templates -e 
~/templates/node-info.yaml -e ~/templates/overcloud_images.yaml -e 
~/templates/environments/network-environment.yaml -e 
~/templates/environments/network-isolation.yaml -e 
~/templates/environments/config-debug.yaml --ntp-server pool.ntp.org 
--control-scale 1 --compute-scale 1 --control-flavor control 
--compute-flavor compute 2>&1 | tee output.overcloud.deploy
...
overcloud.RedisVirtualIP:
  resource_type: OS::TripleO::Network::Ports::RedisVipPort
  physical_resource_id:
  status: CREATE_FAILED
  status_reason: |
    resources.RedisVirtualIP: Property error: 
resources.VipPort.properties.network: Error validating value 
'internal_api': Unable to find network with name or id 'internal_api'
...

The following patch seems to fix it:

8<-----8<-----8<-----8<-----8<-----
diff --git a/environments/network-isolation.j2.yaml 
b/environments/network-isolation.j2.yaml
index 3d4f59b..07cb748 100644
--- a/environments/network-isolation.j2.yaml
+++ b/environments/network-isolation.j2.yaml
@@ -20,7 +20,13 @@ resource_registry:
   {%- for network in networks if network.vip and 
network.enabled|default(true) %}
   OS::TripleO::Network::Ports::{{network.name}}VipPort: 
../network/ports/{{network.name_lower|default(network.name.lower())}}.yaml
   {%- endfor %}
+{%- for role in roles -%}
+  {%- if internal_api in role.networks|default([]) and 
internal_api.enabled|default(true) %}
   OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/vip.yaml
+  {%- else %}
+  # Avoid weird jinja2 bugs that don't output a newline...
+  {%- endif %}
+{%- endfor -%}
 
   # Port assignments by role, edit role definition to assign networks to 
roles.
 {%- for role in roles %}
8<-----8<-----8<-----8<-----8<-----

Note that I had to do an else clause because jinja2 would not output the 
newline that was outside of the for block.

Am I following the correct path to fix this issue?

-- 
Mark

You must be the change you wish to see in the world. -- Mahatma Gandhi
Never let the future disturb you. You will meet it, if you have to, with 
the same weapons of reason which today arm you against the present. -- 
Marcus Aurelius

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20180614/de80da91/attachment-0001.html>


More information about the OpenStack-dev mailing list