Closed farhadsaifuddin closed 2 years ago
@farhadsaifuddin, could you also please post the version of the dellemc.openmanage collection that you are using in your environment?
ansible-galaxy collection list dellemc.openmanage
# /home/anupam/.ansible/collections/ansible_collections
Collection Version
------------------ -------
dellemc.openmanage 5.5.0
we are on dellemc-openmanage-5.0.0
btw collection list command is failing , there is no list option
[ansiblesvc@rhp0stl0 ~]$ ansible-galaxy collection list dellemc.openmanage usage: ansible-galaxy collection [-h] COLLECTION_ACTION ... ansible-galaxy collection: error: argument COLLECTION_ACTION: invalid choice: 'list' (choose from 'init', 'build', 'publish', 'install') [ansiblesvc@rhp0stl0 ~]$
Just to keep everyone in the community up-to-date, @farhadsaifuddin and I talked over email. Updating to latest dellemc.openmanage collection version gets rid of the HTTP 400 error.
@farhadsaifuddin, please feel free to create a new issue or reopen this one if you are still running into the same error. Closing this issue for now.
Bug Description
Trying to deploy template on the host and it is failing
template_id: 12
Here is the error
The full traceback is: File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/modules/ome_template.py", line 824, in main File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/module_utils/ome.py", line 172, in invoke_request raise err File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/module_utils/ome.py", line 169, in invoke_request resp = open_url(url, data=data, *url_kwargs) File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible/module_utils/urls.py", lin e 1390, in open_url unredirected_headers=unredirected_headers) File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible/module_utils/urls.py", lin e 1294, in open r = urllib_request.urlopen(urlopen_args) File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) fatal: [hidden]: FAILED! => { "changed": false, "error_info": { "error": { "@Message.ExtendedInfo": [ { "Message": "Unable to process the request because of an internal error.", "MessageArgs": [], "MessageId": "CGEN6008", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical" } ], "code": "Base.1.0.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information." } }, "invocation": { "module_args": { "attributes": null, "ca_path": null, "command": "deploy", "device_group_names": [], "device_id": [], "device_service_tag": [ "hidden" ], "hostname": "hidden", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 443, "template_id": null, "template_name": "Ansible Demo Template", "template_view_type": "Deployment", "timeout": 30, "username": "admin", "validate_certs": false } }, "msg": "HTTP Error 400: 400" }
Component or Module Name
dellemc.openmanage.ome_template
Ansible Version
2.9
Python Version
Python 3.6
iDRAC/OME/OME-M version
3.9
Operating System
Red Hat Enterprise Linux release 8.5
Playbook Used
hosts: OME connection: local name: Discover, Deploy SCP, Create Group, Add Server to Group, Update, and Deploy OS gather_facts: False collections:
vars: ansible_python_interpreter: "{{ ansible_playbook_python }}"
tasks:
name: Discover servers in a range dellemc.openmanage.ome_discovery: validate_certs: False hostname: "{{ome_hostname}}" username: "{{ome_user}}" password: "{{ome_password}}" discovery_job_name: "Ansible Servers" discovery_config_targets:
name: Create a new device group dellemc.openmanage.ome_groups: validate_certs: False hostname: "{{ome_hostname}}" username: "{{ome_user}}" password: "{{ome_password}}" name: "Ansible Demo" description: "Group for Ansible Demo"
name: Add devices to a static device group by using the group name and IPv4 addresses dellemc.openmanage.ome_device_group: validate_certs: False hostname: "{{ome_hostname}}" username: "{{ome_user}}" password: "{{ome_password}}" name: "Ansible Demo" ip_addresses:
name: Pause for 30 seconds for discovery to finish. pause: seconds: 30
name: Create a template from a reference device dellemc.openmanage.ome_template: validate_certs: False hostname: "{{ome_hostname}}" username: "{{ome_user}}" password: "{{ome_password}}" device_service_tag:
name: Deploy template on one or multiple devices. dellemc.openmanage.ome_template: validate_certs: False hostname: "{{ome_hostname}}" username: "{{ome_user}}" password: "{{ome_password}}" command: "deploy"
template_id: 12
template_name: "Ansible Demo Template" device_service_tag:
Logs
The full traceback is: File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/modules/ome_template.py", line 824, in main File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/module_utils/ome.py", line 172, in invoke_request raise err File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/module_utils/ome.py", line 169, in invoke_request resp = open_url(url, data=data, *url_kwargs) File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible/module_utils/urls.py", lin e 1390, in open_url unredirected_headers=unredirected_headers) File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible/module_utils/urls.py", lin e 1294, in open r = urllib_request.urlopen(urlopen_args) File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) fatal: [10.158.22.37]: FAILED! => { "changed": false, "error_info": { "error": { "@Message.ExtendedInfo": [ { "Message": "Unable to process the request because of an internal error.", "MessageArgs": [], "MessageId": "CGEN6008", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical" } ], "code": "Base.1.0.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information." } }, "invocation": { "module_args": { "attributes": null, "ca_path": null, "command": "deploy", "device_group_names": [], "device_id": [], "device_service_tag": [ "hidden" ], "hostname": "hidden", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 443, "template_id": null, "template_name": "Ansible Demo Template", "template_view_type": "Deployment", "timeout": 30, "username": "admin", "validate_certs": false } }, "msg": "HTTP Error 400: 400"
Steps to Reproduce
deploy the template against the host
Expected Behavior
deploy the template
Actual Behavior
error
The full traceback is: File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/modules/ome_template.py", line 824, in main File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/module_utils/ome.py", line 172, in invoke_request raise err File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible_collections/dellemc/openma nage/plugins/module_utils/ome.py", line 169, in invoke_request resp = open_url(url, data=data, *url_kwargs) File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible/module_utils/urls.py", lin e 1390, in open_url unredirected_headers=unredirected_headers) File "/tmp/ansible_dellemc.openmanage.ome_template_payload_nz_5tqt5/ansible_dellemc.openmanage.ome_template_payload.zip/ansible/module_utils/urls.py", lin e 1294, in open r = urllib_request.urlopen(urlopen_args) File "/usr/lib64/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/usr/lib64/python3.6/urllib/request.py", line 532, in open response = meth(req, response) File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib64/python3.6/urllib/request.py", line 570, in error return self._call_chain(args) File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain result = func(args) File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) fatal: [hidden]: FAILED! => { "changed": false, "error_info": { "error": { "@Message.ExtendedInfo": [ { "Message": "Unable to process the request because of an internal error.", "MessageArgs": [], "MessageId": "CGEN6008", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical" } ], "code": "Base.1.0.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information." } }, "invocation": { "module_args": { "attributes": null, "ca_path": null, "command": "deploy", "device_group_names": [], "device_id": [], "device_service_tag": [ "hidden" ], "hostname": "hidden", "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "port": 443, "template_id": null, "template_name": "Ansible Demo Template", "template_view_type": "Deployment", "timeout": 30, "username": "admin", "validate_certs": false } }, "msg": "HTTP Error 400: 400"
Screenshots
No response
Additional Information
No response