Handle config file without cluster network

If the cluster host network is not specified in the config file
for config_controller, the cluster host parameters are set to the
defaults.

Story: 2004273
Task: 27826

Change-Id: I20f22dc38a55312485e1d2b9c0e728d927b804c6
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
Teresa Ho 2019-01-17 12:39:46 -05:00
parent b61c65e519
commit b3f8165d9a
1 changed files with 27 additions and 22 deletions

View File

@ -3007,6 +3007,7 @@ class ConfigAssistant():
# Cluster network configuration
if self.kubernetes:
if config.has_section('cCLUSTER'):
self.cluster_host_interface_name = config.get(
'cCLUSTER', 'CLUSTER_INTERFACE_NAME')
self.cluster_host_interface = config.get(
@ -3029,6 +3030,10 @@ class ConfigAssistant():
'cCLUSTER', 'CLUSTER_BOND_POLICY')
self.cluster_host_subnet = IPNetwork(config.get(
'cCLUSTER', 'CLUSTER_SUBNET'))
else:
self.cluster_host_interface_name = \
self.management_interface_name
self.cluster_host_interface = self.management_interface
self.cluster_host_interface_configured = True
# External OAM network configuration