kolla-ansible/docker/ceilometer/ceilometer-api/extend_start.sh
Jeffrey Zhang 7555054e72 Fix the failure of ceilometer-api container
* ceilometer-api script is removed and run ceilometer-api by using apache
* fix connection url in ceilometer.conf

Closes-Bug: #1624905
Change-Id: Iffb00ca418bab6521d61b16de4f5760aa1ae1ac7
2016-09-25 14:01:43 +00:00

18 lines
545 B
Bash

#!/bin/bash
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases
# of the KOLLA_BOOTSTRAP variable being set, including empty.
if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then
sudo -H -u ceilometer ceilometer-upgrade --skip-gnocchi-resource-types
sudo chown -R ceilometer: /var/lib/ceilometer/
exit 0
fi
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
. /etc/apache2/envvars
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
fi