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

"az aks update" ignores --load-balancer-outbound-ports 0 #27071

Closed
MaxHorstmann opened this issue Aug 2, 2023 · 13 comments
Closed

"az aks update" ignores --load-balancer-outbound-ports 0 #27071

MaxHorstmann opened this issue Aug 2, 2023 · 13 comments
Labels
AKS az aks/acs/openshift Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-team-attention This issue needs attention from Azure service team or SDK team Service Attention This issue is responsible by Azure service team.

Comments

@MaxHorstmann
Copy link
Contributor

MaxHorstmann commented Aug 2, 2023

Describe the bug

az aks update ignores the --load-balancer-outbound-ports (load balancer outbound allocated ports) parameter if the intended new value is 0 (which is valid).

We can clearly see in debug that the PUT request to Microsoft.ContainerService/managedClusters sends the currently configured value instead of the desired value of 0.

Related command

az aks update

Errors

No error, the 0 parameter is silently ignored

Issue script & Debug output

Let's set load-balancer-outbound-ports to a non-zero value (8000) first:

$ az aks update -n foo -g maxhorstmann-test --load-balancer-managed-outbound-ip-count 1 --load-balancer-outbound-ports 8000 --debug

...
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/137f0351-8235-42a6-ac7a-6b46be2d21c7/resourceGroups/maxhorstmann-test/providers/Microsoft.ContainerService/managedClusters/foo?api-version=2023-02-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
...
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {..."allocatedOutboundPorts": 8000}...
...

^^ This is correct.

Now let's try setting load-balancer-outbound-ports to 0:

$ az aks update -n foo -g maxhorstmann-test --load-balancer-managed-outbound-ip-count 1 --load-balancer-outbound-ports 0 --debug 
...
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/137f0351-8235-42a6-ac7a-6b46be2d21c7/resourceGroups/maxhorstmann-test/providers/Microsoft.ContainerService/managedClusters/foo?api-version=2023-02-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
...
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {..."allocatedOutboundPorts": 8000}...
...

^^ We can see that the PUT request sent the current value (8000) instead of the desired new value (0).

Expected behavior

The PUT request should send {..."allocatedOutboundPorts": 0}...

Environment Summary

azure-cli 2.50.0 *

core 2.50.0 *
telemetry 1.0.8 *

Extensions:
containerapp 0.3.28

Dependencies:
msal 1.22.0
azure-mgmt-resource 23.1.0b2

Python location '/opt/homebrew/Cellar/azure-cli/2.50.0_1/libexec/bin/python'
Extensions directory '/Users/maxhorstmann/.azure/cliextensions'

Python (Darwin) 3.10.12 (main, Jul 28 2023, 18:34:01) [Clang 14.0.3 (clang-1403.0.22.14.1)]

Additional context

IcM 411113950

@MaxHorstmann MaxHorstmann added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Aug 2, 2023
@azure-client-tools-bot-prd
Copy link

Hi @MaxHorstmann,

2.47.0 is not the latest Azure CLI(2.51.0).

Please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Aug 2, 2023
@ghost ghost added AKS az aks/acs/openshift CXP Attention This issue is handled by CXP team. Auto-Assign Auto assign by bot labels Aug 2, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Aug 2, 2023

Thank you for opening this issue, we will look into it.

@microsoft-github-policy-service
Copy link
Contributor

Thank you for your feedback. This has been routed to the support team for assistance.

@MaxHorstmann
Copy link
Contributor Author

Hi @MaxHorstmann,

2.47.0 is not the latest Azure CLI(2.51.0).

Please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

Re-confirmed issue after upgrade

@navba-MSFT navba-MSFT added Service Attention This issue is responsible by Azure service team. and removed CXP Attention This issue is handled by CXP team. labels Aug 3, 2023
@ghost
Copy link

ghost commented Aug 3, 2023

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/aks-pm.

Issue Details

Describe the bug

az aks update ignores the --load-balancer-outbound-ports (load balancer outbound allocated ports) parameter if the intended new value is 0 (which is valid).

We can clearly see in debug that the PUT request to Microsoft.ContainerService/managedClusters sends the currently configured value instead of the desired value of 0.

Related command

az aks update

Errors

No error, the 0 parameter is silently ignored

Issue script & Debug output

Let's set load-balancer-outbound-ports to a non-zero value (8000) first:

$ az aks update -n foo -g maxhorstmann-test --load-balancer-managed-outbound-ip-count 1 --load-balancer-outbound-ports 8000 --debug

...
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/137f0351-8235-42a6-ac7a-6b46be2d21c7/resourceGroups/maxhorstmann-test/providers/Microsoft.ContainerService/managedClusters/foo?api-version=2023-02-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
...
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {..."allocatedOutboundPorts": 8000}...
...

^^ This is correct.

Now let's try setting load-balancer-outbound-ports to 0:

$ az aks update -n foo -g maxhorstmann-test --load-balancer-managed-outbound-ip-count 1 --load-balancer-outbound-ports 0 --debug 
...
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/137f0351-8235-42a6-ac7a-6b46be2d21c7/resourceGroups/maxhorstmann-test/providers/Microsoft.ContainerService/managedClusters/foo?api-version=2023-02-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
...
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {..."allocatedOutboundPorts": 8000}...
...

^^ We can see that the PUT request sent the current value (8000) instead of the desired new value (0).

Expected behavior

The PUT request should send {..."allocatedOutboundPorts": 0}...

Environment Summary

azure-cli 2.50.0 *

core 2.50.0 *
telemetry 1.0.8 *

Extensions:
containerapp 0.3.28

Dependencies:
msal 1.22.0
azure-mgmt-resource 23.1.0b2

Python location '/opt/homebrew/Cellar/azure-cli/2.50.0_1/libexec/bin/python'
Extensions directory '/Users/maxhorstmann/.azure/cliextensions'

Python (Darwin) 3.10.12 (main, Jul 28 2023, 18:34:01) [Clang 14.0.3 (clang-1403.0.22.14.1)]

Additional context

IcM 411113950

Author: MaxHorstmann
Assignees: -
Labels:

bug, Service Attention, AKS, Auto-Assign, Auto-Resolve

Milestone: -

@navba-MSFT navba-MSFT added the needs-team-attention This issue needs attention from Azure service team or SDK team label Aug 3, 2023
@navba-MSFT
Copy link
Contributor

Non customer reported issue. Adding Service team to look into this.

@FumingZhang
Copy link
Member

ack, taking a look

@FumingZhang
Copy link
Member

The issue has been fixed in PR #27050 and released with 2.52.0

@rabpoi
Copy link

rabpoi commented Jan 23, 2024

The issue has been fixed in PR #27050 and released with 2.52.0

Hi Fuming Zhang
Just tested this on my side and it seems issue still present
I am using 2.56.0 CLI version

From my test

az aks show --resource-group newResourceGroup --name testenew123 | grep allocatedOutboundPorts
WARNING: The behavior of this command has been altered by the following extension: aks-preview
"allocatedOutboundPorts": 2048,

az aks update -g newResourceGroup -n testenew123 --load-balancer-outbound-ports 0 --debug

but after this last command I can see that 2048 remains, when running show command

Can you help please?

@FumingZhang
Copy link
Member

WARNING: The behavior of this command has been altered by the following extension: aks-preview

@rabpoi, could you please uninstall aks-preview and try again? Also can you share which version aks-preview are you using (az version)?

@MartinForReal, the previous fix #27050 was applied in azure-cli 2.52.0, but aks-preview relies on 2.49.0, so maybe there is still this problem in aks-preview?

@rabpoi
Copy link

rabpoi commented Jan 24, 2024

WARNING: The behavior of this command has been altered by the following extension: aks-preview

@rabpoi, could you please uninstall aks-preview and try again? Also can you share which version aks-preview are you using (az version)?

@MartinForReal, the previous fix #27050 was applied in azure-cli 2.52.0, but aks-preview relies on 2.49.0, so maybe there is still this problem in aks-preview?

@FumingZhang my aks-preview version is 1.0.0b2

az version
{
"azure-cli": "2.56.0",
"azure-cli-core": "2.56.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"aks-preview": "1.0.0b2",
"amg": "1.2.9"
}
}

@rabpoi
Copy link

rabpoi commented Jan 24, 2024

@FumingZhang
Already uninstall aks-preview and issue still the same
Now new version installed is "aks-preview": "1.0.0b3"

@FumingZhang
Copy link
Member

@rabpoi
The issue has been fixed in azure-cli since 2.58.0 (#28273) and aks-preview since 2.0.0b7 (#7230).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AKS az aks/acs/openshift Auto-Assign Auto assign by bot Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-team-attention This issue needs attention from Azure service team or SDK team Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

5 participants