Skip to content

Commit

Permalink
When mgmt ip and control_data ip is different
Browse files Browse the repository at this point in the history
control_data ip should be added to gateway_server_ip_list

Closes-Bug: #1638841

Conflicts:
	fabfile/utils/cluster.py

Change-Id: Ie627db678c36bd225899b6932a4db647ee961c7a
  • Loading branch information
krharsh committed Nov 3, 2016
1 parent ac3b105 commit 6606e9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fabfile/utils/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from fabos import detect_ostype, get_release, get_build
from fabfile.config import *
from fabfile.utils.config import get_value

from fabfile.utils.interface import get_data_ip

def get_all_hostnames():
if isinstance(env.hostnames.get('all', None), list):
Expand Down Expand Up @@ -115,7 +115,7 @@ def get_compute_as_gateway_list():
if gateway_mode_info:
for host in gateway_mode_info.keys():
if( gateway_mode_info[host] == 'server' ):
gateway_server_ip_list.append(host.split('@')[1])
gateway_server_ip_list.append(get_data_ip(host)[0])
return gateway_server_ip_list

def get_vmware_details(compute_host_string):
Expand Down
5 changes: 2 additions & 3 deletions fabfile/utils/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from fabric.api import *

from fabfile.config import testbed
from fabfile.utils.host import hstr_to_ip
from fabric.exceptions import CommandTimeout

@task
Expand Down Expand Up @@ -40,9 +39,9 @@ def get_data_ip(host_str):
tgt_ip = str(IPNetwork(data_ip_info[host_str]['ip']).ip)
tgt_gw = data_ip_info[host_str]['gw']
else:
tgt_ip = hstr_to_ip(host_str)
tgt_ip = host_str.split('@')[1]
else:
tgt_ip = hstr_to_ip(host_str)
tgt_ip = host_str.split('@')[1]

return (tgt_ip, tgt_gw)
#end get_data_ip
Expand Down

0 comments on commit 6606e9e

Please sign in to comment.