kolla-ansible/docker/gnocchi/gnocchi-api/extend_start.sh
zhubingbing 55b184a865 repair gnocchi dockerfile
1. Add the missing packages in the gnocchi image
   packages: lz4 sqlalchemy_utils gnocchiclient

2. gnocchi config path is error
   gnocchi config path is /gnocchi/etc/gnocchi

3. gnocchi sync db command is error
   sync db command is: gnocchi-upgrade
   Reference link: http://docs.openstack.org/developer/gnocchi/install.html

4. gnocchi log directory is /var/log/kolla/gnocchi

5. Add gnocchi-api running as a mod_wsgi
   Reference link: http://docs.openstack.org/developer/gnocchi/running.html

6. Add gnocchi sudoers file

Closes-Bug: #1607332

Change-Id: Id3aded82706ffd204373c97a020980d0d9b72663
2016-09-01 08:55:18 +00:00

19 lines
649 B
Bash

#!/bin/bash
# NOTE(pbourke): httpd will not clean up after itself in some cases which
# results in the container not being able to restart. (bug #1489676, 1557036)
if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then
# Loading Apache2 ENV variables
source /etc/apache2/envvars
rm -rf /var/run/apache2/*
else
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
fi
# 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
gnocchi-upgrade --logfile /var/log/kolla/gnocchi/gnocchi-upgrade.log
exit 0
fi