dell / dellemc-openmanage-ansible-modules

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

idrac_firmware #300

Closed alxlcr closed 3 years ago

alxlcr commented 3 years ago
Question

Hi there, I am trying to run the firmware update from the unpack SUU ISO over an NFS share. I was able to do this in previous versions, however, I get the error below using the latest collection.

Details

Error: Unable to access the share. Ensure that the share name, share mount, and share credentials provided are correct.

The server is a PowerEdge R620, IDRAC version 2.65.65.65, the nfs share is accessible without credentials and if I do the same thing from the IDRAC web interface it sees the updates right away. I enabled nfs debug logging and I can't see the idrac reaching back into the nfs server. Here's my playbook, what am I doing wrong?


anupamaloke commented 3 years ago

@alxlcr, there has just been minor changes done in idrac_firmware module with v3.6.0. Could you please share the complete output of the ansible-playbook run so that we can take a look at the JSON output? Also, would it be possible for you to log a Service Request (SR) with Dell Support as that would then help us to collect diagnostics information to troubleshoot this issue?

alxlcr commented 3 years ago

sure, pls see below. I am not sure if I can open an SR, the R620's I am working on are way past their warranty...

TASK [Update firmware from repository on a NFS Share] *** task path: /var/PROJECTS/G12_BMTL/g12_idrac_firmware_notworking.yml:10 Tuesday 03 August 2021 11:24:55 -0400 (0:00:00.040) 0:00:00.040 **** <192.168.102.38> ESTABLISH LOCAL CONNECTION FOR USER: ansible <192.168.102.38> EXEC /bin/sh -c 'echo ~ansible && sleep 0' <192.168.102.38> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/ansible/.ansible/tmp"&& mkdir "echo /home/ansible/.ansible/tmp/ansible-tmp-1628004295.77-31262-269217391254292" && echo ansible-tmp-1628004295.77-31262-269217391254292="echo /home/ansible/.ansible/tmp/ansible-tmp-1628004295.77-31262-269217391254292" ) && sleep 0' WARNING: yacc table file version is out of date

Attempting python interpreter discovery <192.168.102.38> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0' <192.168.102.38> EXEC /bin/sh -c '/usr/bin/python && sleep 0' Using module file /home/ansible/.ansible/collections/ansible_collections/dellemc/openmanage/plugins/modules/idrac_firmware.py <192.168.102.38> PUT /home/ansible/.ansible/tmp/ansible-local-31253k2jHDz/tmpti5sg3 TO /home/ansible/.ansible/tmp/ansible-tmp-1628004295.77-31262-269217391254292/AnsiballZ_idrac_firmware.py <192.168.102.38> EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1628004295.77-31262-269217391254292/ /home/ansible/.ansible/tmp/ansible-tmp-1628004295.77-31262-269217391254292/AnsiballZ_idrac_firmware.py && sleep 0' <192.168.102.38> EXEC /bin/sh -c '/usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1628004295.77-31262-269217391254292/AnsiballZ_idrac_firmware.py && sleep 0' <192.168.102.38> EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1628004295.77-31262-269217391254292/ > /dev/null 2>&1 && sleep 0' fatal: [idrac01]: FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "invocation": { "module_args": { "apply_update": false, "catalog_file_name": "Catalog.xml", "idrac_ip": "192.168.102.38", "idrac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "idrac_port": 443, "idrac_user": "root", "ignore_cert_warning": true, "job_wait": true, "reboot": true, "share_mnt": "/mnt/share", "share_name": "192.168.102.36:/var/nfs/DELLSUU/", "share_password": null, "share_user": null } } } MSG: Unable to access the share. Ensure that the share name, share mount, and share credentials provided are correct.
anupamaloke commented 3 years ago

@alxlcr, could you please try commenting out the following lines of code from idrac_firmware.py module and try it out once:

line# 418-420

418            if not upd_share.IsValid:
419                module.fail_json(msg="Unable to access the share. Ensure that the share name, "
420                                     "share mount, and share credentials provided are correct.")
alxlcr commented 3 years ago

Hi there, I get a bit further by commenting those, pls see below; one thing I noticed in my copy of idrac_firmware.py the lines you pointed out were actually 414 - 416. Interestingly, the IDRAC reports the job is completed now:

JID_280810514755 Repository Update Completed (100%) Start Time: Not Applicable Expiration Time: Not Applicable Message: RED001: Job completed successfully.

(It doesn't do anything after the download because in the mean time I created a new role task to run racadm update -t nfs sharepath so there is no update to actually apply).

TASK [Update firmware from repository on a NFS Share] *** task path: /var/PROJECTS/G12_BMTL/g12_idrac_firmware_notworking.yml:10 Wednesday 04 August 2021 11:42:28 -0400 (0:00:00.053) 0:00:00.054 ** <192.168.102.38> ESTABLISH LOCAL CONNECTION FOR USER: ansible <192.168.102.38> EXEC /bin/sh -c 'echo ~ansible && sleep 0' <192.168.102.38> EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /home/ansible/.ansible/tmp"&& mkdir "echo /home/ansible/.ansible/tmp/ansible-tmp-1628091748.38-38895-280964243209065" && echo ansible-tmp-1628091748.38-38895-280964243209065="echo /home/ansible/.ansible/tmp/ansible-tmp-1628091748.38-38895-280964243209065" ) && sleep 0' WARNING: yacc table file version is out of date

Attempting python interpreter discovery <192.168.102.38> EXEC /bin/sh -c 'echo PLATFORM; uname; echo FOUND; command -v '"'"'/usr/bin/python'"'"'; command -v '"'"'python3.7'"'"'; command -v '"'"'python3.6'"'"'; command -v '"'"'python3.5'"'"'; command -v '"'"'python2.7'"'"'; command -v '"'"'python2.6'"'"'; command -v '"'"'/usr/libexec/platform-python'"'"'; command -v '"'"'/usr/bin/python3'"'"'; command -v '"'"'python'"'"'; echo ENDFOUND && sleep 0' <192.168.102.38> EXEC /bin/sh -c '/usr/bin/python && sleep 0' Using module file /home/ansible/.ansible/collections/ansible_collections/dellemc/openmanage/plugins/modules/idrac_firmware.py <192.168.102.38> PUT /home/ansible/.ansible/tmp/ansible-local-38880UPzVE6/tmpuD2zIu TO /home/ansible/.ansible/tmp/ansible-tmp-1628091748.38-38895-280964243209065/AnsiballZ_idrac_firmware.py <192.168.102.38> EXEC /bin/sh -c 'chmod u+x /home/ansible/.ansible/tmp/ansible-tmp-1628091748.38-38895-280964243209065/ /home/ansible/.ansible/tmp/ansible-tmp-1628091748.38-38895-280964243209065/AnsiballZ_idrac_firmware.py && sleep 0' <192.168.102.38> EXEC /bin/sh -c '/usr/bin/python /home/ansible/.ansible/tmp/ansible-tmp-1628091748.38-38895-280964243209065/AnsiballZ_idrac_firmware.py && sleep 0' <192.168.102.38> EXEC /bin/sh -c 'rm -f -r /home/ansible/.ansible/tmp/ansible-tmp-1628091748.38-38895-280964243209065/ > /dev/null 2>&1 && sleep 0' The full traceback is: WARNING: The below traceback may *not* be related to the actual failure. File "/tmp/ansible_idrac_firmware_payload_W2ztO7/ansible_idrac_firmware_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/idrac_firmware.py", line 629, in main File "/tmp/ansible_idrac_firmware_payload_W2ztO7/ansible_idrac_firmware_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/idrac_firmware.py", line 420, in update_firmware_omsdk File "/tmp/ansible_idrac_firmware_payload_W2ztO7/ansible_idrac_firmware_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/idrac_firmware.py", line 256, in get_check_mode_status fatal: [idrac01]: FAILED! => { "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python" }, "changed": false, "invocation": { "module_args": { "apply_update": true, "catalog_file_name": "Catalog.xml", "idrac_ip": "192.168.102.38", "idrac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "idrac_port": 443, "idrac_user": "admin", "ignore_cert_warning": true, "job_wait": true, "reboot": true, "share_mnt": null, "share_name": "192.168.102.36:/var/nfs/DELLSUU/", "share_password": null, "share_user": null } } } MSG: 'job_details' PLAY RECAP ****************************************************************************************************************************** idrac01 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
anupamaloke commented 3 years ago

@alxlcr, sorry for delayed response. Could you please let us know whether you were able to proceed further? Also, would it be possible for you to download the latest collection version, comment out the lines listed in above message and try it out?

anupamaloke commented 3 years ago

@alxlcr, this issue should have been fixed now with the latest 4.0.0 release. I am closing this issue for now. Please re-open this issue or a new issue in case you are still running into this error.