#!/bin/bash
#---------------------
# Testing nova-daemons
#---------------------
set -e
DAEMONS=('nova-conductor' 'nova-cert' 'nova-scheduler' 'nova-network' \
    'nova-console' 'nova-consoleauth')

for daemon in "${DAEMONS[@]}"; do
    if pidof -x $daemon > /dev/null; then
        echo "OK"
    else
        echo "ERROR: ${daemon} IS NOT RUNNING"
        exit 1
    fi
done
