Add cluster-host IP for worker node in /etc/hosts
mtcClient monitors the cluster-host interface and looks up the cluster-host IP address. Since the cluster-host network is not served by dnsmasq, the cluster-host IP address is not available in the dnsmasq.hosts file. This commit add the cluster-host IP address to the /etc/hosts file for worker nodes. Story: 2004273 Task: 28899 Change-Id: I80937e8809ed5d40cf57d97d34eaab6afd7d6400 Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
This commit is contained in:
parent
a4c5933a7f
commit
6ef472f4a2
|
@ -39,7 +39,6 @@ class PlatformPuppet(base.BasePuppet):
|
|||
def get_system_config(self):
|
||||
config = {}
|
||||
config.update(self._get_system_config())
|
||||
config.update(self._get_hosts_config())
|
||||
config.update(self._get_amqp_config())
|
||||
config.update(self._get_resolv_config())
|
||||
config.update(self._get_haproxy_config())
|
||||
|
@ -61,6 +60,7 @@ class PlatformPuppet(base.BasePuppet):
|
|||
|
||||
def get_host_config(self, host):
|
||||
config = {}
|
||||
config.update(self._get_hosts_config(host))
|
||||
config.update(self._get_host_platform_config(host, self.config_uuid))
|
||||
config.update(self._get_host_ntp_config(host))
|
||||
config.update(self._get_host_ptp_config(host))
|
||||
|
@ -96,7 +96,7 @@ class PlatformPuppet(base.BasePuppet):
|
|||
'platform::params::vswitch_type': self._vswitch_type(),
|
||||
}
|
||||
|
||||
def _get_hosts_config(self):
|
||||
def _get_hosts_config(self, host):
|
||||
# list of host tuples (host name, address name, newtork type) that need
|
||||
# to be populated in the /etc/hosts file
|
||||
hostnames = [
|
||||
|
@ -186,6 +186,10 @@ class PlatformPuppet(base.BasePuppet):
|
|||
(constants.STORAGE_1_HOSTNAME + HOSTNAME_INFRA_SUFFIX,
|
||||
constants.STORAGE_1_HOSTNAME,
|
||||
constants.NETWORK_TYPE_CLUSTER_HOST),
|
||||
|
||||
(host.hostname + HOSTNAME_INFRA_SUFFIX,
|
||||
host.hostname,
|
||||
constants.NETWORK_TYPE_CLUSTER_HOST),
|
||||
]
|
||||
|
||||
hosts = {}
|
||||
|
|
Loading…
Reference in New Issue