dell / dellemc-openmanage-ansible-modules

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

How to Update from ftp.dell.com #47

Closed fxfitz closed 5 years ago

fxfitz commented 5 years ago

We are currently attempting to use these modules to update our iDrac firmware from ftp.dell.com. To do that we needed to use the fw_update_url branch which is fine, however our problem is that ftp.dell.com has a gzipped Catalog.xml file (specifically, Catalog.xml.gz).

Is it possible to build this functionality into the module so we can just use this to update from the official Dell updates?

anupamaloke commented 5 years ago

@fxfitz, thank you for sharing this requirement. We are actively looking into this request.

anupamaloke commented 5 years ago

@fxfitz, I just pushed in the idrac_firmware module in the fw_update_url branch that contains the changes to update the firmware from Dell online repository. You can now run the following playbook:

  - name: firmware_update
    idrac_firmware:
      idrac_ip :  "{{ idrac_ip }}"
      idrac_user: "{{ idrac_user }}"
      idrac_password:  "{{ idrac_password }}"
      share_name: "http://downloads.dell.com/catalog"
      catalog_file_name: "Catalog.xml"
      apply_update: False
      reboot: False
      job_wait: True
cwhel commented 5 years ago

I'm on the same team as fxfitz, and we're trying to get this to work... I'm using the exact format up above and getting this error:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'iDRACUpdate' object has no attribute 'update_from_repo_url'
fatal: [<hostname> -> localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1562960105.69-23978341100440/AnsiballZ_idrac_firmware.py\", line 113, in <module>\n    _ansiballz_main()\n  File \"/root/.ansible/tmp/ansible-tmp-1562960105.69-23978341100440/AnsiballZ_idrac_firmware.py\", line 105, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/root/.ansible/tmp/ansible-tmp-1562960105.69-23978341100440/AnsiballZ_idrac_firmware.py\", line 48, in invoke_module\n    imp.load_module('__main__', mod, module, MOD_DESC)\n  File \"/tmp/ansible_idrac_firmware_payload_Wm3o6t/__main__.py\", line 422, in <module>\n  File \"/tmp/ansible_idrac_firmware_payload_Wm3o6t/__main__.py\", line 413, in main\n  File \"/tmp/ansible_idrac_firmware_payload_Wm3o6t/__main__.py\", line 352, in exec_module\n  File \"/tmp/ansible_idrac_firmware_payload_Wm3o6t/__main__.py\", line 307, in update_firmware_from_url\nAttributeError: 'iDRACUpdate' object has no attribute 'update_from_repo_url'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Any ideas?

fxfitz commented 5 years ago

@anupamaloke Sorry this took so long, we solved the problem described by Christa above. It essentially stems from [what I believe to be] a bad omsdk release. I've opened a (ticket)[https://github.com/dell/omsdk/issues/9] in that repository, but we have a workaround for now.

Besides that, the module seemed to work just fine for us. I'll close this out.

alexander-red commented 4 years ago

I've just started testing the module and ... experiencing the issue described here ... I can not download updates from dell...

I am using the "fw_update_url" branch ... should I use another branch...?

Playbook

error

....

},
"msg": "Failed to update firmware.",
"update_status": {
    "Data": {
        "InstallFromRepository_OUTPUT": {
            "Message": "Features not available.",
            "MessageID": "LIC502",
            "ReturnValue": "2"
        }
    },
    "Message": "Features not available.",
    "MessageID": "LIC502",
    "Return": "Error",
    "Status": "Error",
    "file": "http://downloads.dell.com/catalog/Catalog.xml",
    "retval": false
}

}

cwhel commented 4 years ago

The last time I checked on this Dell required pulls from their repo over HTTPS… The problem is that they changed the file extension to be a .cab in their repo. The module will only accept a .xml or .xml.gz. So, this module won’t work until they add support for that additional file extension… I have this issue open requesting for it to happen:

https://github.com/dell/dellemc-openmanage-ansible-modules/issues/68

From: alexander-red notifications@github.com Sent: Sunday, January 26, 2020 1:50 AM To: dell/dellemc-openmanage-ansible-modules dellemc-openmanage-ansible-modules@noreply.github.com Cc: Whelchel, Christa Christa.Whelchel@centurylink.com; Comment comment@noreply.github.com Subject: Re: [dell/dellemc-openmanage-ansible-modules] How to Update from ftp.dell.com (#47)

I've just started testing the module and ... experiencing the issue described here ... I can not download updates from dell...

I am using the "fw_update_url" branch ... should I use another branch...?

Playbook

error

....

},

"msg": "Failed to update firmware.",

"update_status": {

"Data": {

    "InstallFromRepository_OUTPUT": {

        "Message": "Features not available.",

        "MessageID": "LIC502",

        "ReturnValue": "2"

    }

},

"Message": "Features not available.",

"MessageID": "LIC502",

"Return": "Error",

"Status": "Error",

"file": "https://imss91-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=http%3a%2f%2fdownloads.dell.com%2fcatalog%2fCatalog.xml%22&umid=A35E4AD1-9D06-3F05-B6D2-FE1C6D1B4A16&auth=19120be9529b25014b618505cb01789c5433dae7-980a2997b5c21009496762b9f8fd654be0762f52,

"retval": false

}

}

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://imss91-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fdell%2fdellemc%2dopenmanage%2dansible%2dmodules%2fissues%2f47%3femail%5fsource%3dnotifications%26email%5ftoken%3dAFJBHXRVG4O2LS6356WFCEDQ7U6BJA5CNFSM4HKGDZ42YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5NVYQ%23issuecomment%2d578476770&umid=A35E4AD1-9D06-3F05-B6D2-FE1C6D1B4A16&auth=19120be9529b25014b618505cb01789c5433dae7-b769151b982f8cf15419f8429a5c2d9c921fd124, or unsu! bscribehttps://imss91-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fgithub.com%2fnotifications%2funsubscribe%2dauth%2fAFJBHXTJBQA3SHI4NWMFKG3Q7U6BJANCNFSM4HKGDZ4Q&umid=A35E4AD1-9D06-3F05-B6D2-FE1C6D1B4A16&auth=19120be9529b25014b618505cb01789c5433dae7-a5b97733aed8c1052cb40363a15ab0896af9e13e.

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.