Azure / Azure/azure-cli-extensions

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

Open
#605 3 comments 0 reactions 0 assignees View on GitHub
Batch extension/batch Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

- If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at [Azure/azure-cli](https://github.com/Azure/azure-cli/issues)

### 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

-----

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.