Skip to content

[Integ test] Modify test_efa to verify EFA with FsxLustre tutorial - #7572

Open
himani2411 wants to merge 4 commits into
aws:developfrom
himani2411:fsx-efa-integ-test
Open

[Integ test] Modify test_efa to verify EFA with FsxLustre tutorial#7572
himani2411 wants to merge 4 commits into
aws:developfrom
himani2411:fsx-efa-integ-test

Conversation

@himani2411

@himani2411 himani2411 commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description of changes

Tests

efa:
    test_efa.py::test_efa:
      dimensions:
        - regions: [{{ c6gn_16xlarge_CAPACITY_RESERVATION_2_INSTANCES_1_HOURS_YESPG_OS_ARM_0 }}]
          instances: ["c6gn.16xlarge"] # Single Nic
          oss: [{{ OS_ARM_0 }}]
          schedulers: ["slurm"]
        - regions: ["usw2-az4"]
          schedulers: ["slurm"]
          oss: ["ubuntu2404"]
          instances: ["trn1.32xlarge"] # Multi Nic
        - regions: [{{ c5n_18xlarge_CAPACITY_RESERVATION_2_INSTANCES_1_HOURS_YESPG_OS_X86_0 }}]
          instances: ["c5n.18xlarge"]  # No support for efa+FsxL feature
          oss: [{{ OS_X86_0 }}]
          schedulers: ["slurm"]

References

  • Link to impacted open issues.
  • Link to related PRs in other packages (i.e. cookbook, node).
  • Link to documentation useful to understand the changes.

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

* Run EFA with FSxL tutorail only when  supported OS and Instance type are being used
* Provision EFA FSx Lustre via shared storage stack
* Dump LNet state for future debugging
* Assert Lustre rides EFA by LNet send counters, not the import paramters; write 4 GiB of direct I/O to the mount, sum again, then require @efa to gain at least half the expected bulk RPCs and more than @tcp gained. Metadata RPCs and pings ride @tcp by design, so the second check is an ordering rather than tcp_delta == 0.
* All the Nics for trn1.32xlareg instance are supposed to be bound unlike what Fsx specifies in their doc https://docs.aws.amazon.com/fsx/latest/LustreGuide/configure-efa-clients.html#add-efa-interfaces
The AMI loads lnet at boot, so libcfs is resident with 2 CPU partitions
before the FSx client setup runs: its cpu_npartitions module option is
ignored and only 2 EFA devices bind (V2331124295). Unload the Lustre/LNet
stack first, and gate the OnNodeStart action on EFA-for-Lustre support so
the teardown only happens where an @efa net can come up.
Without sync the read may be served from the client page cache, so this
asserts POSIX read-after-write visibility and a usable mount, not that
the bytes reached the servers. _test_lustre_data_rail covers the wire.
@himani2411 himani2411 added skip-changelog-update Disables the check that enforces changelog updates in PRs 3.x labels Aug 19, 2026
@himani2411 himani2411 changed the title Fsx efa integ test [Integ test] Modify test_efa to verify EFA with FsxLustre tutorial Aug 19, 2026
# default 2 partitions, and setup.sh then binds only 2 EFA devices. See V2331124295.
# Safe here: OnNodeStart runs before any shared storage is mounted, and setup.sh reinserts the stack.
# TODO: Revert the unloading of modules once configure-efa-fsx-lustre-client.zip handles module loading
echo "Unloading the boot-loaded Lustre/LNet stack so setup.sh owns the libcfs module insert"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

NOTE FOR REVIWER: we need to unload the lnet module as latest FSX script configure-efa-fsx-lustre-client.zip fails with not being able to bind all the EFA devices. This fails our pcluster-diag checks and configure-efa-fsx-lustre-client.zip errors out.

because the setup script's filter_efa_non_gds() reserves some devices for GDS. For every other
instance type that filter is a no-op -- it returns the full EFA device list -- so the setup binds
every EFA interface the instance has, which EC2 reports as NetworkInfo.EfaInfo.MaximumEfaInterfaces
(8 on trn1.32xlarge, 1 on single-EFA-interface types).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

NOTE FOR REVIWER: Confirmed and verified by looking at FSX script that the table here is stale with respect to Other instances with multiple network cards entry. https://docs.aws.amazon.com/fsx/latest/LustreGuide/configure-efa-clients.html#add-efa-interfaces. The Fsx script binds all the EFA devices instead of the previously default 2 efa devices.

return "; ".join(f"echo ==== {label} ====; {command} || true" for label, command in _LNET_DIAGNOSTIC_COMMANDS)


def _log_lnet_state(scheduler_commands, remote_command_executor, partition=None):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

NOTE FOR REVIWER: I am logging these commands for debugging purpose which are helpful in understanding the state of node. These commands were helpful in finding that I was polluting the peer table and hence led to improvement in pcluster-diag checks.

Measurement showed a plain buffered write produces the same send_count
deltas (efa 4098 vs 4097): Lustre's per-OSC dirty budget is far below
4 GiB, so the data flushes as it goes. That makes the second write a
duplicate of the first, so the third sample goes with it.
@himani2411
himani2411 marked this pull request as ready for review August 20, 2026 13:43
@himani2411
himani2411 requested review from a team as code owners August 20, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x skip-changelog-update Disables the check that enforces changelog updates in PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant