Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Orphan VMs job should remove GCE "packer" VMs and disks #377

Open
cevich opened this issue Aug 14, 2024 · 0 comments
Open

RFE: Orphan VMs job should remove GCE "packer" VMs and disks #377

cevich opened this issue Aug 14, 2024 · 0 comments

Comments

@cevich
Copy link
Member

cevich commented Aug 14, 2024

These unfortunately get left behind sometimes if a PR is force-pushed to or build tasks canceled (for whatever reason). There's no easy way (I know of) to deal with this gracefully within Cirrus-CI (i.e. w/in a script). Suggest:

  1. Orphan VMs job already identifies VMs running for 3+ days.
  2. From the list of VMs, if any are named "packer-*" remember the name, then delete them.
  3. Enter a polling loop, confirming each "packer-" VM is gone (important).
  4. Loop over GCE persistent disks beginning with the name "packer-" (recorded in step 2). Delete them (note: this will fail if the VM still exists).

Ref: https://github.com/containers/automation_images/blob/main/orphanvms/_gce

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

No branches or pull requests

1 participant