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

Use patched AMI for Ubuntu 22 #1445

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scenarios/aws/ec2/os_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ func resolveUbuntuAMI(e aws.Environment, osInfo *os.Descriptor) (string, error)
volumeType = "ebs-gp3"
}

// PATCH: Ubuntu 22.04 has a bugged version of curl. Use our own patched AMI instead
if osInfo.Version == "22.04" {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this is a one-shot image, which is not great to maintain. I also saw the PRs to upgrade to 24.04 reverted, what was the reason, can we work on fixing whatever prevents the upgrade?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's not really perfect.
However updating to Ubuntu 24.04 as a default seems to break a lot of test on datadog-agent. And we have some interest from Fleet team to keep some test running on Ubuntu 22.04 as well, and in the current situation the upstream Ubuntu 22.04 image brings flakiness in the CI

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we patch it at runtime perhaps, with a curl tarball stored in our S3, adding to the init script?

if paramArch == os.ARM64Arch {
return "ami-07e8e5f83dd25f929", nil
}
return "ami-0c6d6caaaa95d1d0c", nil
}

return ec2.GetAMIFromSSM(e, fmt.Sprintf("/aws/service/canonical/ubuntu/server/%s/stable/current/%s/hvm/%s/ami-id", osInfo.Version, paramArch, volumeType))
}

Expand Down