Add new conditionalHnsRestarter.p1 script#7
Open
jayanthAP wants to merge 20 commits intomicrosoft:mainfrom
Open
Add new conditionalHnsRestarter.p1 script#7jayanthAP wants to merge 20 commits intomicrosoft:mainfrom
jayanthAP wants to merge 20 commits intomicrosoft:mainfrom
Conversation
Script to be used to restart HNS based when certain condition is met, to help mitigate issues in customer AKS nodes. Script currently supports checking for missing rules on pod-endpoints.
Example command:
conditionalHnsRestarter.ps1 -PodPortRulesToCheck @{"ruleRegex" = "LB_DSR_[0-9A-Z]+_[\d\.]+_[\d\.]+_801_801_17"; "layerName" = "LB_DSR"; "groupName" = "LB_DSR_IPv4_OUT"}
….ps1 This is a generic mitigator script. Currently it checks pod port rules and restarts HNS when rules are not found. It can be extended for other mitigation steps as well, since the mitigation logic can be similar.
| { | ||
| if ($CollectWindowsLogs -eq $true) { | ||
| # create log path if not yet created. | ||
| mkdir -Force $LogsPath |
Contributor
There was a problem hiding this comment.
If $CollectWindowsLogs is $true and issue happens very frequently, there are chances multiple log files will be created. This will consume lot of customer's space.
Contributor
Author
There was a problem hiding this comment.
Yes, we will need to add a rotation logic for the same. Will add that.
princepereira
approved these changes
Jul 26, 2023
hnsCrashEventChecker.yaml is a daemonset that looks for HNS crash win-event logs. Once applied on a kubernetes cluster, user can execute below command to know the timestamps when HNS crashed occurred on respective windows nodes: kubectl logs -l name=hns-crash-event-checker --all-containers=true
Making the daemonset generic such that it can be used for any service (not just HNS). The $ServiceName variable needs to be edited for this.
Last edit missed the daemonset code.
This daemonset enables collection of crash-dumps for user-space processes on AKS windows nodes.
Contributor
|
Is this ready for review / merging? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Script to be used to restart HNS based when certain condition is met, to help mitigate issues in customer AKS nodes. Script currently supports checking for missing rules on pod-endpoints.
Example command:
conditionalHnsRestarter.ps1 -PodPortRulesToCheck @{"ruleRegex" = "LB_DSR_[0-9A-Z]+[\d.]+[\d.]+_801_801_17"; "layerName" = "LB_DSR"; "groupName" = "LB_DSR_IPv4_OUT"}