Add services to ServiceNetMap to select hostnames resolution network
authorGiulio Fidente <gfidente@redhat.com>
Fri, 3 Jul 2015 08:53:53 +0000 (10:53 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Wed, 8 Jul 2015 14:03:50 +0000 (16:03 +0200)
The *HostnameResolveNetwork services define the network against
which the hostnames in /etc/hosts should be resolved, defaults
to 'internal_api' for all except CephStorage for which it uses
'storage' as they do not have connectivity to 'internal_api'.

Closes-Bug: 1471179
Change-Id: Ia8971f8a63016966236e7975ac2d97921a314255

overcloud-without-mergepy.yaml
puppet/ceph-storage-puppet.yaml
puppet/cinder-storage-puppet.yaml
puppet/compute-puppet.yaml
puppet/controller-puppet.yaml
puppet/swift-storage-puppet.yaml

index 14e2ac2..4ad5714 100644 (file)
@@ -544,6 +544,11 @@ parameters:
       MysqlNetwork: internal_api
       CephClusterNetwork: storage_mgmt
       CephPublicNetwork: storage
+      ControllerHostnameResolveNetwork: internal_api
+      ComputeHostnameResolveNetwork: internal_api
+      BlockStorageHostnameResolveNetwork: internal_api
+      ObjectStorageHostnameResolveNetwork: internal_api
+      CephStorageHostnameResolveNetwork: storage
     description: Mapping of service_name -> network name. Typically set
                  via parameter_defaults in the resource registry.
     type: json
index 245d8eb..2d08941 100644 (file)
@@ -76,6 +76,12 @@ resources:
       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
 
+  NetIpMap:
+    type: OS::TripleO::Network::Ports::NetIpMap
+    properties:
+      StorageIp: {get_attr: [StoragePort, ip_address]}
+      StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
+
   NetIpSubnetMap:
     type: OS::TripleO::Network::Ports::NetIpMap
     properties:
@@ -145,7 +151,7 @@ outputs:
       str_replace:
         template: "IP HOST.localdomain HOST"
         params:
-          IP: {get_attr: [CephStorage, networks, ctlplane, 0]}
+          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CephStorageHostnameResolveNetwork]}]}
           HOST: {get_attr: [CephStorage, name]}
   nova_server_resource:
     description: Heat resource handle for the ceph storage server
@@ -160,4 +166,3 @@ outputs:
   config_identifier:
     description: identifier which changes if the node configuration may need re-applying
     value: {get_attr: [CephStorageDeployment, deploy_stdout]}
-
index cc8d17c..94a0a5c 100644 (file)
@@ -280,7 +280,7 @@ outputs:
       str_replace:
         template: "IP HOST.localdomain HOST"
         params:
-          IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
+          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, BlockStorageHostnameResolveNetwork]}]}
           HOST: {get_attr: [BlockStorage, name]}
   nova_server_resource:
     description: Heat resource handle for the block storage server
index afe85d1..357a097 100644 (file)
@@ -510,7 +510,7 @@ outputs:
       str_replace:
         template: "IP HOST.localdomain HOST"
         params:
-          IP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
+          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ComputeHostnameResolveNetwork]}]}
           HOST: {get_attr: [NovaCompute, name]}
   nova_server_resource:
     description: Heat resource handle for the Nova compute server
@@ -519,4 +519,3 @@ outputs:
   config_identifier:
     description: identifier which changes if the node configuration may need re-applying
     value: {get_attr: [NovaComputeDeployment, deploy_stdout]}
-
index 5a356bc..591d0c2 100644 (file)
@@ -1089,7 +1089,7 @@ outputs:
       str_replace:
         template: IP HOST.localdomain HOST CLOUDNAME
         params:
-          IP: {get_attr: [Controller, networks, ctlplane, 0]}
+          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ControllerHostnameResolveNetwork]}]}
           HOST: {get_attr: [Controller, name]}
           CLOUDNAME: {get_param: CloudName}
   nova_server_resource:
index 82922a8..fb1756b 100644 (file)
@@ -194,7 +194,7 @@ outputs:
       str_replace:
         template: "IP HOST.localdomain HOST"
         params:
-          IP: {get_attr: [SwiftStorage, networks, ctlplane, 0]}
+          IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ObjectStorageHostnameResolveNetwork]}]}
           HOST: {get_attr: [SwiftStorage, name]}
   nova_server_resource:
     description: Heat resource handle for the swift storage server
@@ -219,4 +219,3 @@ outputs:
   config_identifier:
     description: identifier which changes if the node configuration may need re-applying
     value: {get_attr: [SwiftStorageHieraDeploy, deploy_stdout]}
-