dell / dellemc-openmanage-ansible-modules

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

dell Firmware idrac update issue #54

Closed vchevakula closed 4 years ago

vchevakula commented 5 years ago

Hello All,

I was just trying to update the dell firmware update using this below playbook

---
- hosts: all
  connection: local
  name: Update Firmware
  gather_facts: False
  vars:
    ansible_python_interpreter: /usr/bin/python3

  tasks:
  - name: Update Firmware
    dellemc_idrac_firmware:
       idrac_ip: "{{ inventory_hostname }}"
       idrac_user: "root"
       idrac_pwd: "calvin"
       share_name: "192.168.50.73:/opt/dell/dellemcrepositorymanager/export"
       share_mnt: "/opt/dell/dellemcrepositorymanager/export"
       catalog_file_name: "Dell_1.00_Catalog.xml"
       reboot: True
       job_wait: True
    tags :
       - installfirmware

inventory file

[all]
192.168.192.126

invoke by running this command

ansible-playbook firm.yml -i host -vvv -t installfirmware

I'm get this below output

root@ansihost:~/Dell-EMC-Ansible-Modules-for-iDRAC# ansible-playbook firm.yml -i host -vvv -t installfirmware
ansible-playbook 2.7.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.5/dist-packages/ansible
  executable location = /usr/local/bin/ansible-playbook
  python version = 3.5.2 (default, Nov 12 2018, 13:43:14) [GCC 5.4.0 20160609]
Using /etc/ansible/ansible.cfg as config file
Parsed /root/Dell-EMC-Ansible-Modules-for-iDRAC/host inventory source with ini plugin

PLAYBOOK: firm.yml *************************************************************************************************************************************************************************************************************************
1 plays in firm.yml

PLAY [Update Firmware Inventory] ***********************************************************************************************************************************************************************************************************
META: ran handlers

TASK [Update Firmware Inventory] ***********************************************************************************************************************************************************************************************************
task path: /root/Dell-EMC-Ansible-Modules-for-iDRAC/firm.yml:10
<192.168.192.126> ESTABLISH LOCAL CONNECTION FOR USER: root
<192.168.192.126> EXEC /bin/sh -c 'echo ~root && sleep 0'
<192.168.192.126> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280 `" && echo ansible-tmp-1559716212.419148-105721185102280="` echo /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280 `" ) && sleep 0'
Using module file /usr/local/lib/python3.5/dist-packages/ansible/modules/remote_management/dellemc/idrac/dellemc_idrac_firmware.py
<192.168.192.126> PUT /root/.ansible/tmp/ansible-local-41434_afkzn4/tmpzvm4zk9z TO /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py
<192.168.192.126> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/ /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py && sleep 0'
<192.168.192.126> EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py && sleep 0'
<192.168.192.126> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py", line 113, in <module>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py", line 105, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py", line 48, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/usr/lib/python3.5/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 626, in _exec
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py", line 212, in <module>
  File "/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py", line 204, in main
  File "/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py", line 166, in update_firmware
  File "/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py", line 265, in update_from_repo
    reboot_needed=reboot_needed, job_wait=job_wait)
  File "/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py", line 348, in update_from_repo_usingscp_redfish
    self.edit_xml_file(localfile, scpattrval)
  File "/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py", line 366, in edit_xml_file
    tree = ET.parse(file_location)
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 1184, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 585, in parse
    source = open(source, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/opt/dell/dellemcrepositorymanager/export/scp_GX58BT2_20190604_233014.xml'

fatal: [192.168.192.126]: FAILED! => {
    "changed": false,
    "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py\", line 113, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py\", line 105, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1559716212.419148-105721185102280/AnsiballZ_dellemc_idrac_firmware.py\", line 48, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/usr/lib/python3.5/imp.py\", line 234, in load_module\n    return load_source(name, filename, file)\n  File \"/usr/lib/python3.5/imp.py\", line 170, in load_source\n    module = _exec(spec, sys.modules[name])\n  File \"<frozen importlib._bootstrap>\", line 626, in _exec\n  File \"<frozen importlib._bootstrap_external>\", line 665, in exec_module\n  File \"<frozen importlib._bootstrap>\", line 222, in _call_with_frames_removed\n  File \"/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py\", line 212, in <module>\n  File \"/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py\", line 204, in main\n  File \"/tmp/ansible_dellemc_idrac_firmware_payload_4ifm_gft/__main__.py\", line 166, in update_firmware\n  File \"/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py\", line 265, in update_from_repo\n    reboot_needed=reboot_needed, job_wait=job_wait)\n  File \"/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py\", line 348, in update_from_repo_usingscp_redfish\n    self.edit_xml_file(localfile, scpattrval)\n  File \"/usr/local/lib/python3.5/dist-packages/omdrivers/lifecycle/iDRAC/iDRACUpdate.py\", line 366, in edit_xml_file\n    tree = ET.parse(file_location)\n  File \"/usr/lib/python3.5/xml/etree/ElementTree.py\", line 1184, in parse\n    tree.parse(source, parser)\n  File \"/usr/lib/python3.5/xml/etree/ElementTree.py\", line 585, in parse\n    source = open(source, \"rb\")\nFileNotFoundError: [Errno 2] No such file or directory: '/opt/dell/dellemcrepositorymanager/export/scp_GX58BT2_20190604_233014.xml'\n",
    "module_stdout": "msg_id=SYS043\nSeverity=Informational\n",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1
}
    to retry, use: --limit @/root/Dell-EMC-Ansible-Modules-for-iDRAC/firm.retry

PLAY RECAP *********************************************************************************************************************************************************************************************************************************
192.168.192.126            : ok=0    changed=0    unreachable=0    failed=1

Can anyone help me with update ?

anupamaloke commented 5 years ago

@vchevakula, dellemc_idrac_firmware modules uses Server Configuration Profiles (SCP) to update the firmware on 14G servers. So,

Have you mounted the NFS share path locally on your ansible controller machine in a read-write mode?

vchevakula commented 5 years ago

Yes I did and I still the see the same problem

rajeevarakkal commented 4 years ago

@vchevakula we have recent enhancement on idrac_firmware module. Let us know in case you are still facing the issue

rajeevarakkal commented 4 years ago

@vchevakula closing this issue since there is no update for sometime. In case you are facing any issues idrac_firmware let us know