ha, noha: Fix Horizon stale cache after install 21/69521/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Mon, 6 Jan 2020 15:39:35 +0000 (16:39 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Wed, 8 Jan 2020 13:21:23 +0000 (14:21 +0100)
Partially revert more from commit 63b712d, it turns out static files
were not always up to date after the package install, so force a
refresh.

While at it, fold some common libvirt pillar configuration.

Fixes: af1a4adf

Change-Id: I1b4c20cfa9ae08d1cd7b0b774b544b76fc73a715
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
mcp/config/states/openstack_ha
mcp/config/states/openstack_noha
mcp/reclass/classes/cluster/mcp-common-ha/openstack_compute.yml
mcp/reclass/classes/cluster/mcp-fdio-ha/openstack/compute.yml
mcp/reclass/classes/cluster/mcp-odl-ha/openstack/compute.yml
mcp/reclass/classes/cluster/mcp-ovn-ha/openstack/compute.yml
mcp/reclass/classes/cluster/mcp-ovs-dpdk-ha/openstack/compute.yml
mcp/reclass/classes/cluster/mcp-ovs-ha/openstack/compute.yml

index 4bea061..11da4e3 100755 (executable)
@@ -91,6 +91,9 @@ if ! salt -C 'I@horizon:server and *01*' --out=yaml pkg.version openstack-dashbo
   salt -I 'horizon:server' file.symlink \
     /var/lib/openstack-dashboard/static \
     /usr/share/openstack-dashboard/static
+  salt -I 'horizon:server' cmd.run "python3 /usr/share/openstack-dashboard/manage.py collectstatic --noinput"
+  salt -I 'horizon:server' cmd.run "python3 /usr/share/openstack-dashboard/manage.py compress --force"
+  salt -I 'horizon:server' service.reload apache2
 fi
 
 cluster_public_host=$(salt -C 'I@nginx:server and *01*' --out=yaml \
index 5022e6d..6b50350 100755 (executable)
@@ -66,4 +66,7 @@ if ! salt -C 'I@horizon:server and *01*' --out=yaml pkg.version openstack-dashbo
   salt -I 'horizon:server' file.symlink \
     /var/lib/openstack-dashboard/static \
     /usr/share/openstack-dashboard/static
+  salt -I 'horizon:server' cmd.run "python3 /usr/share/openstack-dashboard/manage.py collectstatic --noinput"
+  salt -I 'horizon:server' cmd.run "python3 /usr/share/openstack-dashboard/manage.py compress --force"
+  salt -I 'horizon:server' service.reload apache2
 fi
index 70a2ba0..411fcee 100644 (file)
@@ -84,6 +84,8 @@ parameters:
       report_interval: 120
   nova:
     compute:
+      libvirt_service: libvirtd
+      libvirt_bin: /etc/default/libvirtd
       disk_cachemodes: file=directsync,block=none
       preallocate_images: space
       heal_instance_info_cache_interval: 300
index 4b718ab..ffc3b53 100644 (file)
@@ -10,8 +10,3 @@ classes:
   - cluster.mcp-common-ha.openstack_compute
   - cluster.mcp-fdio-ha.openstack.compute_pdf
   - cluster.mcp-fdio-ha.infra
-parameters:
-  nova:
-    compute:
-      libvirt_service: libvirtd
-      libvirt_bin: /etc/default/libvirtd
index 0846be6..3a49a69 100644 (file)
@@ -12,10 +12,6 @@ classes:
   - cluster.mcp-odl-ha.openstack.compute_pdf
   - cluster.mcp-odl-ha.infra
 parameters:
-  nova:
-    compute:
-      libvirt_service: libvirtd
-      libvirt_bin: /etc/default/libvirtd
   neutron:
     gateway:
       agent_mode: ${_param:neutron_gateway_agent_mode}
index 658f8fa..9af431b 100644 (file)
@@ -12,10 +12,6 @@ classes:
   - cluster.mcp-ovn-ha.openstack.compute_pdf
   - cluster.mcp-ovn-ha.infra
 parameters:
-  nova:
-    compute:
-      libvirt_service: libvirtd
-      libvirt_bin: /etc/default/libvirtd
   neutron:
     gateway:
       ~message_queue: ~
index 106a2a7..52e63df 100644 (file)
@@ -18,10 +18,6 @@ parameters:
       vhost_socket_dir: ${_param:compute_ovs_vhost_socket_dir}
       backend:
         tenant_vlan_range: ${_param:neutron_tenant_vlan_range}
-  nova:
-    compute:
-      libvirt_service: libvirtd
-      libvirt_bin: /etc/default/libvirtd
   linux:
     system:
       kernel:
index 1e157cf..2507f2b 100644 (file)
@@ -10,8 +10,3 @@ classes:
   - cluster.mcp-common-ha.openstack_compute
   - cluster.mcp-ovs-ha.openstack.compute_pdf
   - cluster.mcp-ovs-ha.infra
-parameters:
-  nova:
-    compute:
-      libvirt_service: libvirtd
-      libvirt_bin: /etc/default/libvirtd