Bug 1633340

Summary: /usr/share/openstack-tripleo-heat-templates/tools/process-templates.py -p <arg> doesn't work as expected.
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: openstack-tripleo-heat-templatesAssignee: Bob Fournier <bfournie>
Status: CLOSED ERRATA QA Contact: Alexander Chuzhoy <sasha>
Severity: medium Docs Contact:
Priority: medium    
Version: 14.0 (Rocky)CC: bfournie, mburns
Target Milestone: betaKeywords: Triaged
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-9.0.0-0.20180919080943.0rc1.0rc1.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-11 11:53:20 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: 1623007    

Description Alexander Chuzhoy 2018-09-26 18:01:18 UTC
/usr/share/openstack-tripleo-heat-templates/tools/process-templates.py -p <arg> doesn't work as expected.

Environment:
openstack-tripleo-heat-templates-9.0.0-0.20180831204457.17bb71e.0rc1.el7ost.noarch

Steps to reproduce:
Run:
sudo /usr/share/openstack-tripleo-heat-templates/tools/process-templates.py -p /usr/share/openstack-tripleo-heat-templates/ -r ~/templates/roles_data.yaml -n ~/templates/network_data.yaml -o /home/stack/dirname



Result:
/home/stack/dirname is created and empty



but if you change dir to /usr/share/openstack-tripleo-heat-templates and run:
sudo /usr/share/openstack-tripleo-heat-templates/tools/process-templates.py -p . -r ~/templates/roles_data.yaml -n ~/templates/network_data.yaml -o /home/stack/dirname

Then the home/stack/dirname is populated as expected.

Comment 4 Alexander Chuzhoy 2018-10-15 18:10:18 UTC
Verified:

Environment:
openstack-tripleo-heat-templates-9.0.0-0.20180919080946.0rc1.0rc1.el7ost.noarch


[stack@undercloud-0 ~]$ ls outputdir
ls: cannot access outputdir: No such file or directory


[stack@undercloud-0 ~]$ /usr/share/openstack-tripleo-heat-templates/tools/process-templates.py -p /usr/share/openstack-tripleo-heat-templates/ -r ~/templates/roles_data.yaml  -n ~/templates/network_data.yaml -o outputdir
jinja2 rendering normal template net-config-bond.j2.yaml
rendering j2 template to file: outputdir/net-config-bond.yaml
jinja2 rendering normal template net-config-bridge.j2.yaml
rendering j2 template to file: outputdir/net-config-bridge.yaml
jinja2 rendering normal template net-config-linux-bridge.j2.yaml
rendering j2 template to file: outputdir/net-config-linux-bridge.yaml
jinja2 rendering normal template net-config-noop.j2.yaml
rendering j2 template to file: outputdir/net-config-noop.yaml
jinja2 rendering normal template net-config-standalone.j2.yaml
rendering j2 template to file: outputdir/net-config-standalone.yaml
jinja2 rendering normal template net-config-static-bridge-with-external-dhcp.j2.yaml
rendering j2 template to file: outputdir/net-config-static-bridge-with-external-dhcp.yaml
jinja2 rendering normal template net-config-static-bridge.j2.yaml
rendering j2 template to file: outputdir/net-config-static-bridge.yaml
jinja2 rendering normal template net-config-static.j2.yaml
rendering j2 template to file: outputdir/net-config-static.yaml
jinja2 rendering normal template net-config-undercloud.j2.yaml
rendering j2 template to file: outputdir/net-config-undercloud.yaml
jinja2 rendering normal template overcloud-resource-registry-puppet.j2.yaml
rendering j2 template to file: outputdir/overcloud-resource-registry-puppet.yaml
jinja2 rendering normal template overcloud.j2.yaml
rendering j2 template to file: outputdir/overcloud.yaml
jinja2 rendering normal template post.j2.yaml
rendering j2 template to file: outputdir/common/post.yaml
jinja2 rendering normal template net-noop.j2.yaml
rendering j2 template to file: outputdir/environments/net-noop.yaml
jinja2 rendering normal template host-config-and-reboot.j2.yaml
rendering j2 template to file: outputdir/environments/host-config-and-reboot.yaml
jinja2 rendering normal template deployed-server-environment.j2.yaml
rendering j2 template to file: outputdir/environments/deployed-server-environment.yaml
jinja2 rendering normal template net-bond-with-vlans.j2.yaml
rendering j2 template to file: outputdir/environments/net-bond-with-vlans.yaml
jinja2 rendering normal template net-multiple-nics-v6.j2.yaml
rendering j2 template to file: outputdir/environments/net-multiple-nics-v6.yaml
jinja2 rendering normal template net-multiple-nics.j2.yaml
rendering j2 template to file: outputdir/environments/net-multiple-nics.yaml
jinja2 rendering normal template net-bond-with-vlans-no-external.j2.yaml
rendering j2 template to file: outputdir/environments/net-bond-with-vlans-no-external.yaml
jinja2 rendering normal template net-bond-with-vlans-v6.j2.yaml
rendering j2 template to file: outputdir/environments/net-bond-with-vlans-v6.yaml
jinja2 rendering normal template net-dpdkbond-with-vlans.j2.yaml
rendering j2 template to file: outputdir/environments/net-dpdkbond-with-vlans.yaml
jinja2 rendering normal template net-single-nic-linux-bridge-with-vlans.j2.yaml
rendering j2 template to file: outputdir/environments/net-single-nic-linux-bridge-with-vlans.yaml
jinja2 rendering normal template net-single-nic-with-vlans-no-external.j2.yaml
rendering j2 template to file: outputdir/environments/net-single-nic-with-vlans-no-external.yaml
jinja2 rendering normal template net-single-nic-with-vlans-v6.j2.yaml
rendering j2 template to file: outputdir/environments/net-single-nic-with-vlans-v6.yaml
jinja2 rendering normal template net-single-nic-with-vlans.j2.yaml
rendering j2 template to file: outputdir/environments/net-single-nic-with-vlans.yaml
jinja2 rendering normal template network-environment-v6.j2.yaml
rendering j2 template to file: outputdir/environments/network-environment-v6.yaml
jinja2 rendering normal template network-environment.j2.yaml
rendering j2 template to file: outputdir/environments/network-environment.yaml
jinja2 rendering normal template network-isolation-no-tunneling.j2.yaml
rendering j2 template to file: outputdir/environments/network-isolation-no-tunneling.yaml
jinja2 rendering normal template network-isolation-v6.j2.yaml
rendering j2 template to file: outputdir/environments/network-isolation-v6.yaml
jinja2 rendering normal template network-isolation.j2.yaml
rendering j2 template to file: outputdir/environments/network-isolation.yaml
jinja2 rendering normal template networks-disable.j2.yaml
rendering j2 template to file: outputdir/environments/networks-disable.yaml
jinja2 rendering normal template overcloud-baremetal.j2.yaml
rendering j2 template to file: outputdir/environments/overcloud-baremetal.yaml
jinja2 rendering normal template split-stack-consistent-hostname-format.j2.yaml
rendering j2 template to file: outputdir/environments/split-stack-consistent-hostname-format.yaml
jinja2 rendering normal template mac_hostname.j2.yaml
rendering j2 template to file: outputdir/extraconfig/all_nodes/mac_hostname.yaml
jinja2 rendering normal template random_string.j2.yaml
rendering j2 template to file: outputdir/extraconfig/all_nodes/random_string.yaml
jinja2 rendering normal template swap-partition.j2.yaml
rendering j2 template to file: outputdir/extraconfig/all_nodes/swap-partition.yaml
jinja2 rendering normal template swap.j2.yaml
rendering j2 template to file: outputdir/extraconfig/all_nodes/swap.yaml
jinja2 rendering normal template krb-service-principals.j2.yaml
rendering j2 template to file: outputdir/extraconfig/nova_metadata/krb-service-principals.yaml
jinja2 rendering normal template post_puppet_pacemaker.j2.yaml
rendering j2 template to file: outputdir/extraconfig/tasks/post_puppet_pacemaker.yaml
jinja2 rendering network template network.network.j2.yaml
jinja2 rendering networks InternalApi,Management,Storage,StorageMgmt,External,Tenant
rendering j2 template to file: outputdir/network/internal_api.yaml
rendering j2 template to file: outputdir/network/management.yaml
rendering j2 template to file: outputdir/network/storage.yaml
rendering j2 template to file: outputdir/network/storage_mgmt.yaml
rendering j2 template to file: outputdir/network/external.yaml
rendering j2 template to file: outputdir/network/tenant.yaml
jinja2 rendering network template network_v6.network.j2.yaml
jinja2 rendering networks InternalApi,Management,Storage,StorageMgmt,External,Tenant
rendering j2 template to file: outputdir/network/internal_api_v6.yaml
rendering j2 template to file: outputdir/network/management_v6.yaml
rendering j2 template to file: outputdir/network/storage_v6.yaml
rendering j2 template to file: outputdir/network/storage_mgmt_v6.yaml
rendering j2 template to file: outputdir/network/external_v6.yaml
rendering j2 template to file: outputdir/network/tenant_v6.yaml
jinja2 rendering normal template networks.j2.yaml
rendering j2 template to file: outputdir/network/networks.yaml
jinja2 rendering normal template service_net_map.j2.yaml
rendering j2 template to file: outputdir/network/service_net_map.yaml
jinja2 rendering normal template controller-no-external.j2.yaml
rendering j2 template to file: outputdir/network/config/bond-with-vlans/controller-no-external.yaml
jinja2 rendering normal template controller-v6.j2.yaml
rendering j2 template to file: outputdir/network/config/bond-with-vlans/controller-v6.yaml
jinja2 rendering role template role.role.j2.yaml
jinja2 rendering roles Controller,Compute,BlockStorage,ObjectStorage,CephStorage
rendering j2 template to file: outputdir/network/config/bond-with-vlans/controller.yaml
rendering j2 template to file: outputdir/network/config/bond-with-vlans/compute.yaml
rendering j2 template to file: outputdir/network/config/bond-with-vlans/cinder-storage.yaml
rendering j2 template to file: outputdir/network/config/bond-with-vlans/swift-storage.yaml
rendering j2 template to file: outputdir/network/config/bond-with-vlans/ceph-storage.yaml
jinja2 rendering normal template compute-dvr.j2.yaml
rendering j2 template to file: outputdir/network/config/multiple-nics/compute-dvr.yaml
jinja2 rendering normal template controller-v6.j2.yaml
rendering j2 template to file: outputdir/network/config/multiple-nics/controller-v6.yaml
jinja2 rendering role template role.role.j2.yaml
jinja2 rendering roles Controller,Compute,BlockStorage,ObjectStorage,CephStorage
rendering j2 template to file: outputdir/network/config/multiple-nics/controller.yaml
rendering j2 template to file: outputdir/network/config/multiple-nics/compute.yaml
rendering j2 template to file: outputdir/network/config/multiple-nics/cinder-storage.yaml
rendering j2 template to file: outputdir/network/config/multiple-nics/swift-storage.yaml
rendering j2 template to file: outputdir/network/config/multiple-nics/ceph-storage.yaml
jinja2 rendering normal template controller-v6.j2.yaml
rendering j2 template to file: outputdir/network/config/single-nic-linux-bridge-vlans/controller-v6.yaml
jinja2 rendering role template role.role.j2.yaml
jinja2 rendering roles Controller,Compute,BlockStorage,ObjectStorage,CephStorage
rendering j2 template to file: outputdir/network/config/single-nic-linux-bridge-vlans/controller.yaml
rendering j2 template to file: outputdir/network/config/single-nic-linux-bridge-vlans/compute.yaml
rendering j2 template to file: outputdir/network/config/single-nic-linux-bridge-vlans/cinder-storage.yaml
rendering j2 template to file: outputdir/network/config/single-nic-linux-bridge-vlans/swift-storage.yaml
rendering j2 template to file: outputdir/network/config/single-nic-linux-bridge-vlans/ceph-storage.yaml
jinja2 rendering normal template controller-no-external.j2.yaml
rendering j2 template to file: outputdir/network/config/single-nic-vlans/controller-no-external.yaml
jinja2 rendering normal template controller-v6.j2.yaml
rendering j2 template to file: outputdir/network/config/single-nic-vlans/controller-v6.yaml
jinja2 rendering role template role.role.j2.yaml
jinja2 rendering roles Controller,Compute,BlockStorage,ObjectStorage,CephStorage
rendering j2 template to file: outputdir/network/config/single-nic-vlans/controller.yaml
rendering j2 template to file: outputdir/network/config/single-nic-vlans/compute.yaml
rendering j2 template to file: outputdir/network/config/single-nic-vlans/cinder-storage.yaml
rendering j2 template to file: outputdir/network/config/single-nic-vlans/swift-storage.yaml
rendering j2 template to file: outputdir/network/config/single-nic-vlans/ceph-storage.yaml
jinja2 rendering normal template net_ip_list_map.j2.yaml
rendering j2 template to file: outputdir/network/ports/net_ip_list_map.yaml
jinja2 rendering normal template net_ip_map.j2.yaml
rendering j2 template to file: outputdir/network/ports/net_ip_map.yaml
jinja2 rendering normal template net_vip_map_external.j2.yaml
rendering j2 template to file: outputdir/network/ports/net_vip_map_external.yaml
jinja2 rendering normal template net_vip_map_external_v6.j2.yaml
rendering j2 template to file: outputdir/network/ports/net_vip_map_external_v6.yaml
jinja2 rendering network template port.network.j2.yaml
jinja2 rendering networks InternalApi,Management,Storage,StorageMgmt,External,Tenant
rendering j2 template to file: outputdir/network/ports/internal_api.yaml
rendering j2 template to file: outputdir/network/ports/management.yaml
rendering j2 template to file: outputdir/network/ports/storage.yaml
rendering j2 template to file: outputdir/network/ports/storage_mgmt.yaml
rendering j2 template to file: outputdir/network/ports/external.yaml
rendering j2 template to file: outputdir/network/ports/tenant.yaml
jinja2 rendering network template port_from_pool.network.j2.yaml
jinja2 rendering networks InternalApi,Management,Storage,StorageMgmt,External,Tenant
rendering j2 template to file: outputdir/network/ports/internal_api_from_pool.yaml
rendering j2 template to file: outputdir/network/ports/management_from_pool.yaml
rendering j2 template to file: outputdir/network/ports/storage_from_pool.yaml
rendering j2 template to file: outputdir/network/ports/storage_mgmt_from_pool.yaml
rendering j2 template to file: outputdir/network/ports/external_from_pool.yaml
rendering j2 template to file: outputdir/network/ports/tenant_from_pool.yaml
jinja2 rendering network template port_from_pool_v6.network.j2.yaml
jinja2 rendering networks InternalApi,Management,Storage,StorageMgmt,External,Tenant
rendering j2 template to file: outputdir/network/ports/internal_api_from_pool_v6.yaml
rendering j2 template to file: outputdir/network/ports/management_from_pool_v6.yaml
rendering j2 template to file: outputdir/network/ports/storage_from_pool_v6.yaml
rendering j2 template to file: outputdir/network/ports/storage_mgmt_from_pool_v6.yaml
rendering j2 template to file: outputdir/network/ports/external_from_pool_v6.yaml
rendering j2 template to file: outputdir/network/ports/tenant_from_pool_v6.yaml
jinja2 rendering network template port_v6.network.j2.yaml
jinja2 rendering networks InternalApi,Management,Storage,StorageMgmt,External,Tenant
rendering j2 template to file: outputdir/network/ports/internal_api_v6.yaml
rendering j2 template to file: outputdir/network/ports/management_v6.yaml
rendering j2 template to file: outputdir/network/ports/storage_v6.yaml
rendering j2 template to file: outputdir/network/ports/storage_mgmt_v6.yaml
rendering j2 template to file: outputdir/network/ports/external_v6.yaml
rendering j2 template to file: outputdir/network/ports/tenant_v6.yaml
jinja2 rendering normal template all-nodes-config.j2.yaml
rendering j2 template to file: outputdir/puppet/all-nodes-config.yaml
jinja2 rendering role template role.role.j2.yaml
jinja2 rendering roles Controller,Compute,BlockStorage,ObjectStorage,CephStorage
rendering j2 template to file: outputdir/puppet/controller-role.yaml
rendering j2 template to file: outputdir/puppet/compute-role.yaml
rendering j2 template to file: outputdir/puppet/blockstorage-role.yaml
rendering j2 template to file: outputdir/puppet/objectstorage-role.yaml
rendering j2 template to file: outputdir/puppet/cephstorage-role.yaml
jinja2 rendering normal template neutron-ml2-cisco-nexus-ucsm.j2.yaml
rendering j2 template to file: outputdir/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml
jinja2 rendering normal template apache.j2.yaml
rendering j2 template to file: outputdir/puppet/services/apache.yaml
jinja2 rendering normal template haproxy-internal-tls-certmonger.j2.yaml
rendering j2 template to file: outputdir/puppet/services/haproxy-internal-tls-certmonger.yaml
jinja2 rendering normal template container-image-prepare.j2.yaml
rendering j2 template to file: outputdir/puppet/services/container-image-prepare.yaml
[stack@undercloud-0 ~]$ 
[stack@undercloud-0 ~]$ ls outputdir/
all-nodes-validation.yaml        deployed-server        net-config-bond.yaml                              net-config-undercloud.yaml               plan-samples
bootstrap-config.yaml            docker                 net-config-bridge.yaml                            network                                  puppet
capabilities-map.yaml            docker_config_scripts  net-config-linux-bridge.yaml                      network_data_ganesha.yaml                roles
ci                               environments           net-config-noop.yaml                              network_data_routed.yaml                 roles_data_undercloud.yaml
common                           extraconfig            net-config-standalone.yaml                        network_data.yaml                        roles_data.yaml
config-download-software.yaml    firstboot              net-config-static-bridge-with-external-dhcp.yaml  overcloud-resource-registry-puppet.yaml  scripts
config-download-structured.yaml  hosts-config.yaml      net-config-static-bridge.yaml                     overcloud.yaml                           tools
default_passwords.yaml           j2_excludes.yaml       net-config-static.yaml                            plan-environment.yaml                    validation-scripts
[stack@undercloud-0 ~]$

Comment 6 errata-xmlrpc 2019-01-11 11:53:20 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/RHEA-2019:0045