-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
az feedbackauto-generates most of the information requested below, as of CLI version 2.0.62
Describe the bug
Unable to use az sig image-version create within azure cli without getting an error
To Reproduce
az sig image-version create -g ciBaseVMs --gallery-name ciImages --gallery-image-definition linux-base-vm-shared-image --end-of-life-date 2021-03-20 --gallery-image-version 1.10.0 --target-regions 'centralus' 'EastUS2=1' --replica-count 1 --managed-image '/subscriptions/XXXXXXXXXXXXXX/resourceGroups/XXXXXXXX/providers/Microsoft.Compute/images/'linux-base-vm-shared-image-1.10.0
Expected behavior
This has worked for a really long time until recent upgrades. It should create a replicated image
Environment summary
centos 7.8
az --version
azure-cli 2.17.1
core 2.17.1
telemetry 1.0.6
Extensions:
image-copy-extension 0.0.8
Python location '/usr/bin/python3'
Extensions directory '/var/lib/jenkins/.azure/cliextensions'
Python (Linux) 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
Additional context
CLIInternalError: The command failed with an unexpected error. Here is the traceback:
'MSIAuthenticationWrapper' object has no attribute 'get_all_tokens'
Traceback (most recent call last):
File '/usr/lib64/az/lib/python3.6/site-packages/knack/cli.py', line 215, in invoke
cmd_result = self.invocation.execute(args)
File '/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 659, in execute
raise ex
File '/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 722, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File '/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 715, in _run_job
six.reraise(*sys.exc_info())
File '/usr/lib64/az/lib/python3.6/site-packages/six.py', line 703, in reraise
raise value
File '/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 693, in _run_job
result = cmd_copy(params)
File '/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py', line 330, in call
return self.handler(*args, **kwargs)
File '/usr/lib64/az/lib/python3.6/site-packages/azure/cli/core/init.py', line 784, in default_command_handler
return op(**command_args)
File '/usr/lib64/az/lib/python3.6/site-packages/azure/cli/command_modules/vm/custom.py', line 3275, in create_image_version
_, _, _, external_tokens = cred.get_all_tokens('https://management.azure.com/.default')
AttributeError: 'MSIAuthenticationWrapper' object has no attribute 'get_all_tokens'