diff --git a/ci/deployment-tests.sh b/ci/deployment-tests.sh index 8efedc28d..7ae9dfd1c 100755 --- a/ci/deployment-tests.sh +++ b/ci/deployment-tests.sh @@ -21,7 +21,7 @@ function failure() { if command cf-support; then sudo cf-support --yes > $$.cfsupportlog 2>&1 || cat $$.cfsupportlog else - cp /var/log/CFEngine-Install* . # ${NTECH_ROOT}/artifacts cd previously + tar cf "${NTECH_ROOT}/artifacts/CFEngine-Install.logs.tgz /var/log/CFEngine-Install*" fi rm $$.cfsupportlog } diff --git a/packaging/common/cfengine-hub/preinstall.sh b/packaging/common/cfengine-hub/preinstall.sh index 214c8820f..208954a7b 100644 --- a/packaging/common/cfengine-hub/preinstall.sh +++ b/packaging/common/cfengine-hub/preinstall.sh @@ -15,8 +15,8 @@ if is_upgrade; then fi fi -# If upgrading from a version below 3.21 that has PostgreSQL, and the data dir exists. -if is_upgrade && egrep '^3\.([6-9]|1[0-9]|2[0-3])\.' "$PREFIX/UPGRADED_FROM.txt" >/dev/null && [ -d "$PREFIX/state/pg/data" ]; then +# When PostgreSQL changes major version we need to migrate. CFEngine 3.25 uses PostgreSQL 17.0 so any version 3.24 or older needs migration. +if is_upgrade && egrep '^3\.([6-9]|1[0-9]|2[0-4])\.' "$PREFIX/UPGRADED_FROM.txt" >/dev/null && [ -d "$PREFIX/state/pg/data" ]; then alias migrating_postgres='true' else alias migrating_postgres='false'