-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add capabilities to the Redfish SimpleUpdate redfish_command #4276
Comments
Files identified in the description: If these files are incorrect, please update the |
Agreed this should be added to the module. One complexity to consider though is the flow might require user intervention in order for the update process to make forward progress (such as performing system resets). Would it be reasonable to have the module issue the reset request automatically as it appears in the job? Having the playbook pause indefinitely for the user to do an operation via other methods doesn't seem like a good approach. Maybe we can make the assumption that if a user issues this type of request that they're prepared for the system to be reset? |
@felixfontein do you have any guidance from an "Ansible best practices" perspective? Is it safe to assume that if a user runs a playbook, they want the desired outcome regardless of the side effects? If not, is it okay for a playbook to sit and wait for a user to perform some other operation (like invoke a system reset)? |
@mraineri hmm, that's tricky. It depends a lot on what the side-effects are, resp. how obvious they are :) If the command is 'reset system' it's not surprising that the system is restarted. If the command is 'upgrade firmware' some might only expect that the upgrade will happen on the next restart, and not that the system is restarted right now. But also if the operation requires user interaction and the user isn't aware that it does, that wouldn't be very helpful. I would definitely make the wait optional, and potentially outsource it to another module, like have the module return some task monitor ID, and have another module that accepts one or more task monitor IDs and waits for all of them to complete. That would keep the original module simpler and allow to add more complexity to the wait module without impacting the original module. (You might want to have wait timeouts, or if multiple task monitor IDs are specified just wait until N of them finished and not all, or ...) |
@felixfontein I've been thinking about how to approach this a bit more based on your feedback. Here is what I'm thinking:
Essentially using these commands from an end-to-end perspective would look something like this:
I'm considering this approach simply because all of the above operations will not block the caller waiting for some event, so it gives the users the flexibility to decide how frequently to poll, how to handle pauses in the update progress, and other types of situations where you might need to wait for something to happen. |
@mraineri I think that sounds great! Having these 'building blocks' enables users to do everything they want, even though it might require some extra work on the playbook / role level (multiple tasks for one operation). |
Thanks for the feedback; I'll work on this when I'm back to work. |
Thank you @mraineri! This is great! |
Summary
The Redfish Firmware Updater process described here (See Chapter 6) allows for asynchronous polling of the update job by querying the returned "TaskMonitor". Currently, the Redfish Command handled by:
community.general/plugins/module_utils/redfish_utils.py
Lines 1339 to 1398 in 8508e3f
only returns True/False on the job submission, but no other details about the job. This adds extra complexity in searching for the Task after the fact and manually polling.
It would be great if the RF utils module could return Task Monitors where appropriate for long running jobs and It would be even more awesome if the module could abstract the async job process away from the user:
@Redfish.OperationApplyTime
parameter for more control over the update process timing.See also Redfish Task Presentation
Issue Type
Feature Idea
Component Name
Redfish Utils
Additional Information
When using the URI module a SimpleUpdate returns:
Where the
TaskMonitor
andTaskState
are returned for further use.Code of Conduct
The text was updated successfully, but these errors were encountered: