Comments (16)
Hi, can you let me know which iDRAC and what firmware version you are using? iDRAC 8 or iDRAC 9 and firmware version.
Also when trying consecutive attempts, are you trying immediately after the script completes or waiting for awhile and then trying again the script again?
Thanks
from idrac-redfish-scripting.
Hello,
We are using idrac 8 as well as idrac 9.
We are giving a retry after script complete once.
Thanks and Regards,
Murali.
from idrac-redfish-scripting.
Can you let me know what version of the firmware you are using? Are you using latest versions from Dell support site?
Thanks
from idrac-redfish-scripting.
Hi,
I am also facing connection error on consecutive requests. I write API wrapper for my purpose and wrote some unit tests but when I ran all of them first few works successfully but after few test cases it starts throwing connection error. I am trying to export and import system configuration. This has happened on idrac 8 and idrac 9 and on firmware version of 2.50, 2.60 and 2.61.
Please help this is huge blocker for my wrapper.
from idrac-redfish-scripting.
@muraliselva10 were you able to solve this issue?
from idrac-redfish-scripting.
Hi @Adnation
Can you copy and paste script output so i can see when the error is happening?
Does it happen when you execute POST command to create the export / import job or when you are querying the job status?
Do you wait for the job to get marked completed before executing POST command again?
Thanks
from idrac-redfish-scripting.
Sorry I can not post the script but my script mostly contains the code from python examples provided in the repository. From here and here
This is happening in first POST call to create import/export job. The same piece of code works sometimes and fails sometimes. It's not consistent upon success or failure.
Once the job is created successfully the script works properly but I don't reach to this part of querying when job itself creation fails with this error. Max retries exceeded with url: /redfish/v1/Managers /iDRAC.Embedded.1/Actions/Oem/EID_674_Manager.ExportSystemConfiguration (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x000001FE3B6B4320>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))
from idrac-redfish-scripting.
During import job sometimes I also face this error #28
from idrac-redfish-scripting.
Sorry about my wording, i didn't mean post your code, i meant when you execute the script, what gets printed to screen, something like:
C:\Python27>ExportSystemConfigurationLocalREDFISH.py -ip 192.168.0.120 -u root -p calvin -t RAID
-
Job ID "JID_590499793430" successfully created for ExportSystemConfiguration method
-
WARNING, JobStatus not completed, current status: "Exporting Server Configuration Profile.", percent complete: "20"
-
WARNING, JobStatus not completed, current status: "Exporting Server Configuration Profile.", percent complete: "45"
-
Export locally job ID JID_590499793430 successfully completed. Attributes exported:
-
WARNING, final detailed job status results for job ID JID_590499793430 -
@odata.type: #DellJob.v1_0_1.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
@odata.id: /redfish/v1/Managers/iDRAC.Embedded.1/Jobs/JID_590499793430
@odata.context: /redfish/v1/$metadata#DellJob.DellJob
MessageArgs: []
CompletionTime: 2019-05-28T08:26:23
PercentComplete: 100
StartTime: TIME_NOW
MessageId: SYS043
Message: Successfully exported Server Configuration Profile
EndTime: None
Id: JID_590499793430
JobType: ExportConfiguration
Name: Export Configuration
Exported attributes also saved in file: 2019-5-28_102640_export.xml
Can you try adding this check to your script before executing any POST command? This is OEM extension which validates the server, LC, RT and overall status for the iDRAC. Once you see "Ready" for all status, you can execute the POST command again for Export / Import. It seems you are hitting a timing issue where iDRAC is still processing information in the background after the job is marked completed.
C:\Python27>GetRemoteServicesAPIStatusREDFISH.py -ip 192.168.0.120 -u root -p calvin
-PASS: POST command passed for GetRemoteServicesAPIStatus method, status code 200 returned
RTStatus: Ready
Status: Ready
LCStatus: Ready
ServerStatus: HaltedF1/F2/F11Prompt
from idrac-redfish-scripting.
Hi Thank you for your response. But it looks like the script GetRemoteServicesAPIStatusREDFISH.py is broken. Because I am facing this error while sending post request to this just like an example.
`-FAIL, POST command failed for GetRemoteServicesAPIStatus method, status code is 405
-POST command failure results:
{'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to run the method because the requested HTTP method is not allowed.', 'MessageArgs': [], '[email protected]': 0, 'MessageId': 'IDRAC.1.6.SYS402', 'RelatedProperties': [], '[email protected]': 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.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information'}}
Process finished with exit code 0
`
from idrac-redfish-scripting.
Ah, i forgot that OEM extension is currently only supported on iDRAC 9 3.30 release, sorry about that.
For iDRAC 8, since this OEM extension is not supported, can you add a sleep delay of 1 minute after the import job is marked completed? I want to see if adding a sleep delay resolves the issue.
from idrac-redfish-scripting.
Hi @texroemer thanks for real quick response. It looks like 1 minute sleep has solved my issue but fot import I am still facing #28 . Do you know how can I solve that? Also would you mind telling me rational behind 1 minute. Initially I was trying with 10/20 seconds but it was failing there as well
from idrac-redfish-scripting.
Can you give me more details on when you hit the import issue or explain the order of commands you are trying to execute? Are you executing Export command, then immediately executing Import command or is there a delay between executing Export and Import commands?
Also is your iDRAC 8 at 2.60 or newer version?
For adding the delay, the reason is after Export or Import POST command is invoked and job completes, iDRAC in the background is executing its own Export job or known as auto export. The reason for this is because iDRAC is getting a current snapshot of the server configuration and storing it locally in a file. This stored local export file will only be used if you ever swap out the motherboard. iDRAC supports a feature called easy restore where if you ever swap out the motherboard, once you power on the server for this first time, iDRAC will detect empty service tag which will import the auto export configuration file it saved locally. All configuration changes get applied from your previous motherboard.
So the sleep delay added is there for the auto export job to complete in the background and confirm LC is in a ready state before you execute other commands. iDRAC 9 doesn't have this issue due to the auto export job completes within 2-3 seconds. On iDRAC 8, it could take up to 40-50 seconds based on your server configuration to complete auto export job.
from idrac-redfish-scripting.
@texroemer thank you for all your help. It looks like I am facing 503 when iDRAC is busy in some other process however recently I am facing another issue with api.
Here the code I am using to call the api.
end_point = 'https://{}/redfish/v1/Managers/iDRAC.Embedded.1/' \
'Actions/Oem/EID_674_Manager.ImportSystemConfiguration'.format(ip)
### XML string is file read
payload = {
"ShareParameters": {"Target": component},
"ShutdownType": shutdown_type,
"HostPowerState": host_power_state,
"ImportBuffer": xml_string
}
#### Code to get job id ######
response = requests.post(end_point, json=payload, verify=False, auth=(username, password))
task_url = 'https://{}/redfish/v1/TaskService/Tasks/{}'.format(ip, job_id)
req = requests.get(task_url, auth=(username, password), verify=False)
req = requests.get(task_url, auth=(username, password), verify=False)
status_code = req.status_code
data = req.json()
So far everything works fine and here is the piece of response I am receiving.
{'Oem': {'Dell': {'@odata.type': '#DellManager.v1_0_0.ServerConfigurationProfileResults',
'DisplayValue': 'Enable LDAP',
'ErrCode': '0',
'Name': 'LDAP.1#Enable',
'NewValue': 'Disabled',
'OldValue': 'Enabled'}},
'Severity': 'OK'},
{'Oem': {'Dell': {'@odata.type': '#DellManager.v1_0_0.ServerConfigurationProfileResults',
'DisplayValue': 'LDAP Server',
'ErrCode': '0',
'Name': 'LDAP.1#Server',
'OldValue': '******.********.net'}},
'Severity': 'OK'},
{'Oem': {'Dell': {'@odata.type': '#DellManager.v1_0_0.ServerConfigurationProfileResults',
'DisplayValue': 'LDAP Base Domain Name',
'ErrCode': '0',
'Name': 'LDAP.1#BaseDN',
'OldValue': 'dc=******,dc=********,dc=net'}},
'Severity': 'OK'}
At first glance it looks cool but if you look closely you will see that last two configuration dictionary does not have key called 'NewValue' like the first one has. Now my question is why NewValue key is missing? When I tried to achieve the same using RACADM command it always returned NewValue key-value pair. This api also does send NewKey but for some configuration it does not. it looks like the response is not consistent. Can you help me with this? Also can provide me with a link to documentation because PDFs I found are very limited to what this api covers.
NOTE: All the above code works fine I have issue with response format so if you found some missing variables because this is a minimal code. Not complete but code is find. I am worried about response.
from idrac-redfish-scripting.
Hi @Adnation
Can you tell me which iDRAC version you are using? I just tried iDRAC 9 3.30 and iDRAC 7/8 2.61 and unable to reproduce the issue you are seeing.
Example below where i set the same attributes, i see configuration results reported correctly with old and new value.
C:\Python27>ImportSystemConfigurationLocalFilenameREDFISH.py -ip 192.168.0.120 -u root -p calvin -t IDRAC -f 2019-6-17_103733_export.xml
-
JID_608047948068 successfully created for ImportSystemConfiguration method
-
WARNING, JobStatus not completed, current status: "Analyzing iDRAC, System or Lifecycle Controller configuration for changes to be applied.", percent complete: "10"
-
PASS, job ID JID_608047948068 successfully marked completed
-
Detailed job results for job ID JID_608047948068
@odata.type: #DellJob.v1_0_0.DellJob
JobState: Completed
Description: Job Instance
TargetSettingsURI: None
MessageArgs: []
CompletionTime: 2019-06-17T15:53:24
PercentComplete: 100
StartTime: TIME_NOW
MessageId: SYS053
Message: Successfully imported and applied Server Configuration Profile.
EndTime: None
Id: JID_608047948068
JobType: ImportConfiguration
Name: Import Configuration
-
JID_608047948068 completed in: 0:00:16
-
Config results for job ID JID_608047948068 -
@odata.type: #DellManager.v1_0_0.ServerConfigurationProfileResults
Name: LDAP.1#Enable
ErrCode: 0
OldValue: Disabled
DisplayValue: Enable LDAP
NewValue: Enabled
@odata.type: #DellManager.v1_0_0.ServerConfigurationProfileResults
Name: LDAP.1#Server
ErrCode: 0
OldValue: 192.168.0.130
DisplayValue: LDAP Server
NewValue: 192.168.0.140
@odata.type: #DellManager.v1_0_0.ServerConfigurationProfileResults
Name: LDAP.1#BaseDN
ErrCode: 0
OldValue: test.example.com
DisplayValue: LDAP Base Domain Name
NewValue: test2.example.com
from idrac-redfish-scripting.
For details on what each API supports, it's best to refer to the schemas. Schemas will give you detailed information on what each Action will do (supported parameters, supported parameter values/value type).
If you run GET on any URI, you should see a metadata URI which you can run a GET on that URI to see all the schemas Dell supports for the iDRAC version you have installed. So for Server Configuration Profile feature you are using, you would want to view schemas "redfish/v1/Schemas/OemManager_v1.xml" and "redfish/v1/Schemas/DellManager_v1.xml". Schema "redfish/v1/Schemas/DellManager_v1.xml" will explain configuration results for the job ID.
from idrac-redfish-scripting.
Related Issues (20)
- How to boot using Ansible from an iso that's located on a remote server? HOT 1
- Missing Attributes in iDRAC 8 HOT 5
- VirtualDiskTargetID is not preserved HOT 4
- SyntaxError: invalid syntax on line 157 HOT 3
- Memory HOT 6
- extend GetEthernetInterfacesREDFISH.py with Link detail informations HOT 1
- Set-IdracLcSystemAttributesREDFISH function not working with idrac8 HOT 2
- Create User not working HOT 1
- Understand the difference between Current, Installed and Previous In FirmwareInventory Id HOT 4
- InsertEjectVirtualMediaREDFISH.py always gives "remote file location is not accessible" HOT 5
- Firmware update completion not recognized - script loop stuck HOT 1
- Virtual Console example? HOT 4
- Fibre Channel - PUT/Patch via redfish api HOT 1
- PowerShell Get-IdracLifecycleLogsREDFISH options HOT 8
- Python GetIdracLcLogsREDFISH output as real JSON HOT 9
- Invoke-GenerateCsrREDFISH Missing Subject Alternative Name? HOT 6
- GetIdracLcLogsREDFISH.py error with --get-all option HOT 7
- Which is most appropriate Redfish/OEM call to check the current boot stage of the server HOT 2
- pxe boot job id no long working HOT 1
- ComponentID zero HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from idrac-redfish-scripting.