From af6fd6d9d65c7bf5e47bbc01e7d0dbf24df9121d Mon Sep 17 00:00:00 2001 From: Eduardo Gonzalez Date: Mon, 24 Jul 2017 18:03:02 +0200 Subject: [PATCH] Fix horizon start errors for binary images In kolla we set SECRET_KEY from passwords.yml Ubuntu and source images deploy right because they dont remove defaults secret_key file but really is ununsed. [1] RDO removes the import and the default key [2] file making horizon container fail to start due cannot stat . Symlink to local_settings is only needed for source images, binary packages already do that symlink during package install[3] [1]https://github.com/openstack/horizon/blob/master/openstack_dashboard/local/local_settings.py.example#L149 [2]https://github.com/rdo-packages/horizon-distgit/blob/rpm-master/python-django-horizon.spec#L354 [3] https://github.com/rdo-packages/horizon-distgit/blob/rpm-master/python-django-horizon.spec#L319 Change-Id: Idfb0a18a95a1a48a4c3323385fd00485699f3fb6 --- docker/horizon/extend_start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh index 8459eb409c..418bc40ba3 100644 --- a/docker/horizon/extend_start.sh +++ b/docker/horizon/extend_start.sh @@ -10,7 +10,7 @@ elif [[ ${KOLLA_INSTALL_TYPE} == "source" ]]; then SITE_PACKAGES="/var/lib/kolla/venv/lib/python2.7/site-packages" fi -if [[ ! -f ${SITE_PACKAGES}/openstack_dashboard/local/local_settings.py ]]; then +if [[ ${KOLLA_INSTALL_TYPE} == "source" ]] && [[ ! -f ${SITE_PACKAGES}/openstack_dashboard/local/local_settings.py ]]; then ln -s /etc/openstack-dashboard/local_settings \ ${SITE_PACKAGES}/openstack_dashboard/local/local_settings.py fi @@ -266,6 +266,6 @@ if [[ $(stat -c %a /var/log/kolla/horizon) != "755" ]]; then chmod 755 /var/log/kolla/horizon fi -if [[ $(stat -c %U ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store) != "horizon" ]]; then +if [[ -f ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store ]] && [[ $(stat -c %U ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store) != "horizon" ]]; then chown horizon ${SITE_PACKAGES}/openstack_dashboard/local/.secret_key_store fi