Skip to content
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

Firmware-bundle - Upload of compsig file fails, hotfix not present #168

Closed
ClaireHayard opened this issue Feb 17, 2022 · 6 comments
Closed

Comments

@ClaireHayard
Copy link

Scenario/Intent

Hello,

I am trying upload spp, hotfix and compsig files to OneView using the oneview_firmware_bundle plugin. I am testing the upload of an hotfix and its two associated compsig file, however the upload fails with the compsig files.

Input data

- spp_list: ["<absolute_path>/firmware-ilo5-2.60-1.1.x86_64.rpm", "<absolute_path>/firmware-ilo5-2.60-1.1.x86_64_part1.compsig", "<absolute_path>/firmware-ilo5-2.60-1.1.x86_64_part2.compsig"]

upload.yml

- name: Create fact to get the extension of the input var file
  set_fact:
    __file_extension: ""

- name: Set fact with the extension of the input var file
  set_fact:
    __file_extension : [...]

#if file (hotfix, spp) doesn't have a compsig extension, do this task
- name: Upload the firmware bundle
  oneview_firmware_bundle:
    config: "{{ __config }}"
    state: present
    file_path: "{{ __spp_file_path }}"
  when: "'compsig' not in __file_extension" #here __file_extension = "rpm" for the first file upload

#if file has a compsig extension (signature), do this task
- name: Upload the firmware bundle
  oneview_firmware_bundle:
    config: "{{ __config }}"
    state: add_signature
    file_path: "{{ __spp_file_path }}"
  when: "'compsig' in __file_extension" #here __file_extension = "compsig" for the 2nd and 3rd file upload

Environment Details

  • OneView Ansible Collection: v6.5.0
  • OneView Appliance Version: 6.10
  • Ansible version: 2.9.6
  • Python version: 3.6.10

Expected Result

The consecutive upload of the hotfix and its compsig files on OneView.

Actual Result

Result of the ansible-playbook command

#First loop iteration to upload the hotfix

TASK [Upload the firmware bundle] **********************************************************************************
changed: [localhost] => {
    "ansible_facts": {
        "firmware_bundle": {
            "baselineShortName": "Not_Applicable",
            "bundleSize": 33932254,
            "bundleType": "Hotfix",
            "category": "firmware-drivers",
            "created": "2022-02-17T10:01:45.113Z",
            "description": "This package contains HPE Integrated Lights-Out 5 firmware",
            "eTag": "2022-02-17T10:04:33.117Z",
            "esxiOsDriverMetaData": [
                "Not_Applicable"
            ],
            "fwComponents": [
                {
                    "componentVersion": "2.60",
                    "fileName": "firmware-ilo5-2.60-1.1.x86_64.rpm",
                    "name": "HPE Integrated Lights-Out 5 firmware",
                    "swKeyNameList": [
                        "RI11"
                    ]
                }
            ],
            "hotfixes": [],
            "hpsumVersion": "Not_Applicable",
            "isoFileName": "Not_Applicable",
            "lastTaskUri": "/rest/tasks/7e520ed5-df90-4132-8cdd-61c35253c395",
            "locations": {
                "/rest/repositories/internal": "Internal"
            },
   [...]
    },
    "msg": "Firmware Bundle or Hotfix added successfully."
}

# Second loop iteration to upload the compsig files

TASK [Upload the firmware bundle] **********************************************************************************
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_version": null,
            "auth_login_domain": null,
            "config": "config.json",
            "file_path": "<aboslute_path>/firmware-ilo5-2.60-1.1.x86_64_part1.compsig",
            "hostname": null,
            "image_streamer_hostname": null,
            "password": null,
            "state": "add_signature",
            "username": null,
            "validate_etag": true
        }
    },
    "msg": "Hotfix is not present."
}

@nabhajit-ray
Copy link
Contributor

nabhajit-ray commented Feb 25, 2022

Hi @ClaireHayard ,
Are you uploading the hotfix file before uploading the sig file? The error seems to be because hotfix file is not yet uploaded.

@ClaireHayard
Copy link
Author

Hello @nabhajit-ray,

Yes I am uploading the hotfix first. As you can see above, the result of my ansible-playbook command shows that the hotfix is first being uploaded (sucessfully) and then the compsig files.

@nabhajit-ray
Copy link
Contributor

This is fixed in ansible collection 6.60. Please check

@ClaireHayard
Copy link
Author

Hello @nabhajit-ray,

Still having the same issue. The Service Pack is first uploaded successfully but when it's the signature (compsig) files turn, it fails. In this particular test, I am trying to upload two compsig files to one SPP, one after the other.

fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "api_version": 2800,
            "auth_login_domain": "",
            "config": null,
            "file_path": "<absolute-path>/firmware-ilo5-2.60-1.1.x86_64_part1.compsig",
            "hostname": "ip@",
            "image_streamer_hostname": null,
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "state": "add_signature",
            "username": "Administrator",
            "validate_etag": true
        }
    },
    "msg": "Hotfix is not present."
}

@nabhajit-ray
Copy link
Contributor

Have you installed the latest python package?

https://pypi.org/manage/project/hpeOneView/release/6.6.0/

@ClaireHayard
Copy link
Author

Hi @nabhajit-ray ,

You're right, I didn't check the python package version, it was still v6.5.0. I re-did the test and it seems to be working fine now. I am closing the issue.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants