Open smalleni opened 3 years ago
Files identified in the description:
If these files are inaccurate, please update the component name
section of the description or use the !component
bot command.
cc @mraineri @renxulei @tomasg2012 @xmadsen click here for bot help
Looks like there is an explicit check for image_url: https://github.com/ansible-collections/community.general/blob/ea822c7bdd9cbeccc4541c2f95280442c6f213ab/plugins/module_utils/redfish_utils.py#L2325-L2327
And it is used to to find the virtual media to eject at: https://github.com/ansible-collections/community.general/blob/ea822c7bdd9cbeccc4541c2f95280442c6f213ab/plugins/module_utils/redfish_utils.py#L2347
Yes, at least with the behavior we've implemented today the image URL is needed since the expectation is the user is specifying the image URL for the ISO to eject. I think we need to consider some things first before making changes.
If the image URL is not given, then what exactly should be ejected? All virtual media your example indicates? This seems a bit heavy handed in my opinion, but others might like this behavior. Redfish itself doesn't support an "eject all" type of operation, and I suspect the script you're referencing is either using OEM actions or is just looping on all slots and ejecting everything.
Should a user be allowed specify an alternative identifier (such as the "Id" of the virtual media instance) in order to control what slot is ejected?
Certainly would like opinions from others for desired behavior. I do like the idea of keeping the mandatory argument list as minimal as possible, but would like to agree upon the desired behavior first.
Yes, at least with the behavior we've implemented today the image URL is needed since the expectation is the user is specifying the image URL for the ISO to eject. I think we need to consider some things first before making changes.
If the image URL is not given, then what exactly should be ejected? All virtual media your example indicates? This seems a bit heavy handed in my opinion, but others might like this behavior. Redfish itself doesn't support an "eject all" type of operation, and I suspect the script you're referencing is either using OEM actions or is just looping on all slots and ejecting everything.
Should a user be allowed specify an alternative identifier (such as the "Id" of the virtual media instance) in order to control what slot is ejected?
Certainly would like opinions from others for desired behavior. I do like the idea of keeping the mandatory argument list as minimal as possible, but would like to agree upon the desired behavior first.
Thank you for taking a look quickly. This is especially useful in our situation where the hardware nodes get recycled quite a bit between tenants and we might have things lingering around from previous tenants. Hence the need to remove any virtualmedia. I thought redifsh supported this but perhaps not then? I thought I saw
Method: POST
URI: https://<idrac_ip_address>/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.EjectMedia
BODY:
{}
That particular example ejects a virtual media instance called "CD"; there are other virtual media instances in the collection. Essentially you'd replace the segment "CD" in the URI for the action with another instance identifier (I think "USB" is another one used by iDRAC).
That particular example ejects a virtual media instance called "CD"; there are other virtual media instances in the collection. Essentially you'd replace the segment "CD" in the URI for the action with another instance identifier (I think "USB" is another one used by iDRAC).
Got it, but since it doesn't require an image url, maybe even in ansible we can support ejecting all media instance of a particular media type?
Maybe an explicit "all" option just for clarity? I'd be concerned with having default behavior eject everything since the other slot could be in use for another user.
Maybe an explicit "all" option just for clarity? I'd be concerned with having default behavior eject everything since the other slot could be in use for another user.
Sure, but it's really useful for sysadmins to be able to eject all virtual media. Either it is a default option when you don't provide image_url or you have to explicitly ask for it, either is fine.
At the end of the day I want to be able to eject virtual media (either of a particular type like CD or of all types) without the image_url since I may not always know the image_url used by a user who had used the hardware previouly.
The group has discussed this a bit and is okay with adding a dedicated "eject all" command in order to keep the semantics of the existing eject command as is.
Is this something you'd be able to work on?
cc @bhavya06 @rajeevkallur click here for bot help
cc @jose-delarosa click here for bot help
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @TSKushal click here for bot help
cc @jyundt click here for bot help
Summary
When using
redfish_command
(https://github.com/ansible-collections/community.general/blob/main/plugins/modules/remote_management/redfish/redfish_command.py) I want to eject all virtual media and looks like the module expects a value for image_url for this to work. There are cases when a user wants to eject all virtual media and it might not be possible to know the exact urls of the virtual media previously supported. It looks like redfish supports ejecting all virtual media without providig an image_url link (https://github.com/dell/iDRAC-Redfish-Scripting/issues/24#issuecomment-481563823), however I see an error likeif I try passing an empty dictionary to
virtual_media
Issue Type
Bug Report
Component Name
redfish_command
Ansible Version
Configuration
OS / Environment
Fedora 32
Steps to Reproduce
Expected Results
I expect to be able to unmount all virtual media without being required to know the urls of all the virtualmedia previously mounted.
Actual Results
Code of Conduct