fix bug of host do not have HEARTBEAT plane problem
Change-Id: I81f2abe4c74b0f83f462628749d265ce05467299
This commit is contained in:
parent
1dea7658e8
commit
cc82820fc5
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
"""
|
||||
/install endpoint for zenic API
|
||||
/install endpoint for kolla API
|
||||
"""
|
||||
import os
|
||||
import time
|
||||
|
@ -164,8 +164,13 @@ def get_controller_node_cfg(req, host_detail, cluster_networks):
|
|||
host_pub_macname = host_pub_network['name']
|
||||
host_sto_network = get_host_interface_by_network(host_detail, 'STORAGE')
|
||||
host_sto_macname = host_sto_network['name']
|
||||
host_hbt_network = get_host_interface_by_network(host_detail, 'HEARTBEAT')
|
||||
host_hbt_macname = host_hbt_network['name']
|
||||
try:
|
||||
host_hbt_network = get_host_interface_by_network(host_detail,
|
||||
'HEARTBEAT')
|
||||
host_hbt_macname = host_hbt_network['name']
|
||||
deploy_node_cfg.update({'hbt_macname': host_hbt_macname})
|
||||
except:
|
||||
pass
|
||||
if not host_mgt_ip:
|
||||
msg = "management ip of host %s can't be empty" % host_detail['id']
|
||||
raise exception.InvalidNetworkConfig(msg)
|
||||
|
@ -174,7 +179,6 @@ def get_controller_node_cfg(req, host_detail, cluster_networks):
|
|||
deploy_node_cfg.update({'mgt_macname': host_mgt_macname})
|
||||
deploy_node_cfg.update({'pub_macname': host_pub_macname})
|
||||
deploy_node_cfg.update({'sto_macname': host_sto_macname})
|
||||
deploy_node_cfg.update({'hbt_macname': host_hbt_macname})
|
||||
deploy_node_cfg.update({'host_name': host_name})
|
||||
return deploy_node_cfg
|
||||
|
||||
|
|
|
@ -230,9 +230,11 @@ def get_cluster_kolla_config(req, cluster_id):
|
|||
host_name_ip_list.append(host_name_ip)
|
||||
if len(set(mgt_macname_list)) != 1 or \
|
||||
len(set(pub_macname_list)) != 1 or \
|
||||
len(set(sto_macname_list)) != 1:
|
||||
len(set(sto_macname_list)) != 1 or \
|
||||
len(set(hbt_macname_list)) > 1:
|
||||
msg = (_("hosts interface name of public and \
|
||||
management and storage must be same!"))
|
||||
management and storage and heartbeat \
|
||||
must be same!"))
|
||||
LOG.error(msg)
|
||||
raise HTTPForbidden(msg)
|
||||
kolla_config.update({'Version': openstack_version})
|
||||
|
|
Loading…
Reference in New Issue