Skip to content

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

@cevich

Description

@cevich

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions