dell / dellemc-openmanage-ansible-modules

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

idrac_bios: pxe boot and boot_sources #244

Closed aminastireanu closed 2 years ago

aminastireanu commented 3 years ago

Hi, I didn't find a similar issue so I'm wondering if i'm the only one facing it.

r640 idrac 4.20.20.20 (tried 4.40.0.0 and 3.32.32.32) bios 2.6.4 Python 2.7.18 ansible 3.0.0
ansible-base 2.10.6 omsdk 1.2.456
dellemc.openmanage 3.1.0 (tried 3.0 also)

Basically 2 problems:

And run:

fatal: [r64001]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "attributes": {
                "PxeDev1EnDis": "Disabled"
            },
            "boot_mode": null,
            "boot_sequence": null,
            "boot_sources": null,
            "idrac_ip": "10.1.1.1",
            "idrac_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "idrac_port": 443,
            "idrac_user": "root",
            "nvme_mode": null,
            "onetime_boot_mode": null,
            "secure_boot_mode": null,
            "share_mnt": null,
            "share_name": null,
            "share_password": null,
            "share_user": null
        }
    },
    "msg": {
        "@odata.context": "/redfish/v1/$metadata#DellJob.DellJob",
        "@odata.id": "/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/Jobs/JID_147622517847",
        "@odata.type": "#DellJob.v1_1_0.DellJob",
        "ActualRunningStartTime": "2021-03-03T01:04:11",
        "ActualRunningStopTime": "2021-03-03T01:04:13",
        "CompletionTime": "2021-03-03T01:04:13",
        "Description": "Job Instance",
        "EndTime": null,
        "Id": "JID_147622517847",
        "JobState": "Failed",
        "JobType": "ImportConfiguration",
        "Message": "Unable to complete application of configuration profile values.",
        "MessageArgs": [],
        "MessageArgs@odata.count": 0,
        "MessageId": "SYS067",
        "Name": "Configure: Import Server Configuration Profile",
        "PercentComplete": 100,
        "StartTime": "2021-03-03T01:04:11",
        "Status": "Failed",
        "TargetSettingsURI": null,
        "retval": false
    }
}

idrac log:

JID_147622517847 | Configure: Import Server Configuration Profile | Failed (100%)
-- | -- | --
  |   | Scheduled Start Time             2021-03-03T01:04:11                      Actual Start Time             2021-03-03T01:04:11                      Expiration Time             Not Applicable                      Actual Completion Time             2021-03-03T01:04:13                      Message             SYS067: Unable to complete application of configuration profile values.

According to documentation (_https://www.dell.com/support/manuals/en-ie/openmanage-ansible-modules-v2.0.1/omam_2.0.1_users_guide/configure-bios?guid=guid-d2d8d871-c3e1-48d1-a879-197670fe33ea&lang=en-us_) attributes used should be present in _https://I(idrac_ip)/redfish/v1/Systems/System.Embedded.1/Bios_ however I can't see this attribute in the json when I navigate to _idracip/redfish/v1/Systems/System.Embedded.1/Bios should I assume it's not supported (yet? or anymore? )

I suspect ansible is not passing the arguments as dictionary (like previous said documentation mentions) and instead it is passing them to the module as strings ? Anyone knows how to force it not to do that conversion and pass it a dict. ? (assuming the module works properly)

Thanks!

aminastireanu commented 3 years ago

UPDATE: I found that the old module 'dellemc_configure_bios' from collection version 2.1.5 and that one works! Looking at source code in idrac_bios.py line 403 I can see boot_sources defined differently than it used to be in the deprecated module: "boot_sources": {"required": False, "type": 'list', "elements": "str"}

So I removed this part , "elements": "str"

And it seems to work (making the changes etc..) but other things may be broken in other places. I assume this is a bug introduced with moving to the new module ?

anupamaloke commented 3 years ago

@aminastireanu, some of the Bios attributes are dependent on the Boot Mode. PxeDev1EnDis attribute will only show up in the list of bios attribute only when the Boot Mode is Uefi. So, you first need to run the task to set the boot mode to Uefi, and then run another task to configure the PxeDev1EnDis attribute.

aminastireanu commented 3 years ago

I see.. I assumed it was controlling the pxe enable/disable option from within NIC's bios and would not be linked to uefi.

I ended up using boot sources to control this but still one's left to wonder why the modules marked as deprecated actually work when the new _idrac__... ones seem to be more buggy..

I'm staying on collection version 2.1.5 for now as I feel that 3 was rushed, documentation wasn't updated for it etc..

anupamaloke commented 2 years ago

Closing this issue. With the idrac_bios module enhancement that has gone in v6.2.0, this issue should be fixed.