Don't rely on OS::Nova::Server.addresses
Server.addresses's implementation in Heat is dependent on a nova extension which is not guaranteed to be present. I'm not sure if this is something that should be fixed in Heat or not, but this is a workaround that results in the same information (instance.ipAddresses will be set to a list of all IP addresses across all networks the instance is assigned to). Change-Id: I5154f7e2a69ab8e64f9fbd1d8a26daf07f2482cd Closes-Bug: 1364446
This commit is contained in:
parent
b9784989b5
commit
ab15f95c59
@ -14,10 +14,6 @@
|
||||
# Size of RPC connection pool. (integer value)
|
||||
#rpc_conn_pool_size=30
|
||||
|
||||
# Modules of exceptions that are permitted to be recreated
|
||||
# upon receiving exception data from an rpc call. (list value)
|
||||
#allowed_rpc_exception_modules=oslo.messaging.exceptions,nova.exception,cinder.exception,exceptions
|
||||
|
||||
# Qpid broker hostname. (string value)
|
||||
#qpid_hostname=localhost
|
||||
|
||||
@ -47,6 +43,10 @@
|
||||
# Whether to disable the Nagle algorithm. (boolean value)
|
||||
#qpid_tcp_nodelay=true
|
||||
|
||||
# The number of prefetched messages held by receiver. (integer
|
||||
# value)
|
||||
#qpid_receiver_capacity=1
|
||||
|
||||
# The qpid topology version to use. Version 1 is what was
|
||||
# originally used by impl_qpid. Version 2 includes some
|
||||
# backwards-incompatible changes that allow broker federation
|
||||
@ -156,15 +156,6 @@
|
||||
# Heartbeat time-to-live. (integer value)
|
||||
#matchmaker_heartbeat_ttl=600
|
||||
|
||||
# Host to locate redis. (string value)
|
||||
#host=127.0.0.1
|
||||
|
||||
# Use this port to connect to redis host. (integer value)
|
||||
#port=6379
|
||||
|
||||
# Password for Redis server (optional). (string value)
|
||||
#password=<None>
|
||||
|
||||
# Size of RPC greenthread pool. (integer value)
|
||||
#rpc_thread_pool_size=64
|
||||
|
||||
@ -688,6 +679,22 @@
|
||||
#hash_algorithms=md5
|
||||
|
||||
|
||||
[matchmaker_redis]
|
||||
|
||||
#
|
||||
# Options defined in oslo.messaging
|
||||
#
|
||||
|
||||
# Host to locate redis. (string value)
|
||||
#host=127.0.0.1
|
||||
|
||||
# Use this port to connect to redis host. (integer value)
|
||||
#port=6379
|
||||
|
||||
# Password for Redis server (optional). (string value)
|
||||
#password=<None>
|
||||
|
||||
|
||||
[matchmaker_ring]
|
||||
|
||||
#
|
||||
|
@ -109,10 +109,10 @@ Methods:
|
||||
user_data_format: $userDataFormat
|
||||
key_name: $.keyname
|
||||
outputs:
|
||||
format('{0}-assigned-ip', $.name):
|
||||
description: format('IP address assigned to {0} instance', $.name)
|
||||
format('{0}-assigned-ips', $.name):
|
||||
description: format('Network IPs assigned to {0} instance', $.name)
|
||||
value:
|
||||
get_attr: [$.name, addresses]
|
||||
get_attr: [ $.name, networks ]
|
||||
|
||||
- $.instanceTemplate: $.instanceTemplate.mergeWith($template)
|
||||
|
||||
@ -121,7 +121,8 @@ Methods:
|
||||
- $.environment.stack.updateTemplate($.instanceTemplate)
|
||||
- $.environment.stack.push()
|
||||
- $outputs: $.environment.stack.output()
|
||||
- $.ipAddresses: $outputs.get(format('{0}-assigned-ip', $this.name)).values().flatten().addr.list()
|
||||
# Changing this to use the .networks attribute instead of 'addresses'
|
||||
- $.ipAddresses: $outputs.get(format('{0}-assigned-ips', $this.name)).values().flatten()
|
||||
- $.floatingIpAddress: $outputs.get(format('{0}-FloatingIPaddress', $this.name))
|
||||
- $.environment.instanceNotifier.trackCloudInstance($this)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user