dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
335 stars 163 forks source link

Template deployment is failing when deployed on host #428

Closed farhadsaifuddin closed 2 years ago

farhadsaifuddin commented 2 years ago

Bug Description

Trying to deploy template on the host and it is failing

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


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

anupamaloke commented 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
farhadsaifuddin commented 2 years ago

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 ~]$

anupamaloke commented 2 years ago

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.

anupamaloke commented 2 years ago

@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.