-
Notifications
You must be signed in to change notification settings - Fork 168
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
mantle/aws: add configuration for default VolumeType, IMDSv2 support, and boot mode #3607
Conversation
AWS now allows marking an AMI as "UEFI-preferred"; i.e. that both BIOS and UEFI are supported, but the latter is preferred if the instance type supports it. Let's make use of it. A change proposal has been submitted for Fedora 39 to also do this for the Fedora Cloud image. Ref: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html Ref: https://fedoraproject.org/wiki/Changes/CloudEC2UEFIPreferred
Skipping CI for Draft Pull Request. |
c1c4711
to
3a20e2b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is what I was suggesting. Except we'd still want something similar to what you had in #3586 in aws.py
but except passing the flags, e.g.
if 'aws-imds2-support' in image_yaml:
ore_args.extend(['--imds2-support'])
if 'aws-volume-type' in image_yaml:
ore_args.extend(['--volume-type', image_yaml['aws-volume-type']])
if 'aws-x86-boot-mode' in image_yaml and image is for x86_64:
ore_args.extend(['--boot-mode', image_yaml['aws-x86-boot-mode']])
mantle/platform/api/aws/images.go
Outdated
if architecture == "" { | ||
architecture = runtime.GOARCH | ||
} | ||
switch architecture { | ||
case "amd64", "x86_64": | ||
awsArch = ec2.ArchitectureTypeX8664 | ||
bootmode = "uefi-preferred" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this also may need to be parameterized so that we leave RHCOS the same for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I left out the bootmode bit just to make sure I was on the right track. I will add that shortly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this also may need to be parameterized so that we leave RHCOS the same for now?
I notice this comment is now marked as outdated so maybe I'm looking at the wrong information, but just based on your comment I think we want the new defaults to go to latest development RHCOS don't we? We can back out the changes with image.yaml config if we find one of the new settings is not palatable for whatever reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this also may need to be parameterized so that we leave RHCOS the same for now?
I notice this comment is now marked as outdated so maybe I'm looking at the wrong information, but just based on your comment I think we want the new defaults to go to latest development RHCOS don't we?
I'm not sure. The last on this was Colin's suggestion in #3402 to make it opt-in, but I'm not sure if I've missed some conversations about it since then to track that change in OCP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. We probably do need some paperwork done in the OCP side. @mike-nguyen - could you help us track what we'd need to do here?
Either way I think I'd prefer we land the defaults the way it currently is and then opt-out in the development head in openshift/os, which isn't hard to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thoughts offhand:
- the gp3 change can probably just sail through - IMO it's sufficient to tag it for release notes
- The IMDSv2 change seems not unlikely to actually break some things; until recently IIRC some in-tree code in kubelet actually talked to the cloud-init user data too (to e.g. determine which aws region it's in). There are potentially other operators. Some of that may be IMDSv2 ready. Others may not and it may sadly need some mechanism to opt out (openshift-install config and/or cluster-api/machineset?)
- UEFI is probably OK going to just sail through too - IMO it's sufficient to tag it for release notes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IOW of these 3 things, I think only IMDSv2 may be worthy of an OCP enhancement, but it can probably be a small/quick one.
Ah awesome ok will do |
3a20e2b
to
fd78c4b
Compare
fd78c4b
to
23922dd
Compare
IMDSV2-only has the potential to break existing systems, expose configuration through an environment vairable defined in 'image-default.yaml' to overide defaults. Default volume type to 'gp3', while 'gp3' is generally better there could be a reason to change it. Expose configuration through enviornment variable defined in 'image-default.yaml' to allow for overiding. Docs: IMDSv2: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration GP3: https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-storage-compare-volume-types.html
23922dd
to
c7fea5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks sane to me overall! Were you able to confirm that an AMI created with this PR looks and works as intended?
The more conservative approach is to keep the status quo as default, but OK with this if we merge the appropriate openshift/os PR first before this one.
So I guess I am stuck in the How, on this? I know I can build via cosa buildextend-aws, but how do I get the 'ami' data?
Ok, I will make a pr to update the OpenShift/OS |
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
Add configuration for boot mode when used with a supported architecture i.e. 'amd64/x86_64'. With a default of 'uefi-preferred'.
c7fea5a
to
e1eaa31
Compare
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
Ok, after working with @dustymabe we were able to upload an ami and see the correct values, then ran basic kola tests with flying colors! I have since opened some PRS to insure no changes in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
Dusty Mabe (1): Revert "manifests/fedora-coreos: ban initscripts-service" Jonathan Lebon (2): Revert "Revert "manifests/fedora-coreos: ban initscripts-service"" denylist: drop coreos.boot-mirror tests Michael Armijo (1): denylist: extend snooze for `ext.config.networking.*` tests Nikita Dubrovskii (1): overrides: fast-track rust-coreos-installer-0.18.0-1.fc38 Steven Presti (1): image.yaml: aws; add old defaults for new fields see coreos/coreos-assembler#3607
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
We switched to IMDSV2 by default in COSA so let's update our call here. coreos/coreos-assembler#3607
We switched to IMDSV2 by default in COSA so let's update our call here. coreos/coreos-assembler#3607
We switched to IMDSV2 by default in COSA so let's update our call here. coreos/coreos-assembler#3607
Dusty Mabe (2): Revert "manifests/fedora-coreos: ban initscripts-service" denylist: extend/rework kdump.crash snoozes Jonathan Lebon (2): Revert "Revert "manifests/fedora-coreos: ban initscripts-service"" denylist: drop coreos.boot-mirror tests Michael Armijo (1): denylist: extend snooze for `ext.config.networking.*` tests Nikita Dubrovskii (1): overrides: fast-track rust-coreos-installer-0.18.0-1.fc38 Steven Presti (1): image.yaml: aws; add old defaults for new fields see coreos/coreos-assembler#3607
We switched to IMDSV2 by default in COSA so let's update our call here. coreos/coreos-assembler#3607
We switched to IMDSV2 by default in COSA so let's update our call here. coreos/coreos-assembler#3607
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
We switched to IMDSV2 by default in COSA so let's update our call here. coreos/coreos-assembler#3607
see coreos/coreos-assembler#3607 With the above PR, cosa's image-default.yaml adds 3 configuration fields. The defaults provided differ from before. Overide the new configuration fields to maintain old defaults.
We switched to IMDSV2 by default in COSA so let's update our call here. coreos/coreos-assembler#3607
#3586 Option 1