-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_builder_basic_sig
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_build_output_versioning
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_build_managed_image
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_builder_cancel
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_build_shared_image
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_builder_basic
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_builder_template_error_handler
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_builder_template_optimizer
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_builder_template_validator
FAILED src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py::ImageTemplateTest::test_image_template_outputs
For example, test_image_template_outputs fails with:
______________________________________________________________________ ImageTemplateTest.test_image_template_outputs _______________________________________________________________________
[gw3] linux -- Python 3.10.12 /home/user2/py310/bin/python
self = <azure.mgmt.core.polling.arm_polling.ARMPolling object at 0x7f84eaba6bf0>
def run(self) -> None:
try:
> self._poll()
../py310/lib/python3.10/site-packages/azure/core/polling/base_polling.py:730:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <azure.mgmt.core.polling.arm_polling.ARMPolling object at 0x7f84eaba6bf0>
def _poll(self) -> None:
"""Poll status of operation so long as operation is incomplete and
we have an endpoint to query.
:raises: OperationFailed if operation status 'Failed' or 'Canceled'.
:raises: BadStatus if response status invalid.
:raises: BadResponse if response invalid.
"""
if not self.finished():
self.update_status()
while not self.finished():
self._delay()
self.update_status()
if _failed(self.status()):
> raise OperationFailed("Operation failed or canceled")
E azure.core.polling.base_polling.OperationFailed: Operation failed or canceled
../py310/lib/python3.10/site-packages/azure/core/polling/base_polling.py:762: OperationFailed
The above exception was the direct cause of the following exception:
self = <latest.test_image_builder_commands.ImageTemplateTest testMethod=test_image_template_outputs>
resource_group = 'img_tmpl_outputstwpe2vfa7reoxznqimqfdppsovj5acd4olo5juvhdcioxsqrhqnfyap3bvt'
resource_group_location = 'westus2'
storage_account = 'clitestoutputssr5p3rrn5c'
@ResourceGroupPreparer(name_prefix='img_tmpl_outputs', location='westus2')
@StorageAccountPreparer(name_prefix='clitestoutputs', sku='Standard_LRS')
def test_image_template_outputs(self, resource_group, resource_group_location, storage_account):
self._identity_role(resource_group)
self.kwargs.update({
'tmpl_01': 'template01',
'img_src': LINUX_IMAGE_SOURCE,
'script': TEST_SHELL_SCRIPT_URL,
'loc': resource_group_location,
'img_1': 'managed_img_1',
'img_2': 'managed_img_2',
'vhd_out': 'vhd_1',
'container': self.create_random_name('container', 15),
})
self.cmd(
'storage container create -g {rg} --account-name {sa} -n {container} --public-access blob')
self.kwargs['storage_uri'] = 'https://{}.blob.core.windows.net/{}'.format(self.kwargs['sa'], self.kwargs['container'])
self.cmd(
'image builder create -n {tmpl_01} -g {rg} --scripts {script} --image-source {img_src} --identity {ide} --defer')
self.cmd('image builder output add -n {tmpl_01} -g {rg} --managed-image {img_1} --managed-image-location {loc} --defer',
checks=[
self.check('properties.distribute[0].location', '{loc}'),
self.check('properties.distribute[0].runOutputName', '{img_1}'),
self.check('properties.distribute[0].type', 'ManagedImage')
])
self.cmd('image builder output add -n {tmpl_01} -g {rg} --managed-image {img_2} --managed-image-location {loc} --defer',
checks=[
self.check('properties.distribute[1].location', '{loc}'),
self.check('properties.distribute[1].runOutputName', '{img_2}'),
self.check('properties.distribute[1].type', 'ManagedImage')
])
self.cmd('image builder output add -n {tmpl_01} -g {rg} --output-name {vhd_out} --artifact-tags "is_vhd=True" --is-vhd --vhd-uri {storage_uri} --defer',
checks=[
self.check('properties.distribute[2].artifactTags.is_vhd', 'True'),
self.check('properties.distribute[2].runOutputName', '{vhd_out}'),
self.check('properties.distribute[2].type', 'VHD'),
self.check('properties.distribute[2].uri', '{storage_uri}')
])
self.cmd('image builder output remove -n {tmpl_01} -g {rg} --output-name {img_2} --defer',
checks=[
self.check('length(properties.distribute)', 2)
])
# create image template from cache
> self.cmd('image builder update -n {tmpl_01} -g {rg}', checks=[
self.check('length(distribute)', 2)
])
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_image_builder_commands.py:879:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/azure-cli-testsdk/azure/cli/testsdk/base.py:176: in cmd
return execute(self.cli_ctx, command, expect_failure=expect_failure).assert_with_checks(checks)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:251: in __init__
self._in_process_execute(cli_ctx, command, expect_failure=expect_failure)
src/azure-cli-testsdk/azure/cli/testsdk/base.py:314: in _in_process_execute
raise ex.exception
../py310/lib/python3.10/site-packages/knack/cli.py:233: in invoke
cmd_result = self.invocation.execute(args)
src/azure-cli-core/azure/cli/core/commands/__init__.py:664: in execute
raise ex
src/azure-cli-core/azure/cli/core/commands/__init__.py:731: in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
src/azure-cli-core/azure/cli/core/commands/__init__.py:701: in _run_job
result = cmd_copy(params)
src/azure-cli-core/azure/cli/core/commands/__init__.py:334: in __call__
return self.handler(*args, **kwargs)
src/azure-cli-core/azure/cli/core/commands/command_operation.py:253: in handler
result = result.result()
../py310/lib/python3.10/site-packages/azure/core/polling/_poller.py:242: in result
self.wait(timeout)
../py310/lib/python3.10/site-packages/azure/core/tracing/decorator.py:76: in wrapper_use_tracer
return func(*args, **kwargs)
../py310/lib/python3.10/site-packages/azure/core/polling/_poller.py:261: in wait
raise self._exception # type: ignore
../py310/lib/python3.10/site-packages/azure/core/polling/_poller.py:176: in _start
self._polling_method.run()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <azure.mgmt.core.polling.arm_polling.ARMPolling object at 0x7f84eaba6bf0>
def run(self) -> None:
try:
self._poll()
except BadStatus as err:
self._status = "Failed"
raise HttpResponseError(response=self._pipeline_response.http_response, error=err) from err
except BadResponse as err:
self._status = "Failed"
raise HttpResponseError(
response=self._pipeline_response.http_response,
message=str(err),
error=err,
) from err
except OperationFailed as err:
> raise HttpResponseError(response=self._pipeline_response.http_response, error=err) from err
E azure.core.exceptions.HttpResponseError: (PlatformImageNotFound) Platform Image was not found. location: westus2, publisherName: Canonical, offer: UbuntuServer, sku: 18.04-LTS, version: 18.04.201808140. Please check the specified source image version in Image Builder Template exists. For information on how to check available versions, types, review https://aka.ms/azvmimagebuilderts.
E Code: PlatformImageNotFound
E Message: Platform Image was not found. location: westus2, publisherName: Canonical, offer: UbuntuServer, sku: 18.04-LTS, version: 18.04.201808140. Please check the specified source image version in Image Builder Template exists. For information on how to check available versions, types, review https://aka.ms/azvmimagebuilderts.
../py310/lib/python3.10/site-packages/azure/core/polling/base_polling.py:745: HttpResponseError
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Azure CLI TeamThe command of the issue is owned by Azure CLI teamThe command of the issue is owned by Azure CLI teamComputeaz vm/vmss/image/disk/snapshotaz vm/vmss/image/disk/snapshotquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that