-
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
Remove 'CapacityBytes' from list of required parameters #8956
Remove 'CapacityBytes' from list of required parameters #8956
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Why would a user not want to specify the size of the volume? When this was originally discussed, we did not think deferring to the service to dictate the capacity of the new volume is reliable and expect users to know how big of a volume to make in all cases. |
Technically "RAIDType" and "Drives" are not required per the schema either, but we had similar concerns with deferring to the service to determine the appropriate RAID type and which physical drives to use for the volume. |
@mraineri I think i do not totally understand your two comments. |
Creation test with curl and a payload without RAIDType {
"error": {
"code": "Base.1.12.CreateFailedMissingReqProperties",
"message": "See @Message.ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"MessageId": "Base.1.12.CreateFailedMissingReqProperties",
"Message": "The create operation failed because the required property %1 was missing from the request.",
"Severity": "Warning",
"Resolution": "Provide the missing required parameter.",
"MessageArgs": [
"RAIDType"
]
}
]
}
} When asking for capabilities (extract): {
"[email protected]": true,
"[email protected]": true,
"Links": {
"[email protected]": true,
}
} RAIDType and Link/Drives are, at least for my adapter, the only required parameters |
The issue is there's nothing in the Volume schema that says the service defaults to using the maximum available space. If we need that semantic, we need to provide that feedback to SNIA. For Drives and RAIDType, today the Ansible module requires the user to provide this, but the schema definitions don't make these mandatory. The same issue applies in that the current schema definition does not dictate what the default behavior can be. The capabilities you've highlighted are provided by the vendor's service. If you look at the schema definitions (https://redfish.dmtf.org/schemas/swordfish/v1/Volume_v1.xml), there's nothing about which properties are required. Technically, as far as the standard is concerned, this is a valid payload when creating a new Volume:
The resultant volume can have varying characteristics from different vendors. Vendor A can decide that it'll create a RAID0 volume that consumes all drives. Vendor B can decide to not use RAID at all and just allocate space from the first drive. |
Yes, that's a requirement imposed by the Redfish service you're using; it's not imposed by the standard. |
Ok, so CapacityBytes is a requirement imposed by the module that i don't understand. |
It's because the current definition in the Volume schema does not give any interoperable guidance on what the capacity should be if the user does not specify it. We decided to err on the side of caution for Ansible to ensure the user is acknowledging the size of the requested volume. I can see it being reasonable that a service should create a volume that consumes all available space on the requested drives for the requested RAID type, but I would like others to weigh in on this assumption (perhaps even provide this as feedback to SNIA for adding to the definition of CapacityBytes for clarity). |
|
Ok 👍 |
I think that current schema definition doesn't make these mandatory because, it is made to create logical volumes over drive arrays. |
In the description of Redfish Volume 1.9.0 We can read at chapter 6.140.5.11 that RAIDType is a requested property. |
Moreover, perhaps it's just a bug in the HPE redfish implementation but 'CapacityBytes' seems to be a readonly property 😲 ... {
"DisplayName": "SYSTEM",
"RAIDType": "RAID1",
"CapacityBytes": "107374182400",
"Links": {
"Drives": [
{
"@odata.id": "/redfish/v1/Systems/1/Storage/DE07A000/Drives/36"
},
{
"@odata.id": "/redfish/v1/Systems/1/Storage/DE07A000/Drives/37"
}
]
}
} The reply is : {
"error": {
"code": "iLO.0.10.ExtendedInfo",
"message": "See @Message.ExtendedInfo for more information.",
"@Message.ExtendedInfo": [
{
"MessageArgs": [
"FIXME:NeedProperty"
],
"MessageId": "iLO.2.23.PropertyNotWritableOrUnknown"
}
]
}
} I'm a little bit surprised to be the first one to face this kind of problem. |
@pyfontan after talking about this with a few others, we did agree that it should be okay from an Ansible perspective to remove CapacityBytes as a required input parameter. We can see that it might be difficult in many cases for a user to determine the appropriate capacity size of the drive. One thing we'd like to see is at least some description text for the parameter to specify that if the capacity is not specified, the Redfish service will be the one to determine the size to allocate, and depending on the design of the service, this might not always be the maximum available size. Would you be able to add this description text? |
changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml
Outdated
Show resolved
Hide resolved
…ed-parameters_list.yml Co-authored-by: Alexei Znamensky <[email protected]>
The test
The test
The test
The test
|
Co-authored-by: Mike Raineri <[email protected]>
Thank you again @mraineri 🙏 |
Looks good to me! shipit |
Backport to stable-8: 💚 backport PR created✅ Backport PR branch: Backported as #9006 🤖 @patchback |
* Remove 'CapacityBytes' from list of required parameters * Add CHANGELOG fragment * Fix sanity test failure whitespace before ']' * Update changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml Co-authored-by: Alexei Znamensky <[email protected]> * Add description for the volume_details key CapacityBytes * Update plugins/modules/redfish_config.py Co-authored-by: Mike Raineri <[email protected]> * Adjust description. --------- Co-authored-by: Pierre-yves FONTANIERE <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> Co-authored-by: Mike Raineri <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit b523d1b)
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #9007 🤖 @patchback |
* Remove 'CapacityBytes' from list of required parameters * Add CHANGELOG fragment * Fix sanity test failure whitespace before ']' * Update changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml Co-authored-by: Alexei Znamensky <[email protected]> * Add description for the volume_details key CapacityBytes * Update plugins/modules/redfish_config.py Co-authored-by: Mike Raineri <[email protected]> * Adjust description. --------- Co-authored-by: Pierre-yves FONTANIERE <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> Co-authored-by: Mike Raineri <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit b523d1b)
…st of required parameters (#9007) Remove 'CapacityBytes' from list of required parameters (#8956) * Remove 'CapacityBytes' from list of required parameters * Add CHANGELOG fragment * Fix sanity test failure whitespace before ']' * Update changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml Co-authored-by: Alexei Znamensky <[email protected]> * Add description for the volume_details key CapacityBytes * Update plugins/modules/redfish_config.py Co-authored-by: Mike Raineri <[email protected]> * Adjust description. --------- Co-authored-by: Pierre-yves FONTANIERE <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> Co-authored-by: Mike Raineri <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit b523d1b) Co-authored-by: Pierre-yves Fontaniere <[email protected]>
…st of required parameters (#9006) Remove 'CapacityBytes' from list of required parameters (#8956) * Remove 'CapacityBytes' from list of required parameters * Add CHANGELOG fragment * Fix sanity test failure whitespace before ']' * Update changelogs/fragments/8956-remove-capacitybytes-from-the-required-parameters_list.yml Co-authored-by: Alexei Znamensky <[email protected]> * Add description for the volume_details key CapacityBytes * Update plugins/modules/redfish_config.py Co-authored-by: Mike Raineri <[email protected]> * Adjust description. --------- Co-authored-by: Pierre-yves FONTANIERE <[email protected]> Co-authored-by: Alexei Znamensky <[email protected]> Co-authored-by: Mike Raineri <[email protected]> Co-authored-by: Felix Fontein <[email protected]> (cherry picked from commit b523d1b) Co-authored-by: Pierre-yves Fontaniere <[email protected]>
SUMMARY
Make
CapacityBytes
an allowed parameter and not a required one.Fixes #8955
ISSUE TYPE
COMPONENT NAME
redfish_config
ADDITIONAL INFORMATION