dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
329 stars 162 forks source link

idrac_firmware: AttributeError: 'OpenURLResponse' object has no attribute 'code #156

Closed MikeDaSystemAdmin closed 3 years ago

MikeDaSystemAdmin commented 3 years ago

Playbook is below:


When I run this, the Job Queue does get the job, and the update does occur. however the ansible play fails with this error:

AttributeError: 'OpenURLResponse' object has no attribute 'code' fatal: [localhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1600979353.62-16765-228947460323250/AnsiballZ_idrac_firmware.py\", line 102, in \n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1600979353.62-16765-228947460323250/AnsiballZ_idrac_firmware.py\", line 94, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1600979353.62-16765-228947460323250/AnsiballZ_idrac_firmware.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible.modules.remote_management.dellemc.idrac_firmware', init_globals=None, run_name='main', alter_sys=True)\n File \"/opt/rh/rh-python36/root/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/opt/rh/rh-python36/root/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/opt/rh/rh-python36/root/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_idrac_firmware_payload_noeskdbl/ansible_idrac_firmware_payload.zip/ansible/modules/remote_management/dellemc/idrac_firmware.py\", line 403, in \n File \"/tmp/ansible_idrac_firmware_payload_noeskdbl/ansible_idrac_firmware_payload.zip/ansible/modules/remote_management/dellemc/idrac_firmware.py\", line 391, in main\n File \"/tmp/ansible_idrac_firmware_payload_noeskdbl/ansible_idrac_firmware_payload.zip/ansible/modules/remote_management/dellemc/idrac_firmware.py\", line 320, in update_firmware\n File \"/tmp/ansible_idrac_firmware_payload_noeskdbl/ansible_idrac_firmware_payload.zip/ansible/modules/remote_management/dellemc/idrac_firmware.py\", line 263, in update_firmware_url\n File \"/tmp/ansible_idrac_firmware_payload_noeskdbl/ansible_idrac_firmware_payload.zip/ansible/modules/remote_management/dellemc/idrac_firmware.py\", line 235, in get_jobid\nAttributeError: 'OpenURLResponse' object has no attribute 'code'\n",

anupamaloke commented 3 years ago

@MikeDaSystemAdmin, what is the server model and the iDRAC firmware version?

apaqd commented 3 years ago

I've got the same issue. Server: PowerEdge R740xd2 ; IDRAC FW: 4.22.00.53

MikeDaSystemAdmin commented 3 years ago

I am connecting to a PowerEdge R440 The drac is 4.22.00.53 / 4.22.00.00 (Both versions cause the same error)

I have been able to replicate this on another machine with OMSDK installed, and both machines are using OMSDK Version 2.1.2

MikeDaSystemAdmin commented 3 years ago

As an update, I setup a Venv (My above examples were doing it straight from ansible). My Venv is running ansible 2.9.13, and I get the same error.

jagadeeshnv commented 3 years ago

@MikeDaSystemAdmin Team is analyzing the issue, Thanks for the details

benfab commented 3 years ago

@anupamaloke @jagadeeshnv We are facing the exact same issue, we will be happy to get the outcome of your analyze.

jagadeeshnv commented 3 years ago

@MikeDaSystemAdmin @benfab @apaqd We have committed the fix in devel, please verify

MikeDaSystemAdmin commented 3 years ago

@jagadeeshnv I pulled devel and ran it against the Poweredge R440, and no longer get the error!

Thank you

jagadeeshnv commented 3 years ago

Thank you for the quick repsonse