From 517649084529de5dbe270be95c71ba9bc79acfe3 Mon Sep 17 00:00:00 2001 From: Dmitrii Shcherbakov Date: Thu, 2 Sep 2021 13:54:22 +0300 Subject: [PATCH] Remove legacy post-refresh hook code The versions in question have been outdated for a long time and nowadays those code paths cause unnecessary overriding of calculated config values with the default ones. Closes-Bug: #1942433 Change-Id: I1393e8c5197cdb8ea83ad2a4c41e0bc5a219c509 --- snap/hooks/post-refresh | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/snap/hooks/post-refresh b/snap/hooks/post-refresh index ff75d4a..9be412a 100755 --- a/snap/hooks/post-refresh +++ b/snap/hooks/post-refresh @@ -4,35 +4,6 @@ set -ex # Refresh the TEMPLATE.qemu apparmor profile and abstractions. rsync -rh $SNAP/etc/apparmor.d $SNAP_COMMON/etc -if [ -z "$(snapctl get config)" ]; then - # [2019-11-15] Handle build 171 (beta) -> 182 - - # We are upgrading from a version of the snap from before we put all - # config values under a config tree. Set the default values now (the - # old values were not documented, and we assume that they were not - # set). - set-default-config.py - - # Make a place for our horizon config overrides to live. We piggy - # back on the above check, because the changes were made - # concurrently. - mkdir -p ${SNAP_COMMON}/etc/horizon/local_settings.d -fi - -# Add default ports for mysql, rabbit and dashboard services. -# [2019-11-21] build 171 (beta) -> master -if [ -z "$(snapctl get config.network.ports.dashboard)" ]; then - snapctl set config.network.ports.dashboard=443 -fi - -if [ -z "$(snapctl get config.network.ports.mysql)" ]; then - snapctl set config.network.ports.mysql=3306 -fi - -if [ -z "$(snapctl get config.network.ports.rabbit)" ]; then - snapctl set config.network.ports.rabbit=5672 -fi - mkdir -p ${SNAP_COMMON}/log/libvirt/qemu mkdir -p /run/lock/snap.$SNAP_INSTANCE_NAME