Bug 1508601 - Add NetIpMap to hieradata for *ExtraConfig overrides (Composable Networks)
Summary: Add NetIpMap to hieradata for *ExtraConfig overrides (Composable Networks)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 12.0 (Pike)
Assignee: Steven Hardy
QA Contact: Alexander Chuzhoy
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-01 18:44 UTC by Alexander Chuzhoy
Modified: 2022-07-09 10:16 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:
Environment:
Last Closed: 2018-03-28 17:14:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1726884 0 None None None 2017-11-14 14:10:33 UTC
OpenStack gerrit 517264 0 'None' 'MERGED' 'Add NetIpMap to hieradata for *ExtraConfig overrides' 2019-12-02 04:45:37 UTC
Red Hat Issue Tracker OSP-17012 0 None None None 2022-07-09 10:16:00 UTC
Red Hat Product Errata RHSA-2018:0602 0 None None None 2018-03-28 17:15:58 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: 
parameter_defaults: 
  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

Env
openstack-tripleo-heat-templates-7.0.9-6.el7ost.noarch

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": "192.168.24.18",
    "ctlplane_subnet": "192.168.24.18/24",
    "ctlplane_uri": "192.168.24.18",
    "external": "10.0.0.107",
    "external_subnet": "10.0.0.107/24",
    "external_uri": "10.0.0.107",
    "internal_api": "172.17.1.20",
    "internal_api_subnet": "172.17.1.20/24",
    "internal_api_uri": "172.17.1.20",
    "management": "192.168.24.18",
    "management_subnet": "192.168.24.18/24",
    "management_uri": "192.168.24.18",
    "storage": "172.17.3.14",
    "storage_mgmt": "172.17.4.12",
    "storage_mgmt_subnet": "172.17.4.12/24",
    "storage_mgmt_uri": "172.17.4.12",
    "storage_subnet": "172.17.3.14/24",
    "storage_uri": "172.17.3.14",
    "tenant": "172.17.2.15",
    "tenant_subnet": "172.17.2.15/24",
    "tenant_uri": "172.17.2.15"

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.

https://access.redhat.com/errata/RHSA-2018:0602


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