aboutsummaryrefslogtreecommitdiffstats
path: root/puppet/cinder-storage.yaml
diff options
context:
space:
mode:
authorGiulio Fidente <gfidente@redhat.com>2016-01-20 14:36:55 +0100
committerGiulio Fidente <gfidente@redhat.com>2016-02-24 17:56:25 +0000
commitd6c1173120ad2efc98e5e8d67cf6d8d34aa0f458 (patch)
tree091b8bf9c214d43a7e5a190f8a51f78485c8c227 /puppet/cinder-storage.yaml
parent9e473e4b54197811ede59b07bfb3d0e79475e2e1 (diff)
Emits a different hostname for each network the node is on
Populates /etc/hosts with an entry for each IP address the node is on, which will be useful to migrate services configuration from using IPs into using hostnames. This is how the lines look like on a host which doesn't have all ports: 172.16.2.6 overcloud-novacompute-0.localdomain overcloud-novacompute-0 192.0.2.9 overcloud-novacompute-0-external 172.16.2.6 overcloud-novacompute-0-internalapi 172.16.1.6 overcloud-novacompute-0-storage 192.0.2.9 overcloud-novacompute-0-storagemgmt 172.16.0.4 overcloud-novacompute-0-tenant 192.0.2.9 overcloud-novacompute-0-management the network against which the default (or primary) name is resolved can be configured (for computes) via ComputeHostnameResolveNetwork Change-Id: Id480207c68e5d68967d67e2091cd081c17ab5dd7
Diffstat (limited to 'puppet/cinder-storage.yaml')
-rw-r--r--puppet/cinder-storage.yaml49
1 files changed, 46 insertions, 3 deletions
diff --git a/puppet/cinder-storage.yaml b/puppet/cinder-storage.yaml
index 0bec3e93..dedd5142 100644
--- a/puppet/cinder-storage.yaml
+++ b/puppet/cinder-storage.yaml
@@ -343,11 +343,54 @@ outputs:
hosts_entry:
value:
str_replace:
- template: "IP HOST.DOMAIN HOST"
+ template: |
+ PRIMARYIP PRIMARYHOST.DOMAIN PRIMARYHOST
+ EXTERNALIP EXTERNALHOST
+ INTERNAL_APIIP INTERNAL_APIHOST
+ STORAGEIP STORAGEHOST
+ STORAGE_MGMTIP STORAGE_MGMTHOST
+ TENANTIP TENANTHOST
+ MANAGEMENTIP MANAGEMENTHOST
params:
- IP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, BlockStorageHostnameResolveNetwork]}]}
+ PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, BlockStorageHostnameResolveNetwork]}]}
DOMAIN: {get_param: CloudDomain}
- HOST: {get_attr: [BlockStorage, name]}
+ PRIMARYHOST: {get_attr: [BlockStorage, name]}
+ EXTERNALIP: {get_attr: [ExternalPort, ip_address]}
+ EXTERNALHOST:
+ list_join:
+ - '-'
+ - - {get_attr: [BlockStorage, name]}
+ - external
+ INTERNAL_APIIP: {get_attr: [InternalApiPort, ip_address]}
+ INTERNAL_APIHOST:
+ list_join:
+ - '-'
+ - - {get_attr: [BlockStorage, name]}
+ - internalapi
+ STORAGEIP: {get_attr: [StoragePort, ip_address]}
+ STORAGEHOST:
+ list_join:
+ - '-'
+ - - {get_attr: [BlockStorage, name]}
+ - storage
+ STORAGE_MGMTIP: {get_attr: [StorageMgmtPort, ip_address]}
+ STORAGE_MGMTHOST:
+ list_join:
+ - '-'
+ - - {get_attr: [BlockStorage, name]}
+ - storagemgmt
+ TENANTIP: {get_attr: [TenantPort, ip_address]}
+ TENANTHOST:
+ list_join:
+ - '-'
+ - - {get_attr: [BlockStorage, name]}
+ - tenant
+ MANAGEMENTIP: {get_attr: [ManagementPort, ip_address]}
+ MANAGEMENTHOST:
+ list_join:
+ - '-'
+ - - {get_attr: [BlockStorage, name]}
+ - management
nova_server_resource:
description: Heat resource handle for the block storage server
value: