commit | 6fcdc08497664552a1c5b4fe5a31beb9aefa6387 | [log] [tgz] |
---|---|---|
author | He Gao <hegao@google.com> | Wed Jun 01 00:58:52 2022 +0000 |
committer | He Gao <hegao@google.com> | Wed Jun 08 20:40:04 2022 +0000 |
tree | 4fe57802142c87ecd737b9ed13ee492bf4015420 | |
parent | f01c9511736118074654e3ff3ca810058e3c46f0 [diff] |
cos-customizer: Add flag `-enable-cleanup` to delete old VMs When a cloudbuild workflow is forcefully cancelled, COS-Customizer cannot remove the VM it created. This can result in resource leak. This CL adds a flag `-enable-cleaup` to automatically delete VMs with label `cos-customizer-cleanup`, older than 1 day in the target project and zone. All the VMs created by customizer will have that label. BUG=b/131439193 TEST=unit tests and running the new cos-customizer to delete an old VM with the target label. Change-Id: Ie572d15687402294e5cc63858fe7acb66b17ec94 Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/33311 Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com> Tested-by: He Gao <hegao@google.com> Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.
See CONTRIBUTING.md for how to contribute.