Skip to content

fix(ami): bump packer build volume from 16GB to 20GB (WIP, doesn't fix root cause) - #2339

Closed
brainrake wants to merge 3 commits into
developfrom
fix/ami-build-volume-20gb
Closed

fix(ami): bump packer build volume from 16GB to 20GB (WIP, doesn't fix root cause)#2339
brainrake wants to merge 3 commits into
developfrom
fix/ami-build-volume-20gb

Conversation

@brainrake

@brainrake brainrake commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • `test-ami-nix (15, amd64/arm64)` intermittently fails with `OSError: [Errno 28] No space left on device`, reproduced on two unrelated PRs (fix(nix): remove pinned Go version in supascan/gatekeeper #2329, fix(nix): pin cgal to 6.0.2 to unbreak sfcgal/postgis #2332).
  • Attempt 1: bumped `/dev/xvdc` (scratch build-vol) 16GB->20GB. Did not fix it - log analysis showed the actual ENOSPC happens inside ansible's own Python logging module flushing `/tmp/ansible.log`, which lives on a different disk than xvdc/xvdf/xvdh.
  • Attempt 2 (reverted): added an explicit `/dev/sda1` mapping sized to 16GB, theorizing it was the builder instance's own separate boot root. This was wrong and caused a regression - on this HVM AMI, `/dev/sda1` aliases to the same device as `ami_root_device`'s `/dev/xvda`, so it grew the output AMI's root snapshot to 16GB, breaking test-ami-nix for every Postgres version (including 17/orioledb-17, previously passing) since the test harness launches instances with a hardcoded 8GB root that can no longer satisfy that snapshot.
  • Reverted attempt 2. Currently only the harmless-but-ineffective xvdc bump remains.

Status: root cause still open

Need to identify which actual EBS volume/device `/tmp` (on the builder instance, pre-chroot) resolves to, without touching whatever device the final AMI's root snapshot is derived from. Suggest not merging until that's nailed down - happy to hand off details.

Test plan

  • `test-ami-nix (15, amd64)` and `(15, arm64)` pass
  • `test-ami-nix (17, ...)` and `(orioledb-17, ...)` still pass (no regression)

test-ami-nix (15, amd64/arm64) has been intermittently failing with
"No space left on device" during StepProvision, reproduced on unrelated
PRs (#2329, #2332) while PG17/orioledb-17 build fine on the same 16GB
build volume - the PG15 build closure sits close enough to that limit
to tip over depending on small variance in build/cache state.
…urrogate/build volumes

The prior 16->20GB bump targeted /dev/xvdc (the scratch build-vol) and
left the actual constraint untouched: the amazon-ebssurrogate builder
instance boots from its own root disk (source Ubuntu AMI's default
/dev/sda1), which is where ansible/apt provisioning actually runs before
the chroot into the surrogate root at /mnt. Confirmed via CI logs -
"No space left on device" was raised inside ansible's own Python logging
flush while writing /tmp/ansible.log, unrelated to xvdf/xvdh/xvdc sizing.

Adds an explicit launch_block_device_mappings entry for /dev/sda1.
@brainrake brainrake changed the title fix(ami): bump packer build volume from 16GB to 20GB fix(ami): size builder instance's root volume (/dev/sda1) Aug 1, 2026
On this HVM AMI, /dev/sda1 aliases to the same underlying root device
as ami_root_device's /dev/xvda, so sizing it to 16GB actually grew the
*output* AMI's root snapshot to 16GB - breaking test-ami-nix for every
Postgres version (including 17/orioledb-17, which were passing before)
since the test harness launches instances with an 8GB root, which can
no longer satisfy that snapshot: "Volume of size 8GB is smaller than
snapshot ... expect size >= 16GB".

Back to just the xvdc bump (16->20GB) from the prior commit, which is
at least harmless even though it didn't fix the original ENOSPC error.
Root cause is still open: ansible's own log flush hits ENOSPC on the
builder instance's own root during provisioning, and that disk isn't
one of the three currently-configured volumes (xvdf/xvdh/xvdc).
@brainrake brainrake changed the title fix(ami): size builder instance's root volume (/dev/sda1) fix(ami): bump packer build volume from 16GB to 20GB (WIP, doesn't fix root cause) Aug 1, 2026
@brainrake

Copy link
Copy Markdown
Collaborator Author

Closing as WIP - the xvdc bump here is harmless but doesn't fix the actual root cause (see PR description for the two failed attempts, including a regression that was reverted).

Filed the investigation findings as PSQL-1570 for follow-up.

@brainrake brainrake closed this Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant