#!/bin/bash
set -eux

# this ensures that neutron-l3-agent and neutron-metadata-agent services
# will be monitored by pacemaker on all nodes.
# Because allow_automatic_l3agent_failover is enabled, we want
# to make sure that if l3-agent service fails it's started again by
# pacemaker. If outage is longer and l3 routers are moved to other
# node meantime, l3-agent will clean up routers on local node when
# started again.
# TODO: it would be cleaner to do service restart above by pacemaker
# command, but it's difficult to restart service on single node only
pcmk-service-create -c -n neutron-metadata-agent
pcmk-service-create -c -n neutron-l3-agent
