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

fix: do not use return in updating kubelet node labels #5151

Merged
merged 2 commits into from
Oct 24, 2024

Conversation

AbelHu
Copy link
Member

@AbelHu AbelHu commented Oct 24, 2024

What type of PR is this?
/kind bug

What this PR does / why we need it:

fixes a bug in Add-KubeletNodeLabel where the log content is added to the return value by Write-Log, causing KubeletNodeLabels to contain unexpected content which ends preventing kubelet from starting:

                                       "NodeLabels":  [
                                                          "2024-10-23T18:24:39.6797661+00:00: adding label kubernetes.azure.com/kubelet-serving-ca=cluster to kubelet node labels...",
                                                          "agentpool=npwin,kubernetes.azure.com/agentpool=npwin,agentpool=npwin,kubernetes.azure.com/agentpool=npwin,kubernetes.azure.com/cluster=MC_cameissebld106479871_wintester_eastus2,kubernetes.azure.com/consolidated-additional-properties=a3253cd6-916b-11ef-a610-6643c19b51dd,kubernetes.azure.com/kubelet-identity-client-id=78f4691a-f952-4bd3-83c0-0869e2821eed,kubernetes.azure.com/mode=user,kubernetes.azure.com/node-image-version=AKSWindows-2022-containerd-20348.2762.241009,kubernetes.azure.com/nodepool-type=VirtualMachineScaleSets,kubernetes.azure.com/os-sku=Windows2022,kubernetes.azure.com/role=agent,kubernetes.azure.com/storageprofile=managed,kubernetes.azure.com/storagetier=Premium_LRS,storageprofile=managed,storagetier=Premium_LRS,kubernetes.azure.com/kubelet-serving-ca=cluster"

...

Exception calling "RunProcess" with "3" argument(s): "Cannot process request because the process (992) has exited."
At C:\k\kubeletstart.ps1:106 char:1
+ [RunProcess.exec]::RunProcess($exe, $args, [System.Diagnostics.Proces ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : InvalidOperationException

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

none

@AbelHu AbelHu merged commit 1c75357 into master Oct 24, 2024
28 checks passed
@AbelHu AbelHu deleted the abelch/refine-win-cse branch October 24, 2024 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows cse package The change with this label needs to build a new AKS Windows CSE Scripts Package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants