From 98ba528c5d60075b8583e3533cd777e0e24a7ea5 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 6 Sep 2018 18:49:29 +0200 Subject: Revert "[Horizon] Drop the obsolete Horizon workaround" This reverts commit e6685124258ed9d1237acf9d8b383c07f1397f93. Change-Id: If9ebf7ff149ce0dcf3976e99863e88e5a7ef2c74 Signed-off-by: Alexandru Avadanii --- mcp/config/states/openstack_ha | 12 ++++++++++++ mcp/config/states/openstack_noha | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index 8cdd64baf..75b2dd0cf 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -65,6 +65,18 @@ salt -I 'ceilometer:agent' state.sls ceilometer salt -I 'horizon:server' state.sls apache,horizon salt -I 'nginx:server' state.sls nginx +# workaround for Ubuntu Pike Horizon missing css, FUEL-324 +if ! salt -C 'I@horizon:server and *01*' --out=yaml pkg.version openstack-dashboard | grep -qE ':.*mcp'; then + salt -I 'horizon:server' file.symlink \ + /var/lib/openstack-dashboard/static \ + /usr/share/openstack-dashboard/static + salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput" + salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force" + salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \ + "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]" + salt -I 'horizon:server' service.reload apache2 +fi + cluster_public_host=$(salt -C 'I@nginx:server and *01*' --out=yaml \ pillar.get _param:cluster_public_host | awk '{print $2; exit}') dashboard_host=$(salt -C 'I@nginx:server and *01*' --out=yaml cp.push \ diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha index 4d716e6a7..b20e965ba 100755 --- a/mcp/config/states/openstack_noha +++ b/mcp/config/states/openstack_noha @@ -52,3 +52,13 @@ salt -I 'ceilometer:server' state.sls ceilometer salt -I 'ceilometer:agent' state.sls ceilometer salt -I 'horizon:server' state.sls apache,horizon + +# workaround for the pike horizon is missing css, FUEL-324 +salt -I 'horizon:server' file.symlink \ + /var/lib/openstack-dashboard/static \ + /usr/share/openstack-dashboard/static +salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput" +salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force" +salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \ + "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]" +salt -I 'horizon:server' service.reload apache2 -- cgit