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

Error while running (az iot ops init) to deploy Azure IoT Operations #28301

Closed
sebassem opened this issue Feb 4, 2024 · 6 comments
Closed

Error while running (az iot ops init) to deploy Azure IoT Operations #28301

sebassem opened this issue Feb 4, 2024 · 6 comments
Labels
Auto-Assign Auto assign by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. IoT/CLI IoT Service Attention This issue is responsible by Azure service team.

Comments

@sebassem
Copy link

sebassem commented Feb 4, 2024

Describe the bug

When running the initialize command, I get the following error

(InvalidTemplate) Deployment template validation failed: 'The resource 'Microsoft.IoTOperationsMQ/mq/init-c0820-mq-instance/broker/broker/listener/non-tls-listener' at line '1' and column '28621' is defined multiple times in a template. Please see https://aka.ms/arm-syntax-resources for usage details.'.
Code: InvalidTemplate
Message: Deployment template validation failed: 'The resource 'Microsoft.IoTOperationsMQ/mq/init-c0820-mq-instance/broker/broker/listener/non-tls-listener' at line '1' and column '28621' is defined multiple times in a template. Please see https://aka.ms/arm-syntax-resources for usage details.'.
Additional Information:Type: TemplateViolation
Info: {
"lineNumber": 1,
"linePosition": 28621,
"path": "properties.template.resources[19]"
}

Related command

az iot ops init --cluster $arcClusterName -g $resourceGroup --kv-id $keyVaultId --sp-app-id $spnClientID --sp-secret $spnClientSecret --mq-service-type loadBalancer --mq-insecure true --simulate-plc true --only-show-errors

Errors

(InvalidTemplate) Deployment template validation failed: 'The resource 'Microsoft.IoTOperationsMQ/mq/init-c0820-mq-instance/broker/broker/listener/non-tls-listener' at line '1' and column '28621' is defined multiple times in a template. Please see https://aka.ms/arm-syntax-resources for usage details.'.
Code: InvalidTemplate
Message: Deployment template validation failed: 'The resource 'Microsoft.IoTOperationsMQ/mq/init-c0820-mq-instance/broker/broker/listener/non-tls-listener' at line '1' and column '28621' is defined multiple times in a template. Please see https://aka.ms/arm-syntax-resources for usage details.'.
Additional Information:Type: TemplateViolation
Info: {
"lineNumber": 1,
"linePosition": 28621,
"path": "properties.template.resources[19]"
}

Issue script & Debug output

(InvalidTemplate) Deployment template validation failed: 'The resource 'Microsoft.IoTOperationsMQ/mq/init-c0820-mq-instance/broker/broker/listener/non-tls-listener' at line '1' and column '28621' is defined multiple times in a template. Please see https://aka.ms/arm-syntax-resources for usage details.'.
Code: InvalidTemplate
Message: Deployment template validation failed: 'The resource 'Microsoft.IoTOperationsMQ/mq/init-c0820-mq-instance/broker/broker/listener/non-tls-listener' at line '1' and column '28621' is defined multiple times in a template. Please see https://aka.ms/arm-syntax-resources for usage details.'.
Additional Information:Type: TemplateViolation
Info: {
"lineNumber": 1,
"linePosition": 28621,
"path": "properties.template.resources[19]"
}

Expected behavior

No errors should happen

Environment Summary

azure-cli 2.56.0

core 2.56.0
telemetry 1.1.0

Extensions:
account 0.2.5
appservice-kube 0.2.2
arcdata 1.5.5
azure-iot-ops 0.1.0b1
bastion 0.3.0
connectedk8s 1.4.0
connectedmachine 0.7.0
connectedvmware 0.2.1
customlocation 0.1.3
eventgrid 1.0.0b1
k8s-configuration 1.7.0
k8s-extension 1.4.5
kusto 0.5.0
monitor-control-service 0.3.1
resource-graph 2.1.0
ssh 2.0.1

Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2

Additional context

No response

@sebassem sebassem added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 4, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added IoT Service Attention This issue is responsible by Azure service team. Auto-Assign Auto assign by bot IoT/CLI labels Feb 4, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Feb 4, 2024

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

@c-ryan-k
Copy link
Member

c-ryan-k commented Feb 6, 2024

@sebassem - I noticed your AIO extension version is 0.1.0b1 - the deployment template has changed considerably since this version, we're now on 0.3.0b1.

Can you try updating your extension with az extension update -n azure-iot-ops and see if that solves this issue?

@c-ryan-k
Copy link
Member

c-ryan-k commented Feb 6, 2024

@sebassem my apologies, I just noticed you were also using the --mq-insecure flag, we have some changes coming in soon that should address another template issue involving this parameter. I'll update this issue when we release the next version.

@sebassem
Copy link
Author

sebassem commented Feb 7, 2024

az extension update -n azure-iot-ops

Thanks Ryan, I got the same after upgrade. I guess its related to the --mq-insecure flag as you mentioned. Any workarounds I can implement in the mean time ?

@luiscast84
Copy link

@sebassem @c-ryan-k Thanks for following this issue. I have been working with Paymaun to release a hot fix that is coming probably on 2/7/24.
The reason for the bug is due to the pre-flight stage builds the deployment template once before the real deployment, and if --mq-insecure is passed , pre-flight modifies the template , then later the template gets modified again for the actual deployment.

@sebassem
Copy link
Author

sebassem commented Feb 8, 2024

Problem is now resolved with the latest extension version released yesterday. Thank you

@sebassem sebassem closed this as completed Feb 8, 2024
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 bug This issue requires a change to an existing behavior in the product in order to be resolved. IoT/CLI IoT Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

4 participants