Skip to content

az vm update --remove with --ids does't work #6767

@kmin1223

Description

@kmin1223

Describe the bug
I tried to remove some tags of VMs in specific resource group, but It didn't work.
Removing of one VM's tag was success, but several VM's with --ids job was failed.

To Reproduce

  1. command
    az vm update --ids $(az vm list -g RG-krza-m-world-central-w01-VM --query "[].id" -o tsv) --remove tags.dedicated_node_group

  2. error
    pop from empty list
    Traceback (most recent call last):
    File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
    cmd_result = self.invocation.execute(args)
    File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 336, in execute
    six.reraise(*sys.exc_info())
    File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
    File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 310, in execute
    result = cmd(params)
    File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 171, in call
    return super(AzCliCommand, self).call(*args, **kwargs)
    File "/opt/az/lib/python3.6/site-packages/knack/commands.py", line 109, in call
    return self.handler(*args, **kwargs)
    File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 449, in handler
    remove_properties(instance, arg_values)
    File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/arm.py", line 751, in remove_properties
    list_attribute_path = _get_internal_path(argument_values.pop(0))
    IndexError: pop from empty list

Expected behavior
A clear and concise description of what you expected to happen.

Environment summary
OS: windows 10 WSL

az --version
azure-cli (2.0.33)

acr (2.0.25)
acs (2.0.33)
advisor (0.5.1)
ams (0.1.1)
appservice (0.1.33)
backup (1.1.1)
batch (3.2.2)
batchai (0.2.3)
billing (0.1.8)
cdn (0.0.14)
cloud (2.0.13)
cognitiveservices (0.1.13)
command-modules-nspkg (2.0.1)
configure (2.0.15)
consumption (0.3.1)
container (0.1.24)
core (2.0.33)
cosmosdb (0.1.21)
dla (0.1.0)
dls (0.0.21)
dms (0.0.1)
eventgrid (0.1.12)
eventhubs (0.1.3)
extension (0.0.14)
feedback (2.1.1)
find (0.2.9)
interactive (0.3.21)
iot (0.1.20)
keyvault (2.0.22)
lab (0.0.22)
maps (0.1.0)
monitor (0.1.7)
network (2.1.2)
nspkg (3.0.2)
profile (2.0.25)
rdbms (0.2.3)
redis (0.2.13)
reservations (0.1.2)
resource (2.0.29)
role (2.0.24)
servicebus (0.1.2)
servicefabric (0.0.12)
sql (2.0.26)
storage (2.0.33)
vm (2.0.32)

Python location '/opt/az/bin/python3'
Extensions directory '/home/lkm/.azure/cliextensions'

Python (Linux) 3.6.1 (default, May 18 2018, 04:21:17)
[GCC 5.4.0 20160609]

Legal docs and information: aka.ms/AzureCliLegal

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Compute-clibugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions