dell / dellemc-openmanage-ansible-modules

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

Failed Task when configuring boot_sources #347

Closed noesberger closed 2 years ago

noesberger commented 2 years ago
Summary

When trying to configure boot_sources, we get always the following error message.

"msg": "'PercentComplete'"
Component Name

idrac_bios

Steps to Reproduce

Use the module dellemc.openmanage.idrac_bios and try to change only the boot_sources.

"boot_sources": [
                {
                    "Name": "Disk.SDInternal.1-1",
                    "Enabled": false
                },
                {
                    "Name": "NIC.PxeDevice.1-1",
                    "Enabled": true
                }
Playbook used
- name: Change boot order
  dellemc.openmanage.idrac_bios:
    idrac_ip: "{{ inventory_hostname }}"
    idrac_user: "root"
    idrac_password: "{{ idrac_pw }}"
    boot_sources:
      - Name : "Disk.SDInternal.1-1"
        Enabled: false
      - Name : "NIC.PxeDevice.1-1"
        Enabled : true
  register: change_bootorder_job
Expected Results

Scheduled Job on idrac is created and as result we get the JOB ID used on idrac.

Actual Results

Scheduled Job on idrac is created but we get the following error: "msg": "'PercentComplete'"

noesberger commented 2 years ago

Here the full error output

{
    "msg": "'PercentComplete'",
    "exception": "  File \"/tmp/ansible_dellemc.openmanage.idrac_bios_payload_mig7398q/ansible_dellemc.openmanage.idrac_bios_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/idrac_bios.py\", line 403, in main\n  File \"/tmp/ansible_dellemc.openmanage.idrac_bios_payload_mig7398q/ansible_dellemc.openmanage.idrac_bios_payload.zip/ansible_collections/dellemc/openmanage/plugins/modules/idrac_bios.py\", line 271, in run_server_bios_config\n  File \"/opt/awx/my-envs/vmware-env/lib64/python3.6/site-packages/omdrivers/lifecycle/iDRAC/iDRACConfig.py\", line 5352, in configure_boot_sources\n    job_status = self._job_mgr.get_job_status_redfish(job_id)\n  File \"/opt/awx/my-envs/vmware-env/lib64/python3.6/site-packages/omdrivers/lifecycle/iDRAC/iDRACJobs.py\", line 352, in get_job_status_redfish\n    if (jobdetail_data['PercentComplete'] < 100) or (100 < jobdetail_data['PercentComplete']):\n",
    "invocation": {
        "module_args": {
            "idrac_ip": "",
            "idrac_user": "root",
            "idrac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "boot_sources": [
                {
                    "Name": "Disk.SDInternal.1-1",
                    "Enabled": false
                },
                {
                    "Name": "NIC.PxeDevice.1-1",
                    "Enabled": true
                }
            ],
            "idrac_port": 443,
            "share_name": null,
            "share_user": null,
            "share_password": null,
            "share_mnt": null,
            "boot_mode": null,
            "nvme_mode": null,
            "secure_boot_mode": null,
            "onetime_boot_mode": null,
            "boot_sequence": null,
            "attributes": null
        }
    },
    "_ansible_no_log": false,
    "changed": false,
    "_ansible_delegated_vars": {
        "ansible_host": "",
        "ansible_port": null,
        "ansible_user": ""
    }
}
anupamaloke commented 2 years ago

@noesberger, it has been fixed by #355. Please reopen if the issue still persists.