-
Notifications
You must be signed in to change notification settings - Fork 164
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
[BUG]: idrac_server_config_profile doesn't work with "job_wait: True" correctly #486
Comments
@ruic11111 Thanks for reporting the bug, we did observe this issue recently. I see two changes needs to be done here
while job_wait:
try:
response = self.invoke_request(task_uri, "GET")
if response.json_data.get("PercentComplete") == 100 and response.json_data.get("JobState") == "Completed":
break
else:
time.sleep(30)
except ValueError:
response = response.body
break Any chance you can submit a PR for this? |
@sachin-apa |
@ruic11111 Oh yes you are right, I didn't try that here though.. we have to take care of the URL change (1) also may be because the location returns the URL Do please see if you can submit a PR with the changes you proposed, if not no worries will check internally with team on the timeline of the fix. |
Thank you for your message. I'm sorry but It seems to be difficult for me to fix and PR |
@sachin-apa @ruic11111 Hi, in this PR, I imported There seem to be 3 endpoints that can monitor job id for now including |
Fixed after merging the PR : #504 |
Bug Description
in the idrac_server_config_profile module, the ansible job completes without waiting for the iDRAC SCP import job to complete
even if "job_wait" is "True"
I have confirmed that there is a problem with the functions of the following modules referenced from idrac_server_config_profile.
When the iDRAC loads the SCP, the job status transitions to several statuses before becoming Running. ex New, Scheduled, Downloading..
However, in the above part, the module only check if job status is the Running status.
If the job status is new, etc.. when the module check the iDRAC job status, the above part will exit the loop without waiting for the SCP import job to complete.
Since I don't know every status of the job, I changed the above part as follows and play the playbook again.
As the result, I confirmed that the ansible work as expected.
Component or Module Name
idrac_server_config_profile
Ansible Version
any
Python Version
any
iDRAC/OME/OME-M version
iDRAC 6.10.30.00
Operating System
any
Playbook Used
tasks:
idrac_server_config_profile:
idrac_ip: '{{ idrac_ip }}'
idrac_user: '{{ idrac_user }}'
idrac_password: '{{ idrac_password }}'
command: 'import'
share_name: '{{ share_name }}'
scp_file: '{{ scp_firmware }}'
scp_components: 'ALL'
job_wait: True
validate_certs: false
Logs
no log
Steps to Reproduce
run playbook as mentioned above.
(In my case, SCP contains the firmware catalog file)
Expected Behavior
Ansible job will wait until iDRAC SCP import job complete
Actual Behavior
Ansible job complete without waiting iDRAC SCP import job to complete
Screenshots
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: