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

Disable-AzContainerAppRevision disables wrong revision #26748

Open
elonmallin opened this issue Nov 22, 2024 · 7 comments
Open

Disable-AzContainerAppRevision disables wrong revision #26748

elonmallin opened this issue Nov 22, 2024 · 7 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp Microsoft.App customer-reported Service Attention This issue is responsible by Azure service team.

Comments

@elonmallin
Copy link

Description

I have a a container app with myrev1 which is running and working and myrev2 which is failing and restarting the replicas all the time so traffic is still going to myrev1. I'd like to stop myrev2 from restarting forever and maybe activating if it somehow becomes healthy to avoid a sneaky release at a random time later.

I tried Disable-AzContainerAppRevision -ContainerAppName myapp -ResourceGroupName myrg -RevisionName myrev2 but this deactivates both myrev1 and myrev2 meaning my app with myrev1 which was healthy and running is now also stopped and not just myrev2.

This seems like a bug since it should just stop the revision that I pass in to the command I assume.

Issue script & Debug output

DEBUG: 14:02:02 - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 14:02:02 - GetAzureRMContextCommand begin processing with ParameterSet 'GetSingleContext'.
DEBUG: 14:02:02 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 14:02:02 - [ConfigManager] Got nothing from [DisplaySecretsWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 14:02:02 - [ConfigManager] Got nothing from [DisplayRegionIdentified], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 14:02:02 - [ConfigManager] Got nothing from [CheckForUpgrade], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 14:02:02 - GetAzureRMContextCommand end processing.
DEBUG: [CmdletBeginProcessing]: Starting command
DEBUG: CmdletBeginProcessing: 
DEBUG: CmdletProcessRecordStart: 

Confirm
Are you sure you want to perform this action?
Performing the operation "Disable-AzContainerAppRevision_Deactivate" on target "Call remote 'ContainerAppsRevisionsDeactivateRevision' operation".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: CmdletGetPipeline: 
DEBUG: CmdletBeforeAPICall: 
DEBUG: URLCreated: /subscriptions/subid/resourceGroups/myrg/providers/Microsoft.App/containerApps/myapp/revisions/myapp--d20241122r610795/deactivate?api-version=2023-05-01
DEBUG: RequestCreated: /subscriptions/subid/resourceGroups/myrg/providers/Microsoft.App/containerApps/myapp/revisions/myapp--d20241122r610795/deactivate?api-version=2023-05-01
DEBUG: HeaderParametersAdded: 
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
POST

Absolute Uri:
https://management.azure.com/subscriptions/subid/resourceGroups/myrg/providers/Microsoft.App/containerApps/myapp/revisions/myapp--d20241122r610795/deactivate?api-version=2023-05-01

Headers:
x-ms-unique-id                : 2
x-ms-client-request-id        : 2eef424e-b124-48f7-bb79-af19bf2f6c5d
CommandName                   : Disable-AzContainerAppRevision
FullCommandName               : Disable-AzContainerAppRevision_Deactivate
ParameterSetName              : __AllParameterSets
User-Agent                    : AzurePowershell/v13.0.0,PSVersion/v7.4.6,Az.App/2.0.0

Body:



DEBUG: 14:02:16 - [ConfigManager] Got nothing from [DisableInstanceDiscovery], Module = [], Cmdlet = []. Returning default value [False].
DEBUG: BeforeCall: 
DEBUG: 14:02:16 - [ConfigManager] Got nothing from [EnableLoginByWam], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control                 : no-cache
Pragma                        : no-cache
Vary                          : Accept-Encoding
x-ms-ratelimit-remaining-subscription-writes: 199
api-supported-versions        : 2022-03-01, 2022-06-01-preview, 2022-10-01, 2022-11-01-preview, 2023-04-01-preview, 2023-05-01, 2023-05-02-preview, 2023-08-01-preview, 2023-11-02-preview, 2024-02-02-preview, 2024-03-01, 2024-08-02-preview, 2024-10-02-preview
X-Powered-By                  : ASP.NET
x-ms-ratelimit-remaining-subscription-global-writes: 2999
x-ms-request-id               : 39c304b6-8300-4545-9278-ae1ffb7bf55d
x-ms-correlation-request-id   : 39c304b6-8300-4545-9278-ae1ffb7bf55d
x-ms-routing-request-id       : SWEDENSOUTH:20241122T130218Z:39c304b6-8300-4545-9278-ae1ffb7bf55d
Strict-Transport-Security     : max-age=31536000; includeSubDomains
X-Content-Type-Options        : nosniff
X-Cache                       : CONFIG_NOCACHE
X-MSEdge-Ref                  : Ref A: CCDCCCECA42F44F38A1CAAE3E960485B Ref B: FRA231050415031 Ref C: 2024-11-22T13:02:17Z
Date                          : Fri, 22 Nov 2024 13:02:17 GMT

Body:
"Deactivate succeeded"


DEBUG: ResponseCreated: 
DEBUG: BeforeResponseDispatch: 
DEBUG: Finally: 
DEBUG: CmdletAfterAPICall: 
DEBUG: [CmdletProcessRecordAsyncEnd]: Finish HTTP process
DEBUG: CmdletProcessRecordAsyncEnd: 
DEBUG: CmdletProcessRecordEnd: 
DEBUG: AzureQoSEvent:  Module: Az.App:2.0.0; CommandName: Disable-AzContainerAppRevision; PSVersion: 7.4.6; IsSuccess: True; Duration: 00:00:15.6647740; SanitizeDuration: 00:00:00

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.6
PSEdition                      Core
GitCommitId                    7.4.6
OS                             Microsoft Windows 10.0.22631
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

I'm using version `13.0.0` of the Azure Powershell Module which is the latest.


Get-Module Az*

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     4.0.0                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     2.0.0                 Az.App                              {Disable-AzContainerAppRevision, Enable-AzContainerAppRevision, Get-AzContainerApp, Get-… 
Script     7.7.0                 Az.Resources                        {Export-AzResourceGroup, Export-AzTemplateSpec, Get-AzDenyAssignment, Get-AzDeployment…}

Error output

@elonmallin elonmallin added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 22, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported needs-triage This is a new issue that needs to be triaged to the appropriate team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 22, 2024
@VeryEarly VeryEarly added ContainerApp Microsoft.App Service Attention This issue is responsible by Azure service team. and removed needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Nov 28, 2024
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @howang-ms, @Greedygre.

@VeryEarly
Copy link
Contributor

this looks like this disable request does not contain the revision name, please help take a look @howang-ms @Greedygre

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @howang-ms, @Greedygre.

@Greedygre
Copy link

Hi @elonmallin

Which revision do you expect to deactivate? And which revision you feel should still active?
I checked the logs and found there are 3 requests during 2024-11-22 12:00:44.7718030 to 2024-11-22 15:16:33.0679140 UTC.

At 2024-11-22 12:00:44.7718030 deactivate d20241122r610389
At 2024-11-22 13:02:17.1729910 deactivate d20241122r610795 (This one is the same as the one in the debug log you show)
At 2024-11-22 15:16:31.6145990 deactivate d20241122r611165

@Greedygre
Copy link

Greedygre commented Nov 28, 2024

Hi @elonmallin
If you are still experiencing issues, please send us an email at acasupport at microsoft dot com with you subscription id, container app name and timeframe

@elonmallin
Copy link
Author

Hi, I unfortunately don't remember the exact revision number but if I passed -RevisionName d20241122r610795 I would expect only that revision to deactivate. So it would be myrev2 in my example. So I wouldn't expect the working myrev1 to also deactivate which lead to having no revision running at all. I just wanted to stop myrev2 from continually restarting.

Is it possible to continue without an email? It looks like you found the requests already so subscription id might already be visible there in the url

@Greedygre
Copy link

Hi, I unfortunately don't remember the exact revision number but if I passed -RevisionName d20241122r610795 I would expect only that revision to deactivate. So it would be myrev2 in my example. So I wouldn't expect the working myrev1 to also deactivate which lead to having no revision running at all. I just wanted to stop myrev2 from continually restarting.

Is it possible to continue without an email? It looks like you found the requests already so subscription id might already be visible there in the url

We will only disable the revision that executed with Disable-AzContainerAppRevision.
Base on the log, we only disable the revision that you executed with Disable-AzContainerAppRevision.
About why the other revision seems stop working, maybe relate to complex reason, for example relate to your private Containerapp setting. So please sent email so we can better to investigate the issue. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. ContainerApp Microsoft.App customer-reported Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants