2013-07-19 10:46:25 +01:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
2014-02-04 08:41:13 +02:00
|
|
|
from base64 import b64decode
|
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
from charmhelpers.core.hookenv import (
|
|
|
|
log, ERROR, WARNING,
|
|
|
|
config,
|
|
|
|
relation_get,
|
|
|
|
relation_set,
|
2013-10-17 17:28:24 +01:00
|
|
|
relation_ids,
|
2015-10-01 16:12:25 -07:00
|
|
|
Hooks,
|
|
|
|
UnregisteredHookError,
|
|
|
|
status_set,
|
2013-07-19 10:46:25 +01:00
|
|
|
)
|
2016-04-14 09:53:55 +01:00
|
|
|
from charmhelpers.core.host import service_restart
|
|
|
|
from charmhelpers.core.unitdata import kv
|
2013-09-02 17:14:27 +01:00
|
|
|
from charmhelpers.fetch import (
|
2013-07-19 10:46:25 +01:00
|
|
|
apt_update,
|
|
|
|
apt_install,
|
|
|
|
filter_installed_packages,
|
2014-10-08 22:53:29 +00:00
|
|
|
apt_purge,
|
2013-09-02 17:14:27 +01:00
|
|
|
)
|
|
|
|
from charmhelpers.core.host import (
|
2013-11-19 15:00:25 +00:00
|
|
|
lsb_release,
|
2013-07-19 10:46:25 +01:00
|
|
|
)
|
|
|
|
from charmhelpers.contrib.hahelpers.cluster import(
|
2015-01-06 16:41:28 +00:00
|
|
|
get_hacluster_config,
|
2013-07-19 10:46:25 +01:00
|
|
|
eligible_leader
|
|
|
|
)
|
|
|
|
from charmhelpers.contrib.hahelpers.apache import(
|
|
|
|
install_ca_cert
|
|
|
|
)
|
|
|
|
from charmhelpers.contrib.openstack.utils import (
|
2015-04-10 14:22:04 +00:00
|
|
|
config_value_changed,
|
2013-07-19 10:46:25 +01:00
|
|
|
configure_installation_source,
|
2013-11-28 13:12:39 +00:00
|
|
|
openstack_upgrade_available,
|
2014-10-20 10:15:18 +00:00
|
|
|
os_requires_version,
|
2016-04-04 14:57:29 +00:00
|
|
|
pausable_restart_on_change as restart_on_change,
|
2016-04-14 09:53:55 +01:00
|
|
|
is_unit_paused_set,
|
2013-07-19 10:46:25 +01:00
|
|
|
)
|
2013-09-27 17:26:48 +01:00
|
|
|
from charmhelpers.payload.execd import execd_preinstall
|
2014-12-19 10:37:34 -03:00
|
|
|
from charmhelpers.core.sysctl import create as create_sysctl
|
2013-07-19 10:46:25 +01:00
|
|
|
|
2015-01-12 12:04:01 +00:00
|
|
|
from charmhelpers.contrib.charmsupport import nrpe
|
2016-03-22 21:00:39 +00:00
|
|
|
from charmhelpers.contrib.hardening.harden import harden
|
2013-07-19 10:46:25 +01:00
|
|
|
|
|
|
|
import sys
|
2015-05-07 10:27:07 +01:00
|
|
|
from neutron_utils import (
|
2015-03-03 10:40:41 +00:00
|
|
|
L3HA_PACKAGES,
|
2013-07-19 10:46:25 +01:00
|
|
|
register_configs,
|
|
|
|
restart_map,
|
2014-11-17 13:56:28 +10:00
|
|
|
services,
|
2013-07-19 10:46:25 +01:00
|
|
|
do_openstack_upgrade,
|
|
|
|
get_packages,
|
|
|
|
get_early_packages,
|
2014-09-09 13:03:02 +00:00
|
|
|
get_topics,
|
2015-04-10 14:22:04 +00:00
|
|
|
git_install,
|
|
|
|
git_install_requested,
|
2013-07-19 10:46:25 +01:00
|
|
|
valid_plugin,
|
|
|
|
configure_ovs,
|
2014-12-05 16:35:54 +08:00
|
|
|
stop_services,
|
|
|
|
cache_env_data,
|
2014-12-22 20:48:25 +08:00
|
|
|
update_legacy_ha_files,
|
|
|
|
remove_legacy_ha_files,
|
2015-01-21 20:37:47 +08:00
|
|
|
install_legacy_ha_files,
|
|
|
|
cleanup_ovs_netns,
|
2013-07-19 10:46:25 +01:00
|
|
|
reassign_agent_resources,
|
2015-03-03 10:40:41 +00:00
|
|
|
stop_neutron_ha_monitor_daemon,
|
|
|
|
use_l3ha,
|
2016-02-29 16:58:25 +00:00
|
|
|
NEUTRON_COMMON,
|
2016-04-04 14:57:29 +00:00
|
|
|
assess_status,
|
2016-07-12 10:57:28 +01:00
|
|
|
install_systemd_override,
|
2016-03-30 13:34:53 -07:00
|
|
|
configure_apparmor,
|
2013-07-19 10:46:25 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
hooks = Hooks()
|
|
|
|
CONFIGS = register_configs()
|
|
|
|
|
|
|
|
|
2015-09-22 14:46:41 +01:00
|
|
|
@hooks.hook('install.real')
|
2016-03-22 21:00:39 +00:00
|
|
|
@harden()
|
2013-07-19 10:46:25 +01:00
|
|
|
def install():
|
2015-10-01 16:12:25 -07:00
|
|
|
status_set('maintenance', 'Executing pre-install')
|
2013-09-27 17:26:48 +01:00
|
|
|
execd_preinstall()
|
2013-09-25 17:46:09 +01:00
|
|
|
src = config('openstack-origin')
|
|
|
|
if (lsb_release()['DISTRIB_CODENAME'] == 'precise' and
|
2013-10-15 09:27:59 +01:00
|
|
|
src == 'distro'):
|
2016-02-29 16:58:25 +00:00
|
|
|
src = 'cloud:precise-icehouse'
|
2013-09-25 17:46:09 +01:00
|
|
|
configure_installation_source(src)
|
2015-10-01 16:12:25 -07:00
|
|
|
status_set('maintenance', 'Installing apt packages')
|
2013-07-19 10:46:25 +01:00
|
|
|
apt_update(fatal=True)
|
2014-12-17 17:34:33 +00:00
|
|
|
apt_install('python-six', fatal=True) # Force upgrade
|
2013-07-19 10:46:25 +01:00
|
|
|
if valid_plugin():
|
|
|
|
apt_install(filter_installed_packages(get_early_packages()),
|
|
|
|
fatal=True)
|
|
|
|
apt_install(filter_installed_packages(get_packages()),
|
|
|
|
fatal=True)
|
2015-10-01 16:12:25 -07:00
|
|
|
status_set('maintenance', 'Git install')
|
2015-04-10 14:22:04 +00:00
|
|
|
git_install(config('openstack-origin-git'))
|
2013-07-19 10:46:25 +01:00
|
|
|
else:
|
2015-10-01 16:12:25 -07:00
|
|
|
message = 'Please provide a valid plugin config'
|
|
|
|
log(message, level=ERROR)
|
|
|
|
status_set('blocked', message)
|
2013-07-19 10:46:25 +01:00
|
|
|
sys.exit(1)
|
|
|
|
|
2014-12-05 16:35:54 +08:00
|
|
|
# Legacy HA for Icehouse
|
2014-12-22 19:31:18 +08:00
|
|
|
update_legacy_ha_files()
|
2014-12-05 16:35:54 +08:00
|
|
|
|
2016-07-12 10:57:28 +01:00
|
|
|
# Install systemd overrides to remove service startup race between
|
|
|
|
# n-gateway and n-cloud-controller services.
|
|
|
|
install_systemd_override()
|
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
|
|
|
|
@hooks.hook('config-changed')
|
|
|
|
@restart_on_change(restart_map())
|
2016-03-22 21:00:39 +00:00
|
|
|
@harden()
|
2013-07-19 10:46:25 +01:00
|
|
|
def config_changed():
|
2014-04-01 15:42:09 +01:00
|
|
|
global CONFIGS
|
2015-04-10 14:22:04 +00:00
|
|
|
if git_install_requested():
|
|
|
|
if config_value_changed('openstack-origin-git'):
|
2015-10-01 16:12:25 -07:00
|
|
|
status_set('maintenance', 'Running Git install')
|
2015-04-10 14:22:04 +00:00
|
|
|
git_install(config('openstack-origin-git'))
|
|
|
|
CONFIGS.write_all()
|
2015-10-01 16:12:25 -07:00
|
|
|
|
2015-09-14 13:33:41 -07:00
|
|
|
elif not config('action-managed-upgrade'):
|
2016-02-29 16:58:25 +00:00
|
|
|
if openstack_upgrade_available(NEUTRON_COMMON):
|
2015-10-01 16:12:25 -07:00
|
|
|
status_set('maintenance', 'Running openstack upgrade')
|
2015-09-15 14:09:40 -07:00
|
|
|
do_openstack_upgrade(CONFIGS)
|
2015-04-10 14:22:04 +00:00
|
|
|
|
2014-10-29 22:30:36 -05:00
|
|
|
update_nrpe_config()
|
2014-12-19 10:37:34 -03:00
|
|
|
|
|
|
|
sysctl_dict = config('sysctl')
|
|
|
|
if sysctl_dict:
|
|
|
|
create_sysctl(sysctl_dict, '/etc/sysctl.d/50-quantum-gateway.conf')
|
|
|
|
|
2014-02-27 11:46:17 +00:00
|
|
|
# Re-run joined hooks as config might have changed
|
|
|
|
for r_id in relation_ids('amqp'):
|
|
|
|
amqp_joined(relation_id=r_id)
|
2014-06-06 13:02:28 +00:00
|
|
|
for r_id in relation_ids('amqp-nova'):
|
|
|
|
amqp_nova_joined(relation_id=r_id)
|
2014-09-09 13:03:02 +00:00
|
|
|
for rid in relation_ids('zeromq-configuration'):
|
|
|
|
zeromq_configuration_relation_joined(rid)
|
2013-07-19 10:46:25 +01:00
|
|
|
if valid_plugin():
|
|
|
|
CONFIGS.write_all()
|
|
|
|
configure_ovs()
|
2016-03-30 13:34:53 -07:00
|
|
|
configure_apparmor()
|
2013-07-19 10:46:25 +01:00
|
|
|
else:
|
2015-10-01 16:12:25 -07:00
|
|
|
message = 'Please provide a valid plugin config'
|
|
|
|
log(message, level=ERROR)
|
|
|
|
status_set('blocked', message)
|
2013-07-19 10:46:25 +01:00
|
|
|
sys.exit(1)
|
2014-04-15 00:15:31 +00:00
|
|
|
if config('plugin') == 'n1kv':
|
2015-04-10 14:22:04 +00:00
|
|
|
if not git_install_requested():
|
|
|
|
if config('enable-l3-agent'):
|
2015-10-01 16:12:25 -07:00
|
|
|
status_set('maintenance', 'Installing apt packages')
|
2015-04-10 14:22:04 +00:00
|
|
|
apt_install(filter_installed_packages('neutron-l3-agent'))
|
|
|
|
else:
|
|
|
|
apt_purge('neutron-l3-agent')
|
2013-07-19 10:46:25 +01:00
|
|
|
|
2015-01-09 16:00:15 +08:00
|
|
|
# Setup legacy ha configurations
|
2014-12-22 19:31:18 +08:00
|
|
|
update_legacy_ha_files()
|
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
|
|
|
|
@hooks.hook('upgrade-charm')
|
2016-03-22 21:00:39 +00:00
|
|
|
@harden()
|
2013-07-19 10:46:25 +01:00
|
|
|
def upgrade_charm():
|
|
|
|
install()
|
|
|
|
config_changed()
|
2015-01-06 16:41:28 +00:00
|
|
|
update_legacy_ha_files(force=True)
|
2013-07-19 10:46:25 +01:00
|
|
|
|
2016-07-12 10:57:28 +01:00
|
|
|
# Install systemd overrides to remove service startup race between
|
|
|
|
# n-gateway and n-cloud-controller services.
|
|
|
|
install_systemd_override()
|
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
|
2014-06-06 13:02:28 +00:00
|
|
|
@hooks.hook('amqp-nova-relation-joined')
|
|
|
|
def amqp_nova_joined(relation_id=None):
|
|
|
|
relation_set(relation_id=relation_id,
|
|
|
|
username=config('nova-rabbit-user'),
|
|
|
|
vhost=config('nova-rabbit-vhost'))
|
|
|
|
|
2014-06-24 14:40:39 +01:00
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
@hooks.hook('amqp-relation-joined')
|
2013-10-17 17:28:24 +01:00
|
|
|
def amqp_joined(relation_id=None):
|
|
|
|
relation_set(relation_id=relation_id,
|
|
|
|
username=config('rabbit-user'),
|
2013-07-19 11:08:23 +01:00
|
|
|
vhost=config('rabbit-vhost'))
|
2013-07-19 10:46:25 +01:00
|
|
|
|
|
|
|
|
2014-06-06 13:02:28 +00:00
|
|
|
@hooks.hook('amqp-nova-relation-departed')
|
2014-06-19 13:57:55 +01:00
|
|
|
@hooks.hook('amqp-nova-relation-changed')
|
2014-06-06 13:02:28 +00:00
|
|
|
@restart_on_change(restart_map())
|
2014-06-09 11:30:01 +00:00
|
|
|
def amqp_nova_changed():
|
2014-06-06 13:02:28 +00:00
|
|
|
if 'amqp-nova' not in CONFIGS.complete_contexts():
|
|
|
|
log('amqp relation incomplete. Peer not ready?')
|
|
|
|
return
|
|
|
|
CONFIGS.write_all()
|
|
|
|
|
2014-06-24 14:40:39 +01:00
|
|
|
|
2014-01-30 12:01:36 +01:00
|
|
|
@hooks.hook('amqp-relation-departed')
|
|
|
|
@restart_on_change(restart_map())
|
|
|
|
def amqp_departed():
|
|
|
|
if 'amqp' not in CONFIGS.complete_contexts():
|
2014-01-30 12:24:28 +01:00
|
|
|
log('amqp relation incomplete. Peer not ready?')
|
2014-01-30 12:01:36 +01:00
|
|
|
return
|
|
|
|
CONFIGS.write_all()
|
|
|
|
|
|
|
|
|
2016-02-29 16:58:25 +00:00
|
|
|
@hooks.hook('amqp-relation-changed',
|
2013-11-19 14:02:50 +00:00
|
|
|
'cluster-relation-changed',
|
2015-02-20 11:50:46 +00:00
|
|
|
'cluster-relation-joined')
|
2013-07-19 10:46:25 +01:00
|
|
|
@restart_on_change(restart_map())
|
2016-02-29 16:58:25 +00:00
|
|
|
def amqp_changed():
|
2013-07-19 10:46:25 +01:00
|
|
|
CONFIGS.write_all()
|
|
|
|
|
|
|
|
|
2015-02-20 11:50:46 +00:00
|
|
|
@hooks.hook('neutron-plugin-api-relation-changed')
|
|
|
|
@restart_on_change(restart_map())
|
|
|
|
def neutron_plugin_api_changed():
|
2015-03-03 10:40:41 +00:00
|
|
|
if use_l3ha():
|
|
|
|
apt_update()
|
|
|
|
apt_install(L3HA_PACKAGES, fatal=True)
|
2015-02-20 11:50:46 +00:00
|
|
|
CONFIGS.write_all()
|
|
|
|
|
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
@hooks.hook('quantum-network-service-relation-changed')
|
|
|
|
@restart_on_change(restart_map())
|
|
|
|
def nm_changed():
|
|
|
|
CONFIGS.write_all()
|
|
|
|
if relation_get('ca_cert'):
|
2014-02-04 08:41:13 +02:00
|
|
|
ca_crt = b64decode(relation_get('ca_cert'))
|
|
|
|
install_ca_cert(ca_crt)
|
2013-07-19 10:46:25 +01:00
|
|
|
|
2014-12-11 18:30:21 +08:00
|
|
|
if config('ha-legacy-mode'):
|
|
|
|
cache_env_data()
|
|
|
|
|
2016-04-14 09:53:55 +01:00
|
|
|
# NOTE: nova-api-metadata needs to be restarted
|
|
|
|
# once the nova-conductor is up and running
|
|
|
|
# on the nova-cc units.
|
2016-07-08 17:46:58 +01:00
|
|
|
restart_nonce = relation_get('restart_trigger')
|
2016-04-14 09:53:55 +01:00
|
|
|
if restart_nonce is not None:
|
|
|
|
db = kv()
|
2016-07-12 10:57:28 +01:00
|
|
|
previous_nonce = db.get('restart_nonce')
|
2016-04-14 09:53:55 +01:00
|
|
|
if previous_nonce != restart_nonce:
|
|
|
|
if not is_unit_paused_set():
|
|
|
|
service_restart('nova-api-metadata')
|
|
|
|
db.set('restart_nonce', restart_nonce)
|
|
|
|
db.flush()
|
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
|
|
|
|
@hooks.hook("cluster-relation-departed")
|
2013-11-19 14:02:50 +00:00
|
|
|
@restart_on_change(restart_map())
|
2013-07-19 10:46:25 +01:00
|
|
|
def cluster_departed():
|
2014-05-03 08:28:30 +01:00
|
|
|
if config('plugin') in ['nvp', 'nsx']:
|
|
|
|
log('Unable to re-assign agent resources for'
|
|
|
|
' failed nodes with nvp|nsx',
|
2013-07-19 10:46:25 +01:00
|
|
|
level=WARNING)
|
|
|
|
return
|
2014-04-15 00:15:31 +00:00
|
|
|
if config('plugin') == 'n1kv':
|
|
|
|
log('Unable to re-assign agent resources for failed nodes with n1kv',
|
|
|
|
level=WARNING)
|
|
|
|
return
|
2015-01-23 19:04:13 +08:00
|
|
|
if not config('ha-legacy-mode') and eligible_leader(None):
|
2013-07-19 10:46:25 +01:00
|
|
|
reassign_agent_resources()
|
2013-11-19 14:02:50 +00:00
|
|
|
CONFIGS.write_all()
|
2013-07-19 10:46:25 +01:00
|
|
|
|
|
|
|
|
2013-11-19 15:56:02 +00:00
|
|
|
@hooks.hook('cluster-relation-broken')
|
2013-11-19 15:00:25 +00:00
|
|
|
@hooks.hook('stop')
|
|
|
|
def stop():
|
2013-11-28 13:12:39 +00:00
|
|
|
stop_services()
|
2015-01-22 13:58:09 +08:00
|
|
|
if config('ha-legacy-mode'):
|
|
|
|
# Cleanup ovs and netns for destroyed units.
|
|
|
|
cleanup_ovs_netns()
|
2013-07-19 10:46:25 +01:00
|
|
|
|
2014-09-09 13:03:02 +00:00
|
|
|
|
|
|
|
@hooks.hook('zeromq-configuration-relation-joined')
|
2016-02-29 16:58:25 +00:00
|
|
|
@os_requires_version('kilo', NEUTRON_COMMON)
|
2014-09-09 13:03:02 +00:00
|
|
|
def zeromq_configuration_relation_joined(relid=None):
|
|
|
|
relation_set(relation_id=relid,
|
|
|
|
topics=" ".join(get_topics()),
|
2014-09-10 10:14:49 +00:00
|
|
|
users="neutron nova")
|
2014-09-09 13:03:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
@hooks.hook('zeromq-configuration-relation-changed')
|
|
|
|
@restart_on_change(restart_map(), stopstart=True)
|
|
|
|
def zeromq_configuration_relation_changed():
|
|
|
|
CONFIGS.write_all()
|
|
|
|
|
|
|
|
|
2014-11-17 13:56:28 +10:00
|
|
|
@hooks.hook('nrpe-external-master-relation-joined',
|
|
|
|
'nrpe-external-master-relation-changed')
|
2014-10-29 22:30:36 -05:00
|
|
|
def update_nrpe_config():
|
2015-01-12 12:04:01 +00:00
|
|
|
# python-dbus is used by check_upstart_job
|
2014-10-29 22:30:36 -05:00
|
|
|
apt_install('python-dbus')
|
2015-01-12 12:04:01 +00:00
|
|
|
hostname = nrpe.get_nagios_hostname()
|
|
|
|
current_unit = nrpe.get_nagios_unit_name()
|
|
|
|
nrpe_setup = nrpe.NRPE(hostname=hostname)
|
|
|
|
nrpe.add_init_service_checks(nrpe_setup, services(), current_unit)
|
2014-10-29 22:30:36 -05:00
|
|
|
|
2014-11-20 12:16:45 +10:00
|
|
|
cronpath = '/etc/cron.d/nagios-netns-check'
|
2015-01-12 12:04:01 +00:00
|
|
|
cron_template = ('*/5 * * * * root '
|
|
|
|
'/usr/local/lib/nagios/plugins/check_netns.sh '
|
|
|
|
'> /var/lib/nagios/netns-check.txt\n'
|
|
|
|
)
|
2014-11-20 12:16:45 +10:00
|
|
|
f = open(cronpath, 'w')
|
|
|
|
f.write(cron_template)
|
|
|
|
f.close()
|
2015-01-12 12:04:01 +00:00
|
|
|
nrpe_setup.add_check(
|
2014-11-20 12:16:45 +10:00
|
|
|
shortname="netns",
|
|
|
|
description='Network Namespace check {%s}' % current_unit,
|
|
|
|
check_cmd='check_status_file.py -f /var/lib/nagios/netns-check.txt'
|
2016-02-23 17:55:02 +00:00
|
|
|
)
|
2015-01-12 12:04:01 +00:00
|
|
|
nrpe_setup.write()
|
2014-10-29 22:30:36 -05:00
|
|
|
|
2014-11-17 13:56:28 +10:00
|
|
|
|
2014-12-05 16:35:54 +08:00
|
|
|
@hooks.hook('ha-relation-joined')
|
|
|
|
@hooks.hook('ha-relation-changed')
|
|
|
|
def ha_relation_joined():
|
|
|
|
if config('ha-legacy-mode'):
|
2015-01-09 15:30:48 +08:00
|
|
|
log('ha-relation-changed update_legacy_ha_files')
|
|
|
|
install_legacy_ha_files()
|
2014-12-05 16:35:54 +08:00
|
|
|
cache_env_data()
|
2015-01-06 16:41:28 +00:00
|
|
|
cluster_config = get_hacluster_config(exclude_keys=['vip'])
|
2014-12-05 16:35:54 +08:00
|
|
|
resources = {
|
2014-12-23 09:36:40 +08:00
|
|
|
'res_monitor': 'ocf:canonical:NeutronAgentMon',
|
2014-12-05 16:35:54 +08:00
|
|
|
}
|
|
|
|
resource_params = {
|
2014-12-23 13:00:18 +08:00
|
|
|
'res_monitor': 'op monitor interval="60s"',
|
2014-12-05 16:35:54 +08:00
|
|
|
}
|
|
|
|
clones = {
|
2014-12-23 09:36:40 +08:00
|
|
|
'cl_monitor': 'res_monitor meta interleave="true"',
|
2014-12-05 16:35:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
relation_set(corosync_bindiface=cluster_config['ha-bindiface'],
|
|
|
|
corosync_mcastport=cluster_config['ha-mcastport'],
|
|
|
|
resources=resources,
|
|
|
|
resource_params=resource_params,
|
2014-12-13 19:30:20 +08:00
|
|
|
clones=clones)
|
2014-12-05 16:35:54 +08:00
|
|
|
|
|
|
|
|
2014-12-22 20:48:25 +08:00
|
|
|
@hooks.hook('ha-relation-departed')
|
|
|
|
def ha_relation_destroyed():
|
2015-01-06 16:41:28 +00:00
|
|
|
# If e.g. we want to upgrade to Juno and use native Neutron HA support then
|
2015-01-16 14:47:50 +08:00
|
|
|
# we need to un-corosync-cluster to enable the transition.
|
2014-12-22 20:48:25 +08:00
|
|
|
if config('ha-legacy-mode'):
|
2015-01-21 20:37:47 +08:00
|
|
|
stop_neutron_ha_monitor_daemon()
|
2014-12-22 20:48:25 +08:00
|
|
|
remove_legacy_ha_files()
|
|
|
|
|
|
|
|
|
2016-03-22 21:00:39 +00:00
|
|
|
@hooks.hook('update-status')
|
|
|
|
@harden()
|
|
|
|
def update_status():
|
|
|
|
log('Updating status.')
|
|
|
|
|
|
|
|
|
2013-07-19 10:46:25 +01:00
|
|
|
if __name__ == '__main__':
|
|
|
|
try:
|
|
|
|
hooks.execute(sys.argv)
|
|
|
|
except UnregisteredHookError as e:
|
|
|
|
log('Unknown hook {} - skipping.'.format(e))
|
2016-04-04 14:57:29 +00:00
|
|
|
assess_status(CONFIGS)
|