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

Enable EFA support #4290

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

ytsssun
Copy link
Contributor

@ytsssun ytsssun commented Nov 8, 2024

Issue number:

Related #1031

Description of changes:

  1. Note: rdma-core will be vended as part of the release package in core-kit. PR Enable rdma core in release bottlerocket-core-kit#252.
  2. Added setting generator for metadata.settings.kernel.sysctl."vm/nr_hugepages" in shared default
  3. Added migration for setting generator.

Testing done:

Tested migration:

  • Test upgrade:

kernel.sysctl setting
Before upgrade:

[ssm-user@control]$ apiclient get settings.kernel
{
  "settings": {
    "kernel": {
      "lockdown": "none"
    }
  }
}

Upgrade:

[ssm-user@control]$ apiclient get settings.kernel
{
  "settings": {
    "kernel": {
      "lockdown": "none",
      "sysctl": {
        "vm/nr_hugepages": "3520"
      }
    }
  }
}

setting generator for settings.kernel.sysctl.vm/nr_hugepages:
Before:

{
    "settings.network.hostname": "netdog generate-hostname",
    "settings.updates.seed": "bork seed",
    "settings.boot": "/usr/bin/prairiedog generate-boot-settings",
    "settings.updates.targets-base-url": "schnauzer-v2 render --requires 'aws@v1' --requires 'updates@v1(helpers=[tuf-prefix])' --template '{{ tuf-prefix settings.aws.region }}/targets/'",
    "settings.host-containers.admin.user-data": "shibaken generate-admin-userdata",
    "settings.host-containers.control.source": "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-control:v0.7.17'",
    "settings.metrics.send-metrics": "shibaken is-partition --partition aws --partition aws-us-gov",
    "settings.aws.config": "schnauzer-v2 render --requires 'aws@v1(helpers=[aws-config])' --template '{{ aws-config settings.aws.config settings.aws.profile }}'",
    "settings.host-containers.admin.source": "schnauzer-v2 render --requires 'aws@v1(helpers=[ecr-prefix])' --template '{{ ecr-prefix settings.aws.region }}/bottlerocket-admin:v0.11.13'",
    "settings.updates.metadata-base-url": "schnauzer-v2 render --requires 'aws@v1' --requires 'updates@v1(helpers=[metadata-prefix, tuf-prefix])' --template '{{ tuf-prefix settings.aws.region }}{{ metadata-prefix settings.aws.region }}/2020-07-07/{{ os.variant_id }}/{{ os.arch }}/'"
}

After upgrades:

{
  ...
  "settings.kernel.sysctl.vm/nr_hugepages": "corndog generate-hugepages-setting", <--- New
  ...
}
  • Test downgrade

Verified that settings remains:

[root@admin]# apiclient get settings.kernel
{
  "settings": {
    "kernel": {
      "lockdown": "none",
      "sysctl": {
        "vm/nr_hugepages": "3520"
      }
    }
  }
}

Settings generator is removed after downgrade.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@ytsssun ytsssun marked this pull request as draft November 8, 2024 00:12
@bcressey
Copy link
Contributor

bcressey commented Nov 8, 2024

We should require rdma-core over in the core kit's release package instead. You can affinitize it to just aws-* variants though.

As a general rule, I don't like adding to the set of packages all variants need to list to achieve the baseline functionality level.

@bcressey
Copy link
Contributor

bcressey commented Nov 8, 2024

Is there a reason the ECS variants were omitted from this list? That should be superseded by the change I suggested, but I'm still curious.

@ytsssun
Copy link
Contributor Author

ytsssun commented Nov 8, 2024

We should require rdma-core over in the core kit's release package instead. You can affinitize it to just aws-* variants though.

Got it, it makes sense to put the rdma-core under release package. I could use a pointer on how to affinitize it to just aws-* though.

Is there a reason the ECS variants were omitted from this list? That should be superseded by the change I suggested, but I'm still curious.

Mainly because ECS does not officially support EFA? However, I can totally include that to the aws-ecs-2* variants. As for variants in general, I only wanted to introduce the rdma-core package to the variants that uses kernel-6.1 where EFA drivers are included.

@ytsssun ytsssun force-pushed the feature/efa-variant-support branch from be95482 to cffb0cb Compare November 8, 2024 22:40
@ytsssun ytsssun changed the title Enable EFA support [WIP]Enable EFA support Nov 8, 2024
@ytsssun ytsssun changed the title [WIP]Enable EFA support Enable EFA support Nov 8, 2024
@ytsssun ytsssun force-pushed the feature/efa-variant-support branch 3 times, most recently from 785d5db to 898a1fc Compare November 11, 2024 18:15
@ytsssun
Copy link
Contributor Author

ytsssun commented Nov 11, 2024

As per @bcressey , I added the rdma-core package in release so that it is enabled for aws-* variants. bottlerocket-os/bottlerocket-core-kit#252

Will update this PR once the core-kit PR is merged and getting released.

@ytsssun ytsssun force-pushed the feature/efa-variant-support branch from 898a1fc to b50bfec Compare November 12, 2024 23:06
@ytsssun ytsssun marked this pull request as ready for review November 12, 2024 23:06
Copy link
Contributor

@bcressey bcressey left a comment

Choose a reason for hiding this comment

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

LGTM after it's rebased to fix Release.toml and Twoliter.toml.

Signed-off-by: Yutong Sun <yutongsu@amazon.com>
@ytsssun ytsssun force-pushed the feature/efa-variant-support branch 4 times, most recently from a169ed5 to 21c2a26 Compare November 21, 2024 19:41
Signed-off-by: Yutong Sun <yutongsu@amazon.com>
@ytsssun ytsssun force-pushed the feature/efa-variant-support branch from 21c2a26 to 971b645 Compare November 21, 2024 21:04
@ytsssun ytsssun merged commit f34cf7a into bottlerocket-os:develop Nov 21, 2024
2 checks passed
@cbgbt cbgbt mentioned this pull request Dec 5, 2024
4 tasks
@yeazelm yeazelm mentioned this pull request Jan 4, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants