From 0c1e4891f87a166f45e538ec3816c87ba866057d Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Fri, 25 Oct 2024 15:20:47 +0300 Subject: [PATCH 1/4] chore: reserve a fixed amount of blocks for the data volume --- common-nix.vars.pkr.hcl | 2 +- ebssurrogate/scripts/surrogate-bootstrap-nix.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/common-nix.vars.pkr.hcl b/common-nix.vars.pkr.hcl index eafb1e602..6a8f808f0 100644 --- a/common-nix.vars.pkr.hcl +++ b/common-nix.vars.pkr.hcl @@ -1 +1 @@ -postgres-version = "15.6.1.135" +postgres-version = "15.6.1.136-rc1" diff --git a/ebssurrogate/scripts/surrogate-bootstrap-nix.sh b/ebssurrogate/scripts/surrogate-bootstrap-nix.sh index 45cbc8ac6..3b0bb93c8 100755 --- a/ebssurrogate/scripts/surrogate-bootstrap-nix.sh +++ b/ebssurrogate/scripts/surrogate-bootstrap-nix.sh @@ -110,6 +110,11 @@ function format_and_mount_rootfs { fi mkfs.ext4 /dev/xvdh + + # Explicitly reserving 100MiB worth of blocks for the data volume + RESERVED_DATA_VOLUME_BLOCK_COUNT=$((100 * 1024 * 1024 / 4096)) + tune2fs -r $RESERVED_DATA_VOLUME_BLOCK_COUNT /dev/xvdh + mkdir -p /mnt/data mount -o defaults,discard /dev/xvdh /mnt/data } From 24cf5d782a2bc6f6a94b195bf76dd54eaa2c32e9 Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Fri, 25 Oct 2024 15:45:16 +0300 Subject: [PATCH 2/4] chore: also remove ansible package + ppa --- common-nix.vars.pkr.hcl | 2 +- scripts/90-cleanup.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common-nix.vars.pkr.hcl b/common-nix.vars.pkr.hcl index 6a8f808f0..23c9aba12 100644 --- a/common-nix.vars.pkr.hcl +++ b/common-nix.vars.pkr.hcl @@ -1 +1 @@ -postgres-version = "15.6.1.136-rc1" +postgres-version = "15.6.1.136-rc2" diff --git a/scripts/90-cleanup.sh b/scripts/90-cleanup.sh index ebbf49080..13149971a 100644 --- a/scripts/90-cleanup.sh +++ b/scripts/90-cleanup.sh @@ -36,7 +36,10 @@ elif [ -n "$(command -v apt-get)" ]; then libicu-dev \ libcgal-dev \ libgcc-9-dev \ - libgcc-8-dev + libgcc-8-dev \ + ansible + + add-apt-repository --yes --remove ppa:ansible/ansible source /etc/os-release apt-get -y remove --purge linux-headers-5.11.0-1021-aws From 7a7c42aaf8bf7d271dbeec67d6dcbc757dda3bb1 Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Fri, 25 Oct 2024 16:29:39 +0300 Subject: [PATCH 3/4] chore: bump version --- common-nix.vars.pkr.hcl | 2 +- scripts/90-cleanup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common-nix.vars.pkr.hcl b/common-nix.vars.pkr.hcl index 23c9aba12..adcb6c8f3 100644 --- a/common-nix.vars.pkr.hcl +++ b/common-nix.vars.pkr.hcl @@ -1 +1 @@ -postgres-version = "15.6.1.136-rc2" +postgres-version = "15.6.1.136" diff --git a/scripts/90-cleanup.sh b/scripts/90-cleanup.sh index 13149971a..f2e19686d 100644 --- a/scripts/90-cleanup.sh +++ b/scripts/90-cleanup.sh @@ -37,7 +37,7 @@ elif [ -n "$(command -v apt-get)" ]; then libcgal-dev \ libgcc-9-dev \ libgcc-8-dev \ - ansible + ansible add-apt-repository --yes --remove ppa:ansible/ansible From 872e18c0e09db9b96ddaf590dc9e7e9f42ceff9d Mon Sep 17 00:00:00 2001 From: Paul Cioanca Date: Fri, 25 Oct 2024 16:33:39 +0300 Subject: [PATCH 4/4] chore: cleanup packages for stage 2 as well --- scripts/nix-provision.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/nix-provision.sh b/scripts/nix-provision.sh index 223e84926..1c7acbd58 100644 --- a/scripts/nix-provision.sh +++ b/scripts/nix-provision.sh @@ -38,8 +38,12 @@ EOF $ARGS } +function cleanup_packages { + apt-get -y remove --purge ansible + add-apt-repository --yes --remove ppa:ansible/ansible +} install_packages install_nix execute_stage2_playbook - +cleanup_packages