Bug 2217323

Summary: Values of OVNAvailabilityZone are not relfected to OVS's configuration.
Product: Red Hat OpenStack Reporter: Keigo Noha <knoha>
Component: openstack-tripleo-heat-templatesAssignee: Lucas Alvares Gomes <lmartins>
Status: NEW --- QA Contact: Joe H. Rahme <jhakimra>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.0 (Wallaby)CC: averdagu, lmartins, mburns, tkajinam
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2222869    

Description Keigo Noha 2023-06-26 04:58:04 UTC
Description of problem:
In our guide, OVNAvailabilityZone parameter can configure as a role specific parameter like:
~~~
parameter_defaults:
  NeutronDefaultAvailabilityZones: 'az-central,az-datacenter2,az-datacenter1'
  ControllerCentralParameters:
    OVNCMSOptions: 'enable-chassis-as-gw'
    OVNAvailabilityZone: 'az-central,az-datacenter2,az-datacenter1'
  NetworkerDatacenter1Parameters:
    OVNCMSOptions: 'enable-chassis-as-gw'
    OVNAvailabilityZone: 'az-datacenter1'
  NetworkerDatacenter2Parameters:
    OVNCMSOptions: 'enable-chassis-as-gw'
    OVNAvailabilityZone: 'az-datacenter2'
~~~

However, this configuration doesn't reflect the value to OVS option.

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-14.3.1-0.20221208160327.feca772.el9ost.noarch

How reproducible:
Everytime when a user run overcloud deploy.

Steps to Reproduce:
1. Set the role specific configuration of OVNAvailabilityZone.
2. Run overcloud deploy command with the template.
3. Check the OVS option on the configured node like: ovs-vsctl get Open_vSwitch . external-ids

Actual results:
The assigned value is not reflected.

Expected results:
The assigned value is reflected

Additional info:
If you assign a value to OVNAvailabilityZone parameter, hieradata doesn't contain the value of OVNAvailabilityZone at "ovn::controller::ovn_cms_options".

Comment 1 Takashi Kajinami 2023-06-26 06:16:28 UTC
It seems the OVNAvailabilityZone parameter is declared as a role-specific parameter but it lacks actual implementation to support role-specific definitions.

Here we resolve OVNAvailabilityZone as a heat template parameter and this does not allow override via RoleParameter.
 https://github.com/openstack/tripleo-heat-templates/blob/stable/wallaby/deployment/ovn/ovn-controller-container-puppet.yaml#L233

Furthermore, the condition to detect whether the tht parameter is set does not honor role specific parameter and checks only the base one.
 https://github.com/openstack/tripleo-heat-templates/blob/stable/wallaby/deployment/ovn/ovn-controller-container-puppet.yaml#L208