Commit graph

12 commits

Author SHA1 Message Date
Tomáš Hozza
caa7816121 internal/awscloud: remove S3 client from AWS struct
This functionality is not needed any more, since it is provided by the
osbuild/images version of AWS.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 13:15:43 +02:00
Tomáš Hozza
4f0ae84add internal/awscloud: remove S3 manager from AWS struct
This functionality is not needed any more, since it is provided by the
osbuild/images version of AWS.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 13:15:43 +02:00
Tomáš Hozza
0b5bfa044f internal/awscloud: remove S3 presign client from AWS struct
This functionality is not needed any more, since it is provided by the
osbuild/images version of AWS.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 13:15:43 +02:00
Sanne Raymaekers
d5912259a0 cloud/awscloud: rework create fleet retry logic
The current path sometimes launches two instances, which is problematic
because the rest of the secure instance code expects exactly one
instance. A security group could be attached to both instances, and
would block the worker from launching any more SIs, as it tries to
delete the old security group first, which is still held by one of the
surplus SIs which didn't get terminated.

Only retry if:
- on "UnfulfillableCapacity" or "InsufficientInstanceCapacity" error codes;
- there wasn't an instance launched anyway.

If either of these checks fail, do not try to launch another one, and
just fail the job.
2024-10-24 10:29:26 +02:00
Sanne Raymaekers
5eb8227bf3 cloud/awscloud: retry CreateFleet regardless of the error code
The errors returned by create fleet are not entirely clear. It seems it
also returns `InsufficientInstanceCapacity` in addition to
`UnfulfillableCapacity`. Let's just retry three times regardless of the
create fleet error, that way there's no need to chase error codes which
aren't clearly defined.
2024-10-15 16:04:19 +02:00
Sanne Raymaekers
905df418aa cloud/aws: add a third secure instance fallback across AZs
In case the on demand option failed as well, retry one more time across
availability zones. This significantly increases the pool of available
instances, but increases network related costs, as transferring data
between AZs is not free.
2024-10-07 15:56:07 +02:00
Sanne Raymaekers
c90b92f666 cloud/awscloud: test failures when running a secure instance 2024-08-20 15:32:40 +02:00
Sanne Raymaekers
acc415a676 cloud/awscloud: test terminating a secure instance 2024-08-20 15:32:40 +02:00
Sanne Raymaekers
16c9a7be88 cloud/awscloud: add tests for ec2 operations 2024-08-20 15:32:40 +02:00
Sanne Raymaekers
791ec07bc2 internal/awscloud: fix cloud-init userdata for secure instance
The conditional only checked if the cloudwatch group was set, and if it
wasn't, the hostname variable wouldn't be set either. So the executor
would try to look for a hostname but not find any.
2024-06-26 10:56:57 +02:00
Sanne Raymaekers
2a621521a8 osbuildexecutor/aws.ec2: set hostname of executor via cloud-init
This way much more of the journal will be captured under the new
hostname.
2024-06-25 10:58:10 +02:00
Tomáš Hozza
e7743f17ec Worker: allow configuring executor CloudWatch group
We need the ability to use different CloudWatch group for the
osbuild-executor on Fedora workers in staging and production
environment.

Extend the worker confguration to allow configuring the CloudWatch group
name used by the osbuild-executor. Extend the secure instance code to
instruct cloud-init via user data to create /tmp/cloud_init_vars file
with the CloudWatch group name in the osbuild-executor instance, to make
it possible for the executor to configure its logging differently based
on the value.

Cover new changes by unit tests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-03-08 13:13:44 +01:00