-
Notifications
You must be signed in to change notification settings - Fork 266
test: add e2e validation for MANA accelerated networking #8832
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
base: main
Are you sure you want to change the base?
Changes from 14 commits
fc05c45
1a31ae1
3b6dcdc
2afe188
0663e44
344be27
4640d3e
46174a6
928d9a6
d4cf126
a0924b8
089f6e0
47efb25
68fcd3a
88b9efd
6388e3e
e272ce1
d94654f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3118,3 +3118,159 @@ func Test_ACL_SecondaryNIC_DualStack(t *testing.T) { | |
| }, | ||
| }) | ||
| } | ||
|
|
||
| func Test_Ubuntu2404_MANA(t *testing.T) { | ||
| RunScenario(t, &Scenario{ | ||
| Description: "Tests that MANA (Accelerated Networking) is properly configured on Ubuntu 24.04 with a V6 SKU", | ||
| Tags: Tags{ | ||
| VMSeriesCoverageTest: true, | ||
| MANA: true, | ||
| }, | ||
| Config: Config{ | ||
| Cluster: ClusterKubenet, | ||
| VHD: config.VHDUbuntu2404Gen2Containerd, | ||
| BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) { | ||
| nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_D2ds_v6" | ||
| nbc.AgentPoolProfile.VMSize = "Standard_D2ds_v6" | ||
| }, | ||
| VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
| vmss.SKU.Name = to.Ptr("Standard_D2ds_v6") | ||
| enableAcceleratedNetworking(vmss) | ||
| vmss.Properties.VirtualMachineProfile.StorageProfile.OSDisk.DiffDiskSettings = nil | ||
| }, | ||
| Validator: func(ctx context.Context, s *Scenario) { | ||
| ValidateMANA(ctx, s) | ||
| }, | ||
|
titilambert marked this conversation as resolved.
Outdated
titilambert marked this conversation as resolved.
Outdated
|
||
| }, | ||
| }) | ||
| } | ||
|
|
||
| func Test_Ubuntu2204_MANA(t *testing.T) { | ||
| RunScenario(t, &Scenario{ | ||
| Description: "Tests that MANA (Accelerated Networking) is properly configured on Ubuntu 22.04 with a V6 SKU", | ||
| Tags: Tags{ | ||
| VMSeriesCoverageTest: true, | ||
| MANA: true, | ||
| }, | ||
| Config: Config{ | ||
| Cluster: ClusterKubenet, | ||
| VHD: config.VHDUbuntu2204Gen2Containerd, | ||
| BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) { | ||
| nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_D2ds_v6" | ||
| nbc.AgentPoolProfile.VMSize = "Standard_D2ds_v6" | ||
| }, | ||
| VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
| vmss.SKU.Name = to.Ptr("Standard_D2ds_v6") | ||
| enableAcceleratedNetworking(vmss) | ||
| vmss.Properties.VirtualMachineProfile.StorageProfile.OSDisk.DiffDiskSettings = nil | ||
| }, | ||
| Validator: func(ctx context.Context, s *Scenario) { | ||
| ValidateMANA(ctx, s) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. related to my previous comment, maybe dropping the validator override would be cleaner?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed |
||
| }, | ||
|
titilambert marked this conversation as resolved.
Outdated
titilambert marked this conversation as resolved.
Outdated
|
||
| }, | ||
| }) | ||
| } | ||
|
|
||
| func Test_AzureLinuxV3_MANA(t *testing.T) { | ||
| RunScenario(t, &Scenario{ | ||
| Description: "Tests that MANA (Accelerated Networking) is properly configured on Azure Linux V3 with a V6 SKU", | ||
| Tags: Tags{ | ||
| VMSeriesCoverageTest: true, | ||
| MANA: true, | ||
| }, | ||
| Config: Config{ | ||
| Cluster: ClusterKubenet, | ||
| VHD: config.VHDAzureLinuxV3Gen2, | ||
| BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) { | ||
| nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_D2ds_v6" | ||
| nbc.AgentPoolProfile.VMSize = "Standard_D2ds_v6" | ||
| }, | ||
| VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
| vmss.SKU.Name = to.Ptr("Standard_D2ds_v6") | ||
| enableAcceleratedNetworking(vmss) | ||
| vmss.Properties.VirtualMachineProfile.StorageProfile.OSDisk.DiffDiskSettings = nil | ||
| }, | ||
| Validator: func(ctx context.Context, s *Scenario) { | ||
| ValidateMANA(ctx, s) | ||
| }, | ||
|
titilambert marked this conversation as resolved.
Outdated
titilambert marked this conversation as resolved.
Outdated
|
||
| }, | ||
| }) | ||
| } | ||
|
|
||
| func Test_Ubuntu2404_MANA_V7(t *testing.T) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we have dedicated tests for hardware, we have a suite that runs on the V7 or V8 hardware. we shouldnt be duplicating the tests by hardware I think.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I synced up with @lilypan26 and I added an helper which return the min SKU needed. with that we are currently testing with V6 (with the default SKU at V5), and the day we move to V7, it will use it, so we will have nothing todo... |
||
| RunScenario(t, &Scenario{ | ||
| Description: "Tests that MANA (Accelerated Networking) is properly configured on Ubuntu 24.04 with a V7 SKU", | ||
| Tags: Tags{ | ||
| VMSeriesCoverageTest: true, | ||
| MANA: true, | ||
| }, | ||
| Config: Config{ | ||
| Cluster: ClusterKubenet, | ||
| VHD: config.VHDUbuntu2404Gen2Containerd, | ||
| UseNVMe: true, | ||
| BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) { | ||
| nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_D2ads_v7" | ||
| nbc.AgentPoolProfile.VMSize = "Standard_D2ads_v7" | ||
| }, | ||
| VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
| vmss.SKU.Name = to.Ptr("Standard_D2ads_v7") | ||
| enableAcceleratedNetworking(vmss) | ||
| }, | ||
| Validator: func(ctx context.Context, s *Scenario) { | ||
| ValidateMANA(ctx, s) | ||
| }, | ||
| }, | ||
| }) | ||
| } | ||
|
|
||
| func Test_Ubuntu2204_MANA_V7(t *testing.T) { | ||
| RunScenario(t, &Scenario{ | ||
| Description: "Tests that MANA (Accelerated Networking) is properly configured on Ubuntu 22.04 with a V7 SKU", | ||
| Tags: Tags{ | ||
| VMSeriesCoverageTest: true, | ||
| MANA: true, | ||
| }, | ||
| Config: Config{ | ||
| Cluster: ClusterKubenet, | ||
| VHD: config.VHDUbuntu2204Gen2Containerd, | ||
| UseNVMe: true, | ||
| BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) { | ||
| nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_D2ads_v7" | ||
| nbc.AgentPoolProfile.VMSize = "Standard_D2ads_v7" | ||
| }, | ||
| VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
| vmss.SKU.Name = to.Ptr("Standard_D2ads_v7") | ||
| enableAcceleratedNetworking(vmss) | ||
| }, | ||
| Validator: func(ctx context.Context, s *Scenario) { | ||
| ValidateMANA(ctx, s) | ||
| }, | ||
| }, | ||
| }) | ||
| } | ||
|
|
||
| func Test_AzureLinuxV3_MANA_V7(t *testing.T) { | ||
| RunScenario(t, &Scenario{ | ||
| Description: "Tests that MANA (Accelerated Networking) is properly configured on Azure Linux V3 with a V7 SKU", | ||
| Tags: Tags{ | ||
| VMSeriesCoverageTest: true, | ||
| MANA: true, | ||
| }, | ||
| Config: Config{ | ||
| Cluster: ClusterKubenet, | ||
| VHD: config.VHDAzureLinuxV3Gen2, | ||
| UseNVMe: true, | ||
| BootstrapConfigMutator: func(_ *Cluster, nbc *datamodel.NodeBootstrappingConfiguration) { | ||
| nbc.ContainerService.Properties.AgentPoolProfiles[0].VMSize = "Standard_D2ads_v7" | ||
| nbc.AgentPoolProfile.VMSize = "Standard_D2ads_v7" | ||
| }, | ||
| VMConfigMutator: func(vmss *armcompute.VirtualMachineScaleSet) { | ||
| vmss.SKU.Name = to.Ptr("Standard_D2ads_v7") | ||
| enableAcceleratedNetworking(vmss) | ||
| }, | ||
| Validator: func(ctx context.Context, s *Scenario) { | ||
| ValidateMANA(ctx, s) | ||
| }, | ||
| }, | ||
| }) | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1110,6 +1110,20 @@ func addSecondaryNIC(vmss *armcompute.VirtualMachineScaleSet) { | |
| ) | ||
| } | ||
|
|
||
| // enableAcceleratedNetworking explicitly enables Accelerated Networking on the | ||
| // primary NIC of the VMSS. This ensures MANA (Microsoft Azure Network Adapter) | ||
| // is active on the VM, which is required for V5+ VM series. | ||
| func enableAcceleratedNetworking(vmss *armcompute.VirtualMachineScaleSet) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not all sku support AcceleratedNetworking, will this fail on SKU where AN isn't supported ? or will it silently accept ? what is the consequences if AN isn't working on a VM where Mana driver is present ? Are we able to detect that ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
gives
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @djsly for your second question, the tests Regarding network performance tests, I considered adding throughput validation but couldn't find documented bandwidth guarantees specific to AN/MANA per SKU, and throughput tests could be flaky in shared CI environments. |
||
| primaryNIC, err := getVMSSNICConfig(vmss) | ||
| if err != nil { | ||
| panic(fmt.Sprintf("enableAcceleratedNetworking: unable to get primary NIC config: %v", err)) | ||
| } | ||
| if primaryNIC.Properties == nil { | ||
| primaryNIC.Properties = &armcompute.VirtualMachineScaleSetNetworkConfigurationProperties{} | ||
| } | ||
| primaryNIC.Properties.EnableAcceleratedNetworking = to.Ptr(true) | ||
|
titilambert marked this conversation as resolved.
|
||
| } | ||
|
Copilot marked this conversation as resolved.
|
||
|
|
||
| // addDualStackSecondaryNIC appends a secondary (non-primary) NIC with both IPv4 and IPv6 | ||
| // IP configurations to the VMSS model, using the same subnet as the primary NIC. | ||
| func addDualStackSecondaryNIC(vmss *armcompute.VirtualMachineScaleSet) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.