From: Lucas Di Pentima Date: Thu, 14 Mar 2024 19:33:33 +0000 (-0300) Subject: 21165: Adds extra state to uninstall wb1's package from workbench node. X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/44f003133c3c8eec7baca6999c199b7fc1646fdc 21165: Adds extra state to uninstall wb1's package from workbench node. I opted for specifically uninstalling the package instead of adding the arvados.workbench.package.clean state, because that state also removes packages that might be needed for other services. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/tools/salt-install/config_examples/multi_host/aws/states/workbench1_uninstall.sls b/tools/salt-install/config_examples/multi_host/aws/states/workbench1_uninstall.sls new file mode 100644 index 0000000000..02ac0af640 --- /dev/null +++ b/tools/salt-install/config_examples/multi_host/aws/states/workbench1_uninstall.sls @@ -0,0 +1,12 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +{%- set curr_tpldir = tpldir %} +{%- set tpldir = 'arvados' %} +{%- from "arvados/map.jinja" import arvados with context %} +{%- set tpldir = curr_tpldir %} + +workbench1_pkg_removed: + pkg.removed: + - name: {{ arvados.workbench.pkg.name }} \ No newline at end of file diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh index bb95b2702a..1c3a37fd53 100755 --- a/tools/salt-install/provision.sh +++ b/tools/salt-install/provision.sh @@ -915,6 +915,10 @@ else if [[ "${R}" != "webshell" && "${R}" != "workbench" ]]; then grep -q "arvados.${R}" ${STATES_TOP} || echo " - arvados.${R}" >> ${STATES_TOP} fi + # Make sure wb1's package get uninstalled + if [[ "${R}" == "workbench" ]]; then + grep -q "workbench1_uninstall" ${STATES_TOP} || echo " - extra.workbench1_uninstall" >> ${STATES_TOP} + fi ### Pillars ### grep -q "nginx_${R}_configuration" ${PILLARS_TOP} || echo " - nginx_${R}_configuration" >> ${PILLARS_TOP}