Skip to content

Commit

Permalink
Partial-Bug: #1413364
Browse files Browse the repository at this point in the history
On multi-interface,
Allowed hosts should have contraol_data ip list.

Change-Id: Id529ef6220ee919a8435b1b9824b67db254ef165
  • Loading branch information
thilakrajs committed Feb 26, 2015
1 parent 87b1598 commit 6e735cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/server_mgr_puppet.py
Expand Up @@ -2058,10 +2058,16 @@ def build_openstack_hiera_file(
# Get all values needed to fill he template.
self_ip = server.get("ip_address", "")
openstack_ip = cluster_params.get("internal_vip", None)

os_ip_list = [self.get_control_ip(provision_params, x["ip_address"].encode('ascii')) \
for x in cluster_servers if 'openstack' in set(eval(x['roles']))]

config_ip_list = [self.get_control_ip(provision_params, x["ip_address"].encode('ascii')) \
for x in cluster_servers if 'config' in set(eval(x['roles']))]

if openstack_ip != None and openstack_ip != "":
mysql_allowed_hosts.append(openstack_ip)
mysql_allowed_hosts = mysql_allowed_hosts + list(set(role_ips_dict['openstack'] + role_ips_dict['config']))

mysql_allowed_hosts = mysql_allowed_hosts + list(set(os_ip_list + config_ip_list ))

if openstack_ip is None or openstack_ip == '':
if self_ip in role_ips_dict['openstack']:
Expand Down

0 comments on commit 6e735cf

Please sign in to comment.