Bug 1508601 - Add NetIpMap to hieradata for *ExtraConfig overrides (Composable Networks)
Summary: Add NetIpMap to hieradata for *ExtraConfig overrides (Composable Networks)
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
Target Milestone: z2
: 12.0 (Pike)
Assignee: Steven Hardy
QA Contact: Alexander Chuzhoy
Depends On:
TreeView+ depends on / blocked
Reported: 2017-11-01 18:44 UTC by Alexander Chuzhoy
Modified: 2018-03-28 17:15 UTC (History)
7 users (show)

Fixed In Version: openstack-tripleo-heat-templates-7.0.9-1.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-03-28 17:14:53 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0602 None None None 2018-03-28 17:15:58 UTC
OpenStack gerrit 517264 'None' 'MERGED' 'Add NetIpMap to hieradata for *ExtraConfig overrides' 2019-12-02 04:45:37 UTC
Launchpad 1726884 None None None 2017-11-14 14:10:33 UTC

Description Alexander Chuzhoy 2017-11-01 18:44:01 UTC
To enable per-node override of bind IPs via the per-role ExtraConfig paramaters, we need to enable hiera interpolation that references the keys defined in NetIpMap, so we add them to the hieradata. 
To minimise the risk of any conflicts in keynames it's added near the bottom of the hierarchy, but I'm not aware of any conflicting names in our templates/modules.
This will allow per-node hieradata override of bind IPs e.g: 
  ComputeRack1ExtraConfig: nova::vncproxy::host: "%{hiera('rack1_internal_api')}"
  ComputeRack2ExtraConfig: nova::vncproxy::host: "%{hiera('rack2_internal_api')}

Comment 1 Jiri Stransky 2017-11-03 15:24:15 UTC
Merged in stable/pike.

Comment 7 mlammon 2018-03-14 22:00:53 UTC
Deploy latest osp 12 2018-03-10.1


To verify:

[root@undercloud-0 ~]# cat /usr/share/openstack-tripleo-heat-templates/puppet/role.role.j2.yaml | grep net_ip_map
          - net_ip_map
          net_ip_map: {get_attr: [NetIpMap, net_ip_map]}
              - values: {get_attr: [NetIpMap, net_ip_map]}
          PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, {{role.name}}HostnameResolveNetwork]}]}
          PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, {{role.name}}HostnameResolveNetwork]}]}

Look on controller -

[heat-admin@controller-0 ~]$ sudo cat /etc/puppet/hieradata/net_ip_map.json
    "ctlplane": "",
    "ctlplane_subnet": "",
    "ctlplane_uri": "",
    "external": "",
    "external_subnet": "",
    "external_uri": "",
    "internal_api": "",
    "internal_api_subnet": "",
    "internal_api_uri": "",
    "management": "",
    "management_subnet": "",
    "management_uri": "",
    "storage": "",
    "storage_mgmt": "",
    "storage_mgmt_subnet": "",
    "storage_mgmt_uri": "",
    "storage_subnet": "",
    "storage_uri": "",
    "tenant": "",
    "tenant_subnet": "",
    "tenant_uri": ""

Comment 10 errata-xmlrpc 2018-03-28 17:14:53 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.


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