Description of problem: When overcloud node provision run's with --network-config, the nic-config template specified in baremetal_deployment.yaml should be written to the output environment file used with the overcloud deployment. Actual results: Unless the user set the <ROLE>NetworkConfigTemplate in a heat environment file used with the overcloud deploy command there is a risk that the default nic-configration using a single nic bridge is used. This only happens in case {{role.name}}NetworkConfigUpdate heat parameter is set to True. Expected results: It would be good to write the template for a role to <ROLE>NetworkConfigTemplate in the overcloud node provision output file to ensure the same template is used when tripleo_network_config is triggered during deploy playbook run. Additional info: Document that if baremetal_deployment.yaml have: - name: <ROLE> count: 2 defaults: network_config: template: /home/stack/templates/nic-config/<ROLE>.j2 An environment with this should also be included: parameter_defaults: <ROLE>NetworkConfigTemplate: /home/stack/templates/nic-config/<ROLE>.j2
Closing this is NOT a bug. <ROLE>NetworkConfigTemplate only works when not using '--network-config' option with 'overcloud node provision'. When '--network-config' option is used the inventory-network-config.yaml set's the tripleo_network_config_template in hosts vars, this will always override the group_var value set by THT <ROLE>NetworkConfigTemplate. Since it is possible to use a per-instance nic-config template when 'overcloud node provision' does network config it is not possible to set the THT parameter which is limited to 'per-role' in all cases. Example file: overcloud-deploy/overcloud/inventory-network-config.yaml - shows that tripleo_network_config_template is set up as host var. Compute: hosts: overcloud-novacompute-0: default_route_network: - ctlplane dns_search_domains: [] networks_skip_config: [] neutron_physical_bridge_name: br-ex neutron_public_interface_name: nic1 tripleo_network_config_template: /home/stack/templates/nic-config/compute.j2 tripleo_network_config_update: true overcloud-novacompute-1: default_route_network: - ctlplane dns_search_domains: [] networks_skip_config: [] neutron_physical_bridge_name: br-ex neutron_public_interface_name: nic1 tripleo_network_config_template: /home/stack/templates/nic-config/compute.j2 tripleo_network_config_update: true vars: tripleo_network_config_hide_sensitive_logs: false tripleo_network_config_with_ansible: true