summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Nikishov <dnikishov@mirantis.com>2016-05-17 13:05:41 -0500
committertatyana-leontovich <tleontovich@mirantis.com>2016-06-06 15:38:21 +0000
commit43a58efbaf17ca4fd3a2545bcefaff888c6e565d (patch)
treeeef2c881632d8d6190fc48878a514a52efd5e7d6
parentef0eda085dcebdeed448c6c804e2f581aac27b65 (diff)
Fixed hiera command to output correct DB hostnames
hiera_cmd used to output internal node names like "node-$i" even if there are user-defined hostnames set. This breaks DB-related checks when hostnames are customized. The fix is to return not "database_nodes" keys, but the value of "name" key in each "database_nodes" subhash. Change-Id: I9fbcfc270ab17d6302ce0a785c96f5b44fc9e75d Co-Authored-By: Omar Rivera <gr113x@att.com> Closes-Bug: #1582800
Notes
Notes (review): Code-Review+1: Nastya Urlapova <aurlapova@mirantis.com> Code-Review+1: Vladimir Khlyunev <vkhlyunev@mirantis.com> Code-Review+1: Alexey Stepanov <astepanov@mirantis.com> Code-Review+1: Alexandr Kostrikov <akostrikov@mirantis.com> Code-Review+2: tatyana-leontovich <tleontovich@mirantis.com> Verified+1: Fuel CI <fuel-ci-bot@mirantis.com> Workflow+1: tatyana-leontovich <tleontovich@mirantis.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 07 Jun 2016 09:15:27 +0000 Reviewed-on: https://review.openstack.org/317660 Project: openstack/fuel-ostf Branch: refs/heads/master
-rw-r--r--fuel_health/tests/ha/test_mysql_status.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/fuel_health/tests/ha/test_mysql_status.py b/fuel_health/tests/ha/test_mysql_status.py
index 1a28682..428459b 100644
--- a/fuel_health/tests/ha/test_mysql_status.py
+++ b/fuel_health/tests/ha/test_mysql_status.py
@@ -59,9 +59,11 @@ class BaseMysqlTest(BaseTestCase):
59 key_filename=key, 59 key_filename=key,
60 timeout=100) 60 timeout=100)
61 61
62 hiera_cmd = ('ruby -e \'require "hiera";' 62 hiera_cmd = ('ruby -e \'require "hiera"; '
63 'db = Hiera.new().lookup("database_nodes", {}, {}).keys;' 63 'db_h = Hiera.new().lookup("database_nodes", {}, {}); '
64 'db = db_h.keys.map{|k| db_h[k]["name"]}; '
64 'if db != [] then puts db else puts "None" end\'') 65 'if db != [] then puts db else puts "None" end\'')
66
65 database_nodes = ssh_client.exec_command(hiera_cmd) 67 database_nodes = ssh_client.exec_command(hiera_cmd)
66 # get online nodes 68 # get online nodes
67 database_nodes = database_nodes.splitlines() 69 database_nodes = database_nodes.splitlines()