From b7f29b2136861b338ae7f83e9e1e535ee799a292 Mon Sep 17 00:00:00 2001 From: Takamasa Takenaka Date: Fri, 13 Jan 2023 14:33:25 -0300 Subject: [PATCH] Extract branding before horizon starts Move script to extract branding archive before horizon service starts. Closes-bug: 2002838 Test Plan: PASS: Confirm branding file applied in pre-install in SX PASS: Confirm branding file applied in post-install in SX PASS: Confirm branding file applied in pre-install in DX PASS: Confirm branding file applied in post-install in DX Signed-off-by: Takamasa Takenaka Change-Id: Ia36afd96493f1e15509607c706ca12d46466f741 --- openstack/python-horizon/centos/files/guni_config.py | 7 +------ openstack/python-horizon/centos/files/horizon.init | 3 +++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/openstack/python-horizon/centos/files/guni_config.py b/openstack/python-horizon/centos/files/guni_config.py index 5ec01afb..ec945c3c 100644 --- a/openstack/python-horizon/centos/files/guni_config.py +++ b/openstack/python-horizon/centos/files/guni_config.py @@ -1,5 +1,5 @@ """ -Copyright (c) 2022 Wind River Systems, Inc. +Copyright (c) 2022-2023 Wind River Systems, Inc. SPDX-License-Identifier: Apache-2.0 @@ -9,7 +9,6 @@ import datetime import fnmatch import os import resource -import subprocess from django.conf import settings @@ -39,10 +38,6 @@ def worker_abort(worker): pass -def when_ready(server): - subprocess.check_call(["/usr/bin/horizon-assets-compress"]) - - def post_worker_init(worker): worker.nrq = 0 worker.restart = False diff --git a/openstack/python-horizon/centos/files/horizon.init b/openstack/python-horizon/centos/files/horizon.init index 7ea93180..2b8e4fd7 100755 --- a/openstack/python-horizon/centos/files/horizon.init +++ b/openstack/python-horizon/centos/files/horizon.init @@ -59,6 +59,9 @@ start() rm -rf ${TMPUPLOADDIR} mkdir -p ${TMPUPLOADDIR} + # extract branding file before server starts + /usr/bin/horizon-assets-compress + echo -n "Starting $DESC..." start-stop-daemon --start --quiet --background --pidfile ${PIDFILE} \