Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"az stack-hci-vm network lnet create" fails when tags are included #30733

Open
Nikkelmann opened this issue Jan 29, 2025 · 4 comments
Open

"az stack-hci-vm network lnet create" fails when tags are included #30733

Nikkelmann opened this issue Jan 29, 2025 · 4 comments
Labels
Auto-Assign Auto assign by bot Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@Nikkelmann
Copy link

Describe the bug

When running az stack-hci-vm network lnet create with --tags myTag="myValue" it fails.
For comparison I tried running az sshkey create and az aksarc create and both work with and without --tags using the same format.

Related command

az stack-hci-vm network lnet create

Errors

CMD-LOG-LINE-BEGIN 25972 | 2025-01-29 16:01:41,061 | INFO | az_command_data_logger | command args: stack-hci-vm network lnet create --name {} --subscription {} --resource-group {} --location {} --custom-location {} --vm-switch-name {} --ip-allocation-method {} --address-prefixes {} --gateway {} --dns-servers {} {} --ip-pool-start {} --ip-pool-end {} --vlan {} --tags {}
CMD-LOG-LINE-BEGIN 25972 | 2025-01-29 16:01:41,151 | INFO | az_command_data_logger | extension name: stack-hci-vm
CMD-LOG-LINE-BEGIN 25972 | 2025-01-29 16:01:41,151 | INFO | az_command_data_logger | extension version: 1.5.0
CMD-LOG-LINE-BEGIN 25972 | 2025-01-29 16:01:41,360 | ERROR | az_command_data_logger | The command failed with an unexpected error. Here is the traceback:
CMD-LOG-LINE-BEGIN 25972 | 2025-01-29 16:01:41,363 | ERROR | az_command_data_logger | Unable to build a model: Unable to deserialize response data. Data: ['createdBy=fel'], {str}
Traceback (most recent call last):
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\_serialization.py", line 1636, in deserialize_data
    return self.deserialize_type[iter_type](data, data_type[1:-1])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\_serialization.py", line 1675, in deserialize_dict
    return {x["key"]: self.deserialize_data(x["value"], dict_type) for x in attr}
            ~^^^^^^^
TypeError: string indices must be integers, not 'str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\_serialization.py", line 704, in body
    data = deserializer._deserialize(data_type, data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\_serialization.py", line 1472, in _deserialize
    value = self.deserialize_data(raw_value, attr_desc["type"])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\_serialization.py", line 1647, in deserialize_data
    raise DeserializationError(msg) from err
azure.core.exceptions.DeserializationError: Unable to deserialize response data. Data: ['createdBy=fel'], {str}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 666, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 734, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 703, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 336, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 120, in handler
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\generated\custom.py", line 1154, in stackhcivm_logicalnetwork_create
    raise parsed_exception
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\generated\custom.py", line 1149, in stackhcivm_logicalnetwork_create
    response = client.begin_create_or_update(resource_group_name=resource_group_name,
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/core/tracing/decorator.py", line 94, in wrapper_use_tracer
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\operations\_logical_networks_operations.py", line 643, in begin_create_or_update
    raw_result = self._create_or_update_initial(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\operations\_logical_networks_operations.py", line 509, in _create_or_update_initial
    _json = self._serialize.body(resource, "LogicalNetwork")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\user\.azure\cliextensions\stack-hci-vm\azext_stack_hci_vm\vendored_sdks\stack_hci_vm\v2024_08_01_preview\_serialization.py", line 706, in body
    raise SerializationError("Unable to build a model: " + str(err)) from err
azure.core.exceptions.SerializationError: Unable to build a model: Unable to deserialize response data. Data: ['createdBy=fel'], {str}
CMD-LOG-LINE-BEGIN 25972 | 2025-01-29 16:01:41,367 | INFO | az_command_data_logger | exit code: 1

Issue script & Debug output

az stack-hci-vm network lnet create --name "name" --subscription "subscription" --resource-group "resource-group" --location "westeurope" --custom-location "/subscriptions/GUID/resourceGroups/RGNAME/providers/Microsoft.ExtendedLocation/customLocations/CLNAME" --vm-switch-name '"SWITCHNAME"' --ip-allocation-method "Static" --address-prefixes "x.x.x.x/23" --gateway "x.x.x.x" --dns-servers 0.0.0.0 --ip-pool-start "x.x.x.x" --ip-pool-end "x.x.x.x" --vlan 1 --tags createdBy="fel"

Expected behavior

It should work with --tags included.

Environment Summary

az --version
azure-cli                         2.68.0

core                              2.68.0
telemetry                          1.1.0

Extensions:
aksarc                            1.4.23
connectedk8s                      1.10.4
customlocation                     0.1.3
k8s-runtime                        1.0.4
stack-hci-vm                       1.5.0

Dependencies:
msal                              1.31.1
azure-mgmt-resource               23.1.1

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\user\.azure\cliextensions'

Python (Windows) 3.12.8 (tags/v3.12.8:2dc476b, Dec  3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal


Your CLI is up-to-date.

Additional context

No response

@Nikkelmann Nikkelmann added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 29, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export Service Attention This issue is responsible by Azure service team. labels Jan 29, 2025
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 29, 2025

Thank you for opening this issue, we will look into it.

Copy link

Here are some similar issues that might help you. Please check if they can solve your problem.

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners.

@anthony-c-martin
Copy link
Member

anthony-c-martin commented Jan 29, 2025

@yonzhan - the "Azure Deployments" tag added is not accurate - we do not manage the "az stack-hci-vm" command group.

I think this configuration is probably the issue:

pattern: (az deployment|az bicep|az stack|az deployment-scripts|az ts|az group export)

We do own the az stack command group
We don't own the az stack-hci-vm command group

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

3 participants