From 7710c918c575ff296fdd4ae003af746e3e419801 Mon Sep 17 00:00:00 2001 From: Div Arora Date: Wed, 2 Apr 2025 15:03:10 +0800 Subject: [PATCH] fix: change qemu build to oriole The array we grab the version from was re-ordered as PG17 non-oriole was introduced. A more robust mechanism can be added later but this array is rarely adjusted, so this is likely good enough for now. Also moves up some fixes from the init-scripts, and removes Kong from the qemu artifact. --- .github/workflows/qemu-image-build.yml | 2 +- ansible/tasks/setup-postgres.yml | 2 +- ebssurrogate/scripts/qemu-bootstrap-nix.sh | 9 +++++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/qemu-image-build.yml b/.github/workflows/qemu-image-build.yml index 373026425..8d929ee55 100644 --- a/.github/workflows/qemu-image-build.yml +++ b/.github/workflows/qemu-image-build.yml @@ -26,7 +26,7 @@ jobs: - name: Set PostgreSQL versions - only builds pg17 atm id: set-versions run: | - VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[1]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]') + VERSIONS=$(nix run nixpkgs#yq -- '.postgres_major[2]' ansible/vars.yml | nix run nixpkgs#jq -- -R -s -c 'split("\n")[:-1]') echo "postgres_versions=$VERSIONS" >> $GITHUB_OUTPUT build: diff --git a/ansible/tasks/setup-postgres.yml b/ansible/tasks/setup-postgres.yml index 349c0d517..a1b7e6c7f 100644 --- a/ansible/tasks/setup-postgres.yml +++ b/ansible/tasks/setup-postgres.yml @@ -255,7 +255,7 @@ LOCALE_ARCHIVE: /usr/lib/locale/locale-archive vars: ansible_command_timeout: 60 - when: stage2_nix and is_psql_oriole or is_psql_17 + when: stage2_nix and (is_psql_oriole or is_psql_17) - name: copy PG systemd unit template: diff --git a/ebssurrogate/scripts/qemu-bootstrap-nix.sh b/ebssurrogate/scripts/qemu-bootstrap-nix.sh index 1d7a172cf..5ec8c70b2 100755 --- a/ebssurrogate/scripts/qemu-bootstrap-nix.sh +++ b/ebssurrogate/scripts/qemu-bootstrap-nix.sh @@ -106,7 +106,7 @@ EOF function clean_legacy_things { # removes things that are bundled for legacy reasons, but we can start without for our newer artifacts - apt-get unmark zlib1g* # TODO (darora): need to make sure that there aren't other things that still need this + apt-mark auto zlib1g* # TODO (darora): need to make sure that there aren't other things that still need this apt-get -y purge kong apt-get autoremove -y } @@ -135,7 +135,12 @@ function clean_system { mkdir /var/log/sysstat chown -R postgres:postgres /var/log/wal-g - chmod -R 0300 /var/log/wal-g + # moving up fixes from init scripts + chmod -R 0310 /var/log/wal-g + chmod 0340 /var/log/wal-g/pitr.log + + chmod 0600 /etc/vector/vector.yaml + chown vector:vector /etc/vector/vector.yaml # # audit logs directory for apparmor mkdir /var/log/audit