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

Add Network Controller test to check for Network Adapter that matches RestInterface property #391

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

arudell
Copy link
Member

@arudell arudell commented Feb 20, 2025

Description

Summary of changes:

  • Add health test to check for Network Adapter that matches RestInterface property in Network Controller

Change type

  • Bug fix (non-breaking change)
  • Code style update (formatting, local variables)
  • New Feature (non-breaking change that adds new functionality without impacting existing)
  • Breaking change (fix or feature that may cause functionality impact)
  • Other

Checklist:

  • My code follows the style and contribution guidelines of this project.
  • I have tested and validated my code changes.

@arudell arudell added the enhancement New feature or request label Feb 20, 2025
@arudell arudell marked this pull request as ready for review February 20, 2025 19:00
@arudell arudell requested a review from a team as a code owner February 20, 2025 19:00
@arudell arudell enabled auto-merge February 20, 2025 19:00
param()

Confirm-IsNetworkController
if ($Global:SdnDiagnostics.EnvironmentInfo.ClusterConfigType -ieq 'FailoverCluster') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Isnt this too punishing?
We could just silently pass it, or we could have a field saying skipped/no applicable and let the execution continue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Shouldn't be too punishing as would require the user to directly invoke, which will just terminate and not process further. The test itself is only included in the Debug-NetworkController under the SF cluster type.

$sdnHealthTest = New-SdnHealthTest
try {
$node = Get-SdnNetworkControllerNode -Name $env:COMPUTERNAME -ErrorAction Stop
$netAdapter = Get-NetAdapter -Name $node.RestInterface -ErrorAction Ignore
Copy link
Contributor

Choose a reason for hiding this comment

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

How does this work ? isnt it suppose to be executed on the network controller itself ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Get-SdnNetworkControllerNode is a wrapper around Get-NetworkController node that has fault tolerance if the SF cluster is down. -Name is used to return back the node that matches the local node, rather than all nodes in the cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Debug] Ensure Get-NetworkControllerNode RestInterface property matches the NetAdapter for NC node
2 participants