diff --git a/files/monitor.py b/files/monitor.py index ab71fc6d..0b5bb3ae 100644 --- a/files/monitor.py +++ b/files/monitor.py @@ -256,7 +256,7 @@ class MonitorNeutronAgentsDaemon(Daemon): LOG.info('Active l3 agents: %s' % l3_agents) if not networks and not routers: - LOG.info('No failed agents found, return.') + LOG.info('No networks and routers hosted on failed agents.') return if len(dhcp_agents) == 0 and len(l3_agents) == 0: @@ -273,10 +273,10 @@ class MonitorNeutronAgentsDaemon(Daemon): def run(self): while True: - LOG.info('Monitor Neutron Agent Loop Start') + LOG.info('Monitor Neutron HA Agent Loop Start') + self.reassign_agent_resources() LOG.info('sleep %s' % cfg.CONF.check_interval) time.sleep(float(cfg.CONF.check_interval)) - self.reassign_agent_resources() if __name__ == '__main__': diff --git a/files/monitor_neutron_ha.sh b/files/monitor_neutron_ha.sh index fb288ff9..d165c4bd 100755 --- a/files/monitor_neutron_ha.sh +++ b/files/monitor_neutron_ha.sh @@ -1,10 +1,10 @@ #! /bin/bash -logger " ** " +logger " ******************************************************************* " logger "Start running ns_ovs_cleanup.sh..." logger "CRM_notify_task: $CRM_notify_task, CRM_notify_desc: $CRM_notify_desc" logger "CRM_notify_rsc: $CRM_notify_rsc, CRM_notify_node: $CRM_notify_node" -logger " ** " +logger " ******************************************************************* " set -x DEFAULT_PIDFILE="/tmp/monitor.pid" diff --git a/hooks/quantum_utils.py b/hooks/quantum_utils.py index 78e12552..e572e9c8 100644 --- a/hooks/quantum_utils.py +++ b/hooks/quantum_utils.py @@ -629,13 +629,6 @@ def copy_file(source_dir, des_dir, f, f_mod=None, update=False): raise -def init_ocf_MonitorNeutron_f(update=False): - ocf_f = 'MonitorNeutron' - exec_dir = '/usr/lib/ocf/resource.d/pacemaker' - copy_file(LEGACY_HA_TEMPLATE_FILES, exec_dir, - ocf_f, stat.S_IEXEC, update=update) - - def get_external_agent_f(): agent = 'monitor_neutron_ha.sh' exec_dir = '/usr/lib/ocf/resource.d/canonical' @@ -665,9 +658,9 @@ def init_monitor_conf_files(update=False): def install_legacy_ha_files(update=False): if config('ha-legacy-mode'): - init_ocf_MonitorNeutron_f(update=update) init_external_agent_f(update=update) init_monitor_daemon(update=update) + init_monitor_conf_files() def cache_env_data():