Bug 2128862 - <ROLE>NetworkConfigTemplate - Heat var should set in overcloud node provision output environment
Summary: <ROLE>NetworkConfigTemplate - Heat var should set in overcloud node provision...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 17.0 (Wallaby)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: z1
: ---
Assignee: Harald Jensås
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-21 18:05 UTC by Harald Jensås
Modified: 2022-09-21 19:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-21 18:53:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-18857 0 None None None 2022-09-21 18:06:14 UTC

Description Harald Jensås 2022-09-21 18:05:26 UTC
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

Comment 2 Harald Jensås 2022-09-21 18:53:41 UTC
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


Note You need to log in before you can comment on or make changes to this bug.