Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: enable Accelerated Networking settings and pick up the right adapter in windows azure function #4585

Merged
merged 11 commits into from
Oct 7, 2021

Conversation

bingbing8
Copy link
Contributor

fix: enable Accelerated Networking settings and pick up the right adapter in windows azure function

Reason for Change:
Enable Accelerated Networking settings and pick up the right adapter in windows azure function

Issue Fixed:

  1. currently acceleratedNetworkingEnabledWindows only take false as value; remove the restriction to it is allowed to set to true
  2. windowsazurefunction sometime chose Mellanox to retrieve ipaddress, but Mellanox sits beneath the virtual ethernet adapter that it’s associated with and has no ipaddress

Credit Where Due:

Does this change contain code from or inspired by another project?

  • No
  • Yes

If "Yes," did you notify that project's maintainers and provide attribution?

  • No
  • Yes

Requirements:

Notes:

@welcome
Copy link

welcome bot commented Jul 16, 2021

💖 Thanks for opening your first pull request! 💖 We use semantic commit messages to streamline the release process. Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix. Examples of commit messages with semantic prefixes: - fix: change azure disk cachingMode to ReadOnly - feat: make maximumLoadBalancerRuleCount configurable - docs: add note on AKS Engine and AKS relationship
Make sure to check out the developer guide for guidance on testing your change.

pkg/api/vlabs/validate.go Show resolved Hide resolved
pkg/api/vlabs/validate.go Show resolved Hide resolved
@jsturtevant
Copy link
Contributor

Thanks for testing this and getting it working! Will this work as is today, or are there new base vm images that are needed?

Can you also update the doc where acceleratedNetworkingEnabledWindows is mentioned: https://github.com/jackfrancis/aks-engine/blob/master/docs/topics/clusterdefinitions.md#agentpoolprofiles

@jsturtevant
Copy link
Contributor

fixes: #2281

pkg/api/vlabs/validate.go Show resolved Hide resolved
# If there is more than one adapter, use the first adapter that is assigned an ipaddress.
foreach($na in $nas)
{
$netIP = Get-NetIPAddress -ifIndex $na.ifIndex -AddressFamily IPv4 -ErrorAction SilentlyContinue -ErrorVariable a
Copy link
Member

Choose a reason for hiding this comment

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

nit, err or netIPErr may be more descriptive names

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

parts/k8s/windowsazurecnifunc.ps1 Show resolved Hide resolved
@bingbing8
Copy link
Contributor Author

bingbing8 commented Jul 16, 2021

Thanks for testing this and getting it working! Will this work as is today, or are there new base vm images that are needed?

Can you also update the doc where acceleratedNetworkingEnabledWindows is mentioned: https://github.com/jackfrancis/aks-engine/blob/master/docs/topics/clusterdefinitions.md#agentpoolprofiles

@jsturtevant, it requires the right drivers are installed on the vm images to support accelerated Networking if it is set to true. Updated the doc. Please review. Thanks!

@jsturtevant
Copy link
Contributor

it requires the right drivers are installed

Where do folks get the right drivers? What versions are needed? Will the eventually be in the base Azure Market place images?

@jsturtevant
Copy link
Contributor

/azp test pr-e2e

@azure-pipelines
Copy link

Command 'test' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@jsturtevant
Copy link
Contributor

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

jadarsie
jadarsie previously approved these changes Jul 20, 2021
@jsturtevant
Copy link
Contributor

@bingbing8 it looks like make generate and a new push, is needed to pass tests

@bingbing8
Copy link
Contributor Author

@bingbing8 it looks like make generate and a new push, is needed to pass tests

I will work on it later this week.

@bingbing8
Copy link
Contributor Author

bingbing8 commented Jul 26, 2021

it requires the right drivers are installed

Where do folks get the right drivers? What versions are needed? Will the eventually be in the base Azure Market place images?
Mellanox updated VF drivers to supported nested virtualization in the following driver versions:
CX3: WinOF driver package 5.50.53000 (actual .sys file version 5.50.14740)
CX4: WinOF-2 driver package 2.40.50000 (actual.sys file version 2.40.22511)

The drivers are at Mellanox OFED for Windows - WinOF / WinOF-2.
I am not sure if the drivers will be eventually in the base Azure Market place images, at least it will be in the AKS vhd

@chewong
Copy link

chewong commented Jul 26, 2021

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingbing8
Copy link
Contributor Author

/azp run pr-e2e

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 4585 in repo Azure/aks-engine

@chewong
Copy link

chewong commented Jul 26, 2021

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@chewong
Copy link

chewong commented Jul 26, 2021

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

mainred
mainred previously approved these changes Jul 27, 2021
Copy link
Member

@mainred mainred left a comment

Choose a reason for hiding this comment

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

Looks good, thank you. Let upstream folks decide

jsturtevant
jsturtevant previously approved these changes Jul 27, 2021
jadarsie
jadarsie previously approved these changes Jul 27, 2021
@marosset
Copy link
Contributor

/azp pr-e2e

@marosset
Copy link
Contributor

@bingbing8 can you rebase your changes on top of master and push changes to your PR branch again?

@azure-pipelines
Copy link

Command 'pr-e2e' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@marosset
Copy link
Contributor

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingbing8
Copy link
Contributor Author

@marosset, I am working on it

@jsturtevant
Copy link
Contributor

/azp run pr-e2e

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@bingbing8
Copy link
Contributor Author

Using the new binary built from the rebased code, I deployed a cluster with below windows profile:
"windowsProfile": {
"adminUsername": "azureuser",
"adminPassword": "replacepassword1234$",
"sshEnabled": true,
"windowsPublisher": "microsoft-aks",
"windowsOffer": "aks-windows",
"windowsSku": "2019-datacenter-core-smalldisk-2109",
"imageVersion": "17763.2213.210927"
}

I can see Mellanox driver show the windows node and traffic through the adapter
PS C:\Users\azureuser> Get-NetAdapter

Name InterfaceDescription ifIndex Status MacAddress LinkSpeed


vEthernet (nat) Hyper-V Virtual Ethernet Adapter 14 Up 00-15-5D-28-3F-1C 10 Gbps
Ethernet 4 Mellanox ConnectX-3 Virtual Function... 9 Up 00-0D-3A-C4-83-38 40 Gbps
Ethernet 3 Microsoft Hyper-V Network Adapter #3 6 Up 00-0D-3A-C4-83-38 40 Gbps
vEthernet (Ethernet 3) Hyper-V Virtual Ethernet Adapter #2 5 Up 00-0D-3A-C4-83-38 40 Gbps

PS C:\Users\azureuser> Get-NetAdapterStatistics

Name ReceivedBytes ReceivedUnicastPackets SentBytes SentUnicastPackets


vEthernet (nat) 0 0 5341 0
Ethernet 4 9399662 7900 1792747 3678
Ethernet 3 9875021 9078 1731265 2942
vEthernet (Ethernet 3) 9875105 9080 1735089 2943

Copy link
Contributor

@marosset marosset left a comment

Choose a reason for hiding this comment

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

/lgtm

@jsturtevant
Copy link
Contributor

/lgtm

@jsturtevant
Copy link
Contributor

The 1.18 tests have been removed. The rest of the tests have passed going to merge manually.

@jsturtevant jsturtevant merged commit b1cdd1e into Azure:master Oct 7, 2021
@welcome
Copy link

welcome bot commented Oct 7, 2021

Congrats on merging your first pull request! 🎉🎉🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants