Skip to content

Orphaned 50 GiB PVC in rustdev (~$4/mo) — needs an owner decision, it is dev Postgres data #1102

Closed

Description

@athvin

Found while auditing detached EBS volumes for #1097. Needs an owner decision,
because it is someone's data
— do not delete it on a sweep.

What it is

vol-019a2ec8004a2a8ab, 50 GiB gp3, created 2026-10-14, detached. It backs:

rustdev/data-er-postgres-0  ->  pvc-b4885828-3659-4e2a-8609-3b76f36e3b36  (Bound, 33d)

Why it is genuinely orphaned, not suspended

This is the discriminator, and it is what separates it from the DuckFleet volume
in the same audit:

  • There is no StatefulSet in rustdev at all — only a web-api Deployment.
    So the er-postgres StatefulSet was deleted, and deleting a StatefulSet does
    not delete the PVCs its volumeClaimTemplates created. The PVC outlived
    its owner.
  • Nothing mounts it. The only pod in the namespace mounts er-efs, not this
    claim.
  • By contrast duckfleet-dev/data-duckfleet-postgres-0 does still have its
    StatefulSet, at replicas: 0 — deliberately suspended, data intentionally
    retained. That one must be left alone.

So nothing will ever remount this volume as things stand. It is ~$4.00/month
(50 GiB x $0.08/GB-month) for a Postgres data directory no workload can reach.

The decision

The StorageClass is reclaimPolicy: Delete, so kubectl -n rustdev delete pvc data-er-postgres-0 deletes the PV and the EBS volume with it. That is
irreversible and it is a development Postgres someone may still want.

Needed from the owner of rustdev: either

  • confirm the data is dead → delete the PVC, or
  • snapshot it first (aws ec2 create-snapshot --volume-id vol-019a2ec8004a2a8ab,
    ~$0.25/month at $0.05/GB-month for a full 50 GiB, less in practice since
    snapshots are incremental and compressed) and then delete, or
  • keep it, and accept the $4/month as the price of not losing it.

$4/month is small enough that "keep it" is a perfectly reasonable answer. The
reason this is a ticket rather than an action is that nothing distinguishes
"orphaned" from "someone's data" without asking.

Related

rustdev is also broken for an unrelated reason — its web-api cannot pull a
pruned ECR image. If that namespace is being retired anyway, both tickets close
together.

Activity

  1. added
    followup
    on Nov 17, 2026
  2. athvin commented on Nov 17, 2026

    @athvin
    OwnerAuthor

    Done — owner chose full teardown rather than deleting the PVC alone, which was the better call: the namespace was 24 days stale and could not restart anyway.

    What settled it

    The PVC was not suspended data. er-dev-namespace/templates/bootstrap.yaml records that the in-cluster Postgres was architecturally replaced:

    Database-per-developer on the shared Aurora cluster … Replaces the old in-cluster er-postgres StatefulSet (git history keeps it).

    So nothing would ever remount data-er-postgres-0 — it was migration debris, and the data in it was superseded when dev moved to Aurora. That is the discriminator against duckfleet-dev/data-duckfleet-postgres-0, which keeps its StatefulSet at replicas: 0 and is genuinely suspended. Scope checked cluster-wide: rustdev was the only namespace in this state.

    Supporting evidence that it was abandoned: deployment last updated 2026-10-24 (24 days), pinned to er-api:4728ccdd… which ECR had already expired, so the pod had been Init:ImagePullBackOff and unrecoverable without a redeploy.

    Executed

    make dev-down DEV=rustdev, exit 0. Verified after, not inferred from the log:

    kubectl get ns rustdev            -> NotFound
    kubectl get pvc -A                -> only ci/er-efs (5Gi) and duckfleet-dev/data-duckfleet-postgres-0 (10Gi)
    aws secretsmanager list-secrets   -> no er/dev/rustdev/* remain
    aws ec2 describe-volumes          -> 10 GiB total, was 60 GiB
    kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=Succeeded -> none
    

    The S3 lake prefix s3://er-dev-lake-797781631727/dev/rustdev/ held 0 objects, checked before running, so no lake data was destroyed. The three deleted secrets were credentials that make dev-up regenerates.

    Saves the ~$4/month this ticket was opened for, plus rustdev's 5 GiB EFS PVC and a daily er-tenant-drift cronjob that had been running against a broken namespace.

    Two residues, deliberately left

    1. EFS data under /rustdev on fs-06e1100cb147f6e6a remains until pruned. dev_env.sh down deletes the access point and says so explicitly; it does not prune the directory.
    2. The erctl_rustdev database on the shared dev Aurora is not dropped by dev-down — the bootstrap Job creates it and nothing removes it. Harmless (an empty database on a cluster whose floor is already paid) but it is a leftover, and the same will be true of every future dev-down.

    Neither is worth its own ticket at this size; recorded here so the next teardown knows.

    A finding worth keeping

    Nothing else in the cluster was at risk from the ECR expiry, and the reason is pinning style: every workload in ci and app is pinned by digest and all three digests resolve, while rustdev was pinned by tag and both tags were gone. Digest pinning is what made the deploy path immune to the retention window that #1101 widened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    followup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions