Azure / Azure/azure-powershell

Disable-AzContainerAppRevision disables wrong revision

Open
#26,748 8 comments 0 reactions 0 assignees View on GitHub
act-observability-squad bug ContainerApp customer-reported Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### 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

```PowerShell
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

```PowerShell
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

```PowerShell
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

```PowerShell

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.