dell / iDRAC-Redfish-Scripting

Python and PowerShell scripting for Dell EMC PowerEdge iDRAC REST API with DMTF Redfish
GNU General Public License v2.0
598 stars 276 forks source link

Method error when running Invoke-IdracJobQueueManagementREDFISH delete_job_queue function and Invoke-InstallFromRepositoryOemREDFISH install_from_repository function #223

Closed wesleyKnight1 closed 1 year ago

wesleyKnight1 commented 2 years ago

We've run into issues trying to clear job queues and update firmware using the Invoke-IdracJobQueueManagementREDFISH.psm1 and Invoke-InstallFromRepositoryOemREDFISH.psm1 modules. Issue occurs with both credential auth and token auth.

iDRAC Version 2.75.75.75 Model: R730

Errors (just the job clear, gives the same error when running firmware update as well):

Cred auth:

PS C:\code\powershell\iDRAC-Redfish-Scripting-master\Redfish PowerShell\Invoke-IdracJobQueueManagementREDFISH> Invoke-IdracJobQueueManagementREDFISH -idrac_ip w2desx0080019-oob -idrac_username <redacted> -idrac_password <redacted> -delete_job_queue y

- INFO, clearing job queue for iDRAC <redacted>, this may take up to minute to complete depending on how many jobs are in the job queue

{"error":{"@Message.ExtendedInfo":[{"Message":"Unable to run the method because the requested HTTP method is not
allowed.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"IDRAC.1.6.SYS402","RelatedProperties":[],"RelatedProperties@odata.count":0,"Resolution":"Enter a valid HTTP method and retry the
operation. For information about valid methods, see the Redfish Users Guide available on the support site.","Severity":"Informational"}],"code":"Base.1.2.GeneralError","message":"A general error has
occurred. See ExtendedInfo for more information"}}

Token Auth:

PS C:\code\powershell\iDRAC-Redfish-Scripting-master\Redfish PowerShell\Invoke-IdracJobQueueManagementREDFISH> Invoke-IdracJobQueueManagementREDFISH -idrac_ip <redacted> -x_auth_token <redacted> -delete_job_queue y

- INFO, clearing job queue for iDRAC <redacted>, this may take up to minute to complete depending on how many jobs are in the job queue

{"error":{"@Message.ExtendedInfo":[{"Message":"Unable to run the method because the requested HTTP method is not
allowed.","MessageArgs":[],"MessageArgs@odata.count":0,"MessageId":"IDRAC.1.6.SYS402","RelatedProperties":[],"RelatedProperties@odata.count":0,"Resolution":"Enter a valid HTTP method and retry the
operation. For information about valid methods, see the Redfish Users Guide available on the support site.","Severity":"Informational"}],"code":"Base.1.2.GeneralError","message":"A general error has
occurred. See ExtendedInfo for more information"}}

We ended up poking around a bunch with Postman and it appears the "Post" is no longer supported for the endpoints being referenced by the Powershell modules. Also tried just isolating the Invoke-WebRequest lines to test them directly and had no luck. Ended up getting a similar error.

texroemer commented 2 years ago

Hi @wesleyKnight1

I updated cmdlet Invoke-IdracJobQueueManagementREDFISH to support iDRAC 7/8 and posted it. iDRAC 7/8 doesn't support OEM extensions for iDRAC job queue management, reason for the failure.

Cmdlet Invoke-InstallFromRepositoryOemREDFISH, this is not supported by iDRAC 7/8. Redfish support for iDRAC repository update feature was only added to iDRAC 9. If using iDRAC 7/8 and want to automate repository updates, you need to leverage iDRAC RACADM CLI.

Thanks Tex