kolla-ansible/docker/horizon/extend_start.sh
Paul Bourke bac1235ed2 Clean up horizon httpd pid files for RPM distros
(apply same fix that we did for keystone, to horizon)

In some cases we're seeing httpd not cleaning up properly after itself,
which results in the horizon container failing to restart. This is
confirmed to happen on rpm based distros, but have not had any reports
on Ubuntu.

Change-Id: I8ece6da1a8a1180730d68be0d129a656ddcede07
Closes-Bug: #1515214
backport: liberty
2015-11-11 11:46:24 +00:00

15 lines
495 B
Bash

#!/bin/bash
if [[ "${KOLLA_BASE_DISTRO}" == "ubuntu" || \
"${KOLLA_BASE_DISTRO}" == "debian" ]]; then
# Loading Apache2 ENV variables
source /etc/apache2/envvars
fi
# NOTE(pbourke): httpd will not clean up after itself in some cases which
# results in the container not being able to restart. Unconfirmed if this
# happens on Ubuntu. (bug #1489676)
if [[ "${KOLLA_BASE_DISTRO}" =~ fedora|centos|oraclelinux|rhel ]]; then
rm -rf /var/run/httpd/* /run/httpd/* /tmp/httpd*
fi