Fix Horizon asset compression not happening on redeploy

A recent change to kolla-ansible (a729dcc4) bind mounts /tmp from the
host to handle uploading of larger images. Unfortunately this is also
where we keep the state file for horizon which controls whether assets
need to be recompressed (.local_settings.md5sum.txt). This means it is
left over on destroy and causes issues with CSS / assets on redeploy.

Change the location of this file to
/var/lib/kolla/.local_settings.md5sum.txt so it is cleaned up correctly
along with the container.

Change-Id: Icfc71266cabedc2c1a3d30590cada3f774bc0d2c
Closes-Bug: #1721281
This commit is contained in:
Paul Bourke authored and Duong Ha-Quang committed 2017-10-17 07:22:12 +00:00
1 parent d71c25caa4
commit cad0a1e697
1 file changed
+1 -1
+1 -1
View File
@@ -253,7 +253,7 @@ fi
# NOTE(jeffrey4l): The local_settings file affect django-compress
# behavior, so re-generate the compressed javascript and css if it
# is changed
MD5SUM_TXT_PATH="/tmp/.local_settings.md5sum.txt"
MD5SUM_TXT_PATH="/var/lib/kolla/.local_settings.md5sum.txt"
if [[ ! -f ${MD5SUM_TXT_PATH} || $(md5sum -c --status ${MD5SUM_TXT_PATH};echo $?) != 0 || ${FORCE_GENERATE} == "yes" ]]; then
md5sum /etc/openstack-dashboard/local_settings > ${MD5SUM_TXT_PATH}
if [[ "${KOLLA_INSTALL_TYPE}" == "binary" ]]; then