Correct ping test when using Swift temp_urls

This patch corrects the Heat metadata key we look for when trying
to determine the Swift metadata URL. Previously we were using
'os-collect-config.swift.metadata_put_url' which is incorrect,
thus causing us to skip the metadata_ip check. The correct
value to look for when using Swift temp URL's
is 'os-collect-config.request.metadata_url'.

This fixes an issue that broke network isolation upstream due to
the fact that the metadata_ip check was getting skipped when using
Swift temp URLs for signal reporting. The metadata_ip is required
to when using network isolation because it gives time for the
network connection to become active before proceeding. Not allowing
the network connections to properly activate can cause intermittent
and or all notifications to Heat to fail.

In the cases I saw locally this happened when using the t-h-t
single-nic-with-vlans network isolation templates on the compute node.

Change-Id: I7c17e3feec790f1e7760f33939c7378bb070fbc0
Closes-bug: #1550380
This commit is contained in:
Dan Prince 2016-02-26 16:15:15 -05:00
parent 91d75d6653
commit 2d603c051c
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ function get_metadata_ip() {
# Look for a variety of Heat transports
# FIXME: Heat should provide a way to obtain this in a single place
for URL in os-collect-config.cfn.metadata_url os-collect-config.heat.auth_url os-collect-config.swift.metadata_put_url os-collect-config.zaqar.auth_url; do
for URL in os-collect-config.cfn.metadata_url os-collect-config.heat.auth_url os-collect-config.request.metadata_url os-collect-config.zaqar.auth_url; do
METADATA_IP=$(os-apply-config --key $URL --key-default '' --type raw 2>/dev/null | sed -e 's|http.*://\([^:]*\).*|\1|')
[ -n "$METADATA_IP" ] && break
done