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

fix: Removed dependency on 'ReleaseId' for WS2022 - #4659

Merged
James Sturtevant (jsturtevant) merged 7 commits into
Azure:masterfrom
nick5616:nbelovoskey/releaseIdFix-ws2022
Mar 15, 2022
Merged

fix: Removed dependency on 'ReleaseId' for WS2022#4659
James Sturtevant (jsturtevant) merged 7 commits into
Azure:masterfrom
nick5616:nbelovoskey/releaseIdFix-ws2022

Conversation

@nick5616

@nick5616 Nicolas Belovoskey (nick5616) commented Sep 20, 2021

Copy link
Copy Markdown
Contributor

Reason for Change:

The behavior of ReleaseId replaced the ws2022 pause image with a 20h2 pause image, which prevented any ws2022 pods from starting.

Issue Fixed:

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:
This is still an issue for any version of windows that does not have build number 20348 but is later than 20H2.

@jsturtevant

Copy link
Copy Markdown
Contributor

/azp run pr-e2e

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Comment thread parts/k8s/windowscontainerdfunc.ps1 Outdated
@jsturtevant

Copy link
Copy Markdown
Contributor

fyi on the ReleaseId being no longer supported in WS 2022 Chou Hu (@AbelHu) Qingchuan Hao (@mainred)

@mboersma

Copy link
Copy Markdown
Member

/azp run pr-e2e

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 4659 in repo Azure/aks-engine

Comment thread parts/k8s/windowscontainerdfunc.ps1 Outdated
$windowsReleaseId = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ReleaseId
$windowsVersion = ""

# Starting with 20H2 tags used to publish container images may not match the 'ReleaseId'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It won't work at all for WS 2022 is that right?

@nick5616 Nicolas Belovoskey (nick5616) Sep 23, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ReleaseId returns '2009' for anything 20H2 and beyond.
WS2022 is covered by the buildNumber switch.
20348 => ltsc2022
The ReleaseId fallback is for anything that the switch doesn't have a case for.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think our switch covers all known versions BuildId => image tags. This will cause strange runtime errors for anything newer than 20H2 as you experienced. It maybe be better to fail explicitly here. wdyt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If we could somehow cause aks-engine to hit an exception here, that would be ideal. It would say "Current Build not recognized" or something like that. This way, nobody will be rooting around in logs after-the-fact

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Are we testing versions that aren't captured in the switch? Would we have to update the corresponding unit tests?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

unfortunately this is done at cluster bring up time not the cluster template generation. Even though CSE would fail and some one would have to go get the logs to figure it out, I think that would be ideal over the cluster coming online but having strange behavior when deploying pods and trying to root cause it.

The reason it needs the version id here instead of just using a multi-arch image is the experimental Hyper-v support doesn't work with multi-arch images. You end up in a similar scenario where the cluster is online but pods can't be deployed.

@mboersma

Copy link
Copy Markdown
Member

/azp run pr-e2e

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@mboersma

Copy link
Copy Markdown
Member

/azp run pr-e2e

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@marosset

Copy link
Copy Markdown
Contributor

Nicolas Belovoskey (@nick5616) did you sign a contributor license agreement?
If so can you try rebasing this PR and pushing again.
We should try and get this merged.

@nick5616

Copy link
Copy Markdown
Contributor Author

There was some sort of error with the CLA back in September. Rebasing seems to have fixed it :) Mark Rossetti (@marosset)

@marosset

Copy link
Copy Markdown
Contributor

/lgtm

@marosset

Copy link
Copy Markdown
Contributor

/azp run pr-e2e

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@bridgetkromhout

Copy link
Copy Markdown
Contributor

/azp run pr-e2e

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@marosset

Copy link
Copy Markdown
Contributor

James Sturtevant (@jsturtevant) can you review this again?

@jsturtevant
James Sturtevant (jsturtevant) merged commit fa4eebf into Azure:master Mar 15, 2022
@welcome

welcome Bot commented Mar 15, 2022

Copy link
Copy Markdown

Congrats on merging your first pull request! 🎉🎉🎉

@jackfrancis

Copy link
Copy Markdown
Member

Mark Rossetti (@marosset) James Sturtevant (@jsturtevant) will incorporating this change into a release require a new Windows VHD image?

@jsturtevant

Copy link
Copy Markdown
Contributor

I don't think so as it's in the CSE files not the provisioning scripts

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