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
redfish_facts results an Unknown error #49713
Comments
Files identified in the description: If these files are inaccurate, please update the |
@dnuka I agree that some of the error messages could be more specific. For now, can you please provide more information about your environment? What out-of-band device is listening at http://127.0.0.1:8000? Did you modify the redfish_facts module so that it would connect using http instead of https? (default is https). |
Hi @jose-delarosa. Thank you for the quick response. I'm an intern at the OpenStack Ironic team.
I have configured to run sushy-emulator on a remote cent-os server. And ran this playbook against it.
No. I didn't modify the I'm very much new to IT automation, Redfish and still learning Ansible :) Right now I'm trying to figure out why Ansible is outputting "Unknown error". Also, I'm really interested in contributing to Thanks. |
Hi, @dnuka. Thanks for opening the issue. The "Unknown error" is coming from the |
Hi :) @billdodd Thank you for the response. I was able to figure out why Ansible is outputting "Unknown error" on my side. I have made a mistake when passing Updated playbook fatal: [HOST]: FAILED! => { "changed": false, "module_stderr": "Shared connection to HOST closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1544508444.8116581-100042417563386/AnsiballZ_redfish_facts.py\", line 113, in <module>\r\n _ansiballz_main()\r\n File \"/root/.ansible/tmp/ansible-tmp-1544508444.8116581-100042417563386/AnsiballZ_redfish_facts.py\", line 105, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/root/.ansible/tmp/ansible-tmp-1544508444.8116581-100042417563386/AnsiballZ_redfish_facts.py\", line 48, in invoke_module\r\n imp.load_module('__main__', mod, module, MOD_DESC)\r\n File \"/tmp/ansible_redfish_facts_payload_sIgx0e/__main__.py\", line 268, in <module>\r\n File \"/tmp/ansible_redfish_facts_payload_sIgx0e/__main__.py\", line 199, in main\r\n File \"/tmp/ansible_redfish_facts_payload_sIgx0e/ansible_redfish_facts_payload.zip/ansible/module_utils/redfish_utils.py\", line 133, in _find_systems_resource\r\nUnboundLocalError: local variable 'systems_service' referenced before assignment\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 }
@billdodd Can you please provide me the link to
Yes! I'm extremely interested. Thanks. |
The redfish_facts module is here: https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/redfish_utils.py For the new error you are seeing, it looks like the |
I think both errors are bugs. Even if the server is not fully compliant (which I'm not sure), the errors should be better. |
Thank you @billdodd :)
It appears so,
I agree with @dtantsur :) We could do better by providing more specific error messages to the end user. Also, why there are two locations? I mean, Thanks. |
I completely agree that it is a bug causing the Regarding the Having much of the core Redfish function in a utility module allows vendors to extend that utility module if they need to develop a module that provides non-standard (OEM) function. |
Hi @billdodd How do I test a modified module. I have found this. But there is no mention of testing against a remote server. Also, I couldn't find any tests for already existing custom redfish modules. Do you have some tests somewhere in some form? As a contributor how do I ensure the workings of the change? Thanks :) |
Hi @dnuka - The link you referenced describes the environment setup I use for development and testing (at the beginning of the page in the "Environment setup" section). With that venv and hacking/env-setup, when you run a playbook it will use the modules in your local repository. There aren't any tests (like unit tests or functional tests) for the Redfish ansible modules as far as I know. But the sample inventory file and playbooks in this repo should be helpful for seeing how to test against a remote Redfish server: https://github.com/dell/redfish-ansible-module |
@billdodd Thank you very much for answering all my questions :) It was very helpful. I had some doubts about executing Please let me know, If there is anything Ansible and Redfish related. I'm very much happy to learn and contribute. |
SUMMARY
Hello
Ansible
community!When executing a simple playbook with redfish_facts module, results
Unknown error
I'm unable to debug/improve my playbook with an error like
Unknown error
. So, I think it would be great if we could improve this to much more verbose error message.Thanks :)
ISSUE TYPE
COMPONENT NAME
redfish_facts
ANSIBLE VERSION
The text was updated successfully, but these errors were encountered: