Tomáš Hozza
3db1f88f84
internal/awscloud: use AWS.DeleteEC2Image() from osbuild/images
...
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-13 09:36:58 +02:00
Tomáš Hozza
e7d8431489
internal/awscloud: use AWS.TerminateInstancesEC2() from osbuild/images
...
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-13 09:36:58 +02:00
Lukas Zapletal
0e5d8a94f2
cmd: use log in service-maintenance
2025-05-12 15:20:16 +02:00
Florian Schüller
153bcadf2d
osbuild-service-maintenance/aws: merge errors
...
Collect and merge errors, instead of
nesting errors.
In this case we want to continue execution if only one
cleanup fails.
2024-12-10 11:43:51 +01:00
Florian Schüller
87ef1527fc
osbuild-service-maintenance/aws: avoid error on empty list
...
Passing an empty list to `TerminateInstances` causes an
error message, which is not necessary, as there is
nothing to terminate.
2024-12-10 11:43:51 +01:00
Florian Schüller
65b7ee65b2
osbuild-service-maintenance: implement removal of launch templates
...
Launch templates of instances that are terminated should be removed.
HMS-3632
2024-12-10 11:43:51 +01:00
Florian Schüller
a96ea533c0
osbuild-service-maintenance: implement removal of security groups
...
Security groups of instances that are terminated should be removed.
HMS-3632
2024-12-10 11:43:51 +01:00
Florian Schüller
7ebe266d3c
osbuild-service-maintenance: implement removal on invalid parent
...
Add a safeguard to ensure secure instances without valid
parent instances are terminated, as they are unnecessary to retain.
Typically, the parent does not exist if the secure instance is
older than 2 hours, but this check provides additional validation.
HMS-3632
2024-12-10 11:43:51 +01:00
Florian Schüller
a7119a4d0f
osbuild-service-maintenance/aws: support aws credential file
...
Support running the maintenance locally with a valid
`~/aws/credentials` file. HMS-3632
2024-12-10 11:43:51 +01:00
Sanne Raymaekers
c1b67440c4
cmd/osbuild-service-maintenance: respect dry run
...
Respect dry run when terminating leftover SIs.
2024-10-28 10:59:25 +01:00
Sanne Raymaekers
661f39cbb9
cmd/osbuild-service-maintenance: add test for filtering SIs
2024-10-23 10:32:57 +02:00
Sanne Raymaekers
04a5ca6965
cmd/osbuild-service-maintenance: clean up secure instances
...
Now and then there are leftover secure instances, probably when worker
instances get terminated during builds, this is possible in ASGs. 2
hours as a cutoff should be enough, since the build times out after 60
minutes, and fetching the output archive after 30 minutes, so that
leaves 30 minutes for booting and connection.
2024-10-23 10:32:57 +02:00
Sanne Raymaekers
c87cbe0cbc
osbuild-service-maintenance: adapt to aws sdk v2
2024-08-20 15:32:40 +02:00
Sanne Raymaekers
2e3dd16220
osbuild-service-maintenance: clean up all regions
...
Since we started cloning images to different regions, the maintenance
script should clean up all of these regions.
2023-01-25 14:20:51 +01:00
Sanne Raymaekers
0f26672e45
cmd/osbuild-service-maintenance: Log aws error
2022-03-02 12:36:09 +01:00
sanne
c43ad2b22a
osbuild-service-maintenance: Clean up expired images
2021-12-03 00:14:09 +00:00