Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
383 stars 1.24k forks source link

Error while trying to run a simple pool create command with Batch extension #605

Open grandparoach opened 5 years ago

grandparoach commented 5 years ago

Extension name (the extension in question)

azure-batch-cli-extensions

Description of issue (in as much detail as possible)

I'm following the instructions from the on-line documentation at this site: https://docs.microsoft.com/en-us/azure/batch/batch-cli-templates

When I attempt to run this command: az batch pool create --json-file demo-pool.json I get this error message:

This package of the Batch Extensions module supports Azure Batch Management up to version 6.0. The current version 6.0.0 has not been tested for compatibility. This package of the Batch Extensions module supports Azure Batch Extensions up to version 5.0. The current version 5.0.5 has not been tested for compatibility. The behavior of this command has been altered by the following extension: azure-batch-cli-extensions The command failed with an unexpected error. Here is the traceback:

Unexpect element parameters in template Traceback (most recent call last): File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 206, in invoke cmd_result = self.invocation.execute(args) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 351, in execute raise ex File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 409, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 400, in _run_job cmd_copy.exception_handler(ex) File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/batch/_exception_handler.py", line 30, in batch_exception_handler 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 379, in _run_job result = cmd_copy(params) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/init.py", line 171, in call return self.handler(args, kwargs) File "/opt/az/lib/python3.6/site-packages/azure/cli/core/init.py", line 451, in default_command_handler return op(command_args) File "/home/steve/.azure/cliextensions/azure-batch-cli-extensions/azext_batch/custom.py", line 54, in create_pool templates.validate_json_object(json_obj, pool) File "/home/steve/.azure/cliextensions/azure-batch-cli-extensions/azext/batch/_template_utils.py", line 1190, in validate_json_object raise ValueError('Unexpect element {} in template'.format(item)) ValueError: Unexpect element parameters in template

To open an issue, please visit: https://aka.ms/azcli/ext/issues


ghost commented 4 years ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mksuni, @bgklein, @mscurrell.

yonzhan commented 4 years ago

batch

bgklein commented 4 years ago

@grandparoach Are you still experiencing this? Sorry for only getting to this after 1+ years. Previously this repo was unmonitored by Batch.

If you still want this looked into (and you still have a template that is broken) could you share that? Otherwise I will resolve this issue at EOW.