-
Notifications
You must be signed in to change notification settings - Fork 58
Add TSG: Get-SolutionUpdate intermittent NullReferenceException (2505-2604) #331
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
TSG/Update/Get-SolutionUpdate-intermittent-NullReferenceException.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # TSG | 2505-2604 | Get-SolutionUpdate fails intermittently with NullReferenceException | ||
|
|
||
| On Azure Local builds **2505 through 2604**, `Get-SolutionUpdate` (or `Get-SolutionUpdateEnvironment`) can intermittently fail with a `NullReferenceException` during or shortly after a solution update. The failure is transient: retrying the same command usually succeeds. This is fixed in build **2605** and later. | ||
|
|
||
| > **Applies to builds 2505-2604 only.** If your cluster is on **2605 or later**, this article does not apply. A persistent `NullReferenceException` on a fixed build is a different problem: collect diagnostics and contact Microsoft Support. | ||
|
|
||
| # Symptoms | ||
|
|
||
| `Get-SolutionUpdate` or `Get-SolutionUpdateEnvironment` returns: | ||
|
|
||
| ``` | ||
| Get-SolutionUpdateEnvironment : Object reference not set to an instance of an object. | ||
| + CategoryInfo : NotSpecified: (:) [Get-SolutionUpdateEnvironment], NullReferenceException | ||
| + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.AzureStack.Lcm.PowerShell.GetSolutionUpdateEnvironmentCmdlet | ||
| ``` | ||
|
|
||
| Characteristics: | ||
|
|
||
| - It appears **during or shortly after** a solution update (for example, while checking update status). | ||
| - It is **intermittent**: running the same cmdlet again a short time later often returns a normal result. | ||
| - The update itself keeps making progress. It is the status cmdlet that fails, not the update. | ||
|
|
||
| # Issue Validation | ||
|
|
||
| This article applies when **all** of the following are true: | ||
|
|
||
| 1. The cluster is on a build in the range **2505-2604** (23H2 `11.25xx`-`11.26xx`, or 24H2 `12.25xx`-`12.26xx`). Confirm the current version from the Azure portal (your Azure Local instance -> **Updates**), or from `Get-SolutionUpdate | ft Version, State` once the cmdlet returns. | ||
| 2. The error above comes from `Get-SolutionUpdate` or `Get-SolutionUpdateEnvironment`. | ||
| 3. It occurs during or around a solution update. | ||
| 4. It is **intermittent**: a retry often succeeds. | ||
|
|
||
| If the cmdlet instead **hangs or times out** (unresponsive for a long time, eventually a GatewayTimeout) rather than returning the error above, see [Get-SolutionUpdate GatewayTimeout](./Get-SolutionUpdate-GatewayTimeout.md). | ||
|
|
||
| # Cause | ||
|
|
||
| Under high concurrent request load (for example, frequent update-status polling combined with retrying or failed action plans), an internal timing issue in the Update Service can cause a request to the Orchestrator service to fail momentarily. The Update Service does not handle that failed response gracefully and surfaces a `NullReferenceException`. Because the condition is a transient timing issue, the same command normally succeeds when retried. The issue is resolved in build **2605** and later. | ||
|
|
||
| # Mitigation Details | ||
|
|
||
| ## Step 1 - Retry (resolves most cases) | ||
|
|
||
| Re-run the cmdlet. Because the failure is transient, it usually succeeds within a few attempts, and an in-progress update continues normally once the cmdlet returns. | ||
|
|
||
| ```powershell | ||
| Get-SolutionUpdate | ft Version, State, UpdateStateProperties | ||
| ``` | ||
|
|
||
| ## Step 2 - If it does not clear | ||
|
|
||
| If `Get-SolutionUpdate` keeps failing after several retries over a few minutes, or the update appears **stalled** (its state is not advancing), stop retrying. This may be a different issue (for example, an unresponsive Update Service or an unhealthy Orchestrator service), not the transient condition described here. | ||
|
|
||
| - If the cmdlet is **hanging or timing out** rather than throwing the error above, follow [Get-SolutionUpdate GatewayTimeout](./Get-SolutionUpdate-GatewayTimeout.md). | ||
| - Otherwise, collect diagnostics and contact Microsoft Support. Run `Send-DiagnosticData` from any Azure Local machine to upload logs before opening the case; for the current steps, see [Collect diagnostic logs](https://learn.microsoft.com/azure/azure-local/manage/collect-logs). | ||
|
|
||
| ```powershell | ||
| Send-DiagnosticData | ||
| ``` | ||
|
|
||
| ## Permanent resolution - update to 2605 or later | ||
|
|
||
| The timing issue is fixed in build **2605**. Once 2605 or later is offered on your update train, moving to it removes the condition entirely. You do **not** need to start an update solely to work around this issue: if a retry already unblocked you, the fix will arrive through the normal update path. | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are confirming current stamp version, we should use Get-SolutionUpdateEnvironment instead of Get-SoluitonUpdate on the device. But since those 2 cmdlets are also impacted, I'm thinking that we should use Get-StampInformation instead which is through ECE