Share via

Az cli Usage Issues

cosmosmaster 1 Reputation point
2022-08-01T07:53:47.74+00:00

If you run the following command using az cli, it takes too long to reflect. Is there a way to get it reflected quickly?

az network nic ip-config update -g Nable--nic-name sbc-a703 -n service-private-vip --private-ip-address 10.0.0.100
az network nic ip-config update --name service-private-vip --nic-name sbc-a703 --public-ip-address Service-Public-VIP --resource-group Nable

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 50,192 Reputation points Microsoft Employee Moderator
    2022-08-01T16:32:32.297+00:00

    Hello @cosmosmaster ,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well.

    I understand that you are running "az network nic ip-config update" Azure CLI command but it is executing very slowly and you would like to know if there is a way to get executed quickly.

    Operations in Azure can take a noticeable amount of time. Azure CLI waits until the command has finished to accept other commands or finished the operation successfully. Few Azure CLI commands offer a --no-wait parameter which allows the console to accept new commands without interrupting the removal.
    Refer : https://learn.microsoft.com/en-us/cli/azure/use-cli-effectively?tabs=bash%2Cbash2#asynchronous-operations

    However, the "az network nic ip-config update" doesn't offer a --no-wait parameter.

    Also, I checked this command in my lab and it executed under a minute.
    If I check the execution time for this command, it is showing as 2061ms which is 0.034 mins.

    226895-image.png

    Refer : https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/measure-command?view=powershell-7.2

    If the command is taking longer than 2061ms for you, I would request you to test with other commands and check the execution time of Azure CLI. Check the version of Azure CLI you are running and report a bug in GitHub.

    Below is a similar bug reported which is caused due to latest setuptools, and it could be related to your issue:
    https://github.com/Azure/azure-cli/issues/23177

    Kindly let us know if the above helps or you need further assistance on this issue.

    ----------------------------------------------------------------------------------------------------------------

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.