Azure-cli: [ACI] 'az container logs' --name and --container-name args are swapped

Created on 18 Dec 2017  路  3Comments  路  Source: Azure/azure-cli

Description

The --name and --container-name args are swapped for the az container logs command. That is, to get the command to function properly, you must currently specify the container name for --name, and the container group name for --container-name. This is backwards.

Environment summary

Install Method: MSI / CLI version: 2.0.22 / OS version: Windows 10 / Shell Type: cmd.exe

Repro

C:\Users\marsma\aci>az container list -g rg604 -o table
Name              ResourceGroup    ProvisioningState    Image                                                           IP:ports           CPU/Memory       OsType    Location
----------------  ---------------  -------------------  --------------------------------------------------------------  -----------------  ---------------  --------  ----------
myContainerGroup  rg604            Succeeded            microsoft/aci-helloworld:latest,microsoft/aci-tutorial-sidecar  52.224.235.201:80  1.0 core/1.5 gb  Linux     eastus

C:\Users\marsma\aci>az container logs --name myContainerGroup --container-name aci-tutorial-app --resource-group rg604
The Resource 'Microsoft.ContainerInstance/containerGroups/aci-tutorial-app' under resource group 'rg604' was not found.

C:\Users\marsma\aci>az container logs --name aci-tutorial-app --container-name myContainerGroup --resource-group rg604
listening on port 80
::1 - - [18/Dec/2017:21:31:08 +0000] "HEAD / HTTP/1.1" 200 1663 "-" "curl/7.54.0"
::1 - - [18/Dec/2017:21:31:11 +0000] "HEAD / HTTP/1.1" 200 1663 "-" "curl/7.54.0"
::1 - - [18/Dec/2017:21:31:15 +0000] "HEAD / HTTP/1.1" 200 1663 "-" "curl/7.54.0"
Container Service Attention bug

All 3 comments

Looks like this was fixed in https://github.com/Azure/azure-cli/pull/5040/files
The CLI will be releasing tomorrow which should include the fix.
cc: @yolo3301

Confirmed fixed in azuresdk/azure-cli-python:latest (--version 2.0.23).

Thanks for confirming.

Was this page helpful?
0 / 5 - 0 ratings