Azure / azure-cli

Azure Command-Line Interface
MIT License
4k stars 2.98k forks source link

`aks update` with "--pod-cidr" argument to a existing cluster still return with "Succeeded" #28403

Open m8yng opened 8 months ago

m8yng commented 8 months ago

Describe the bug

There should be some warning or error notice to avoid the false idea of az aks update allowing --pod-cidr post cluster creation or after CNI upgrade[0].

Related command

az aks update

Errors

No error. (becasue it should provide some warnings or notices instead.)

Issue script & Debug output

For example, running az aks update against a cluster that is already using CNI in overlay mode, the operation will still return as ok; The command ran as : az aks update --name on-test --resource-group ae-test --network-plugin-mode overlay --pod-cidr 10.243.0.0/28 -o yamlc

And the podCidr won't change as it should. Here is the partial output:

  networkPlugin: azure
  networkPluginMode: overlay
  networkPolicy: null
  outboundType: loadBalancer
  podCidr: 10.244.0.0/16
  podCidrs:
  - 10.244.0.0/16
  serviceCidr: 10.0.0.0/16
  serviceCidrs:
  - 10.0.0.0/16

Expected behavior

Given the --pod-cidr argument is assigned, it should be hinted the parameter won't pass through.

But the return of operation is stated as success in green(debug). This might give a false expectation that POD CIDR is updatable.

Environment Summary

az --version
azure-cli                         2.57.0

core                              2.57.0
telemetry                          1.1.0

Extensions:
aks-preview                      0.5.156
azure-firewall                    0.14.8
bastion                            0.2.5
costmanagement                     0.2.1
fleet                              0.2.2
interactive                        0.5.1
k8s-extension                      1.5.1
resource-graph                     2.1.0
ssh                                2.0.1

Dependencies:
msal                              1.26.0
azure-mgmt-resource             23.1.0b2

Python location '/home/user/.asdf/installs/azure-cli/2.57.0/bin/venv/bin/python3'
Extensions directory '/home/user/.azure/cliextensions'

Python (Linux) 3.11.3 (main, May  5 2023, 11:38:52) [GCC 11.3.0]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

References:

yonzhan commented 8 months ago

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