-
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
Fix VerifyBiosAttributes command on Systems with multiple entries #9234
Fix VerifyBiosAttributes command on Systems with multiple entries #9234
Conversation
f0f09dd
to
6d29165
Compare
@@ -3616,7 +3616,7 @@ def set_session_service(self, sessions_config): | |||
|
|||
def verify_bios_attributes(self, bios_attributes): | |||
# This method verifies BIOS attributes against the provided input | |||
server_bios = self.get_multi_bios_attributes() | |||
server_bios = self.get_bios_attributes(self.systems_uri) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean that when a user runs this command, they need to use resource_id to specify an exact system in a multi-system scenario? Did get_multi_bios_attributes
ever work properly in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct (that was the case before my change as well):
msg: Issuing a data modification command without specifying the ID of the target System resource when there is more than one System is no longer allowed. Use the `resource_id` option to specify the target System ID.
That threw me off, but because everything in redfish_command
uses data_modification=True
:
resource_id=resource_id, data_modification=True, strip_etag_quotes=strip_etag_quotes, |
it hits the gate:
community.general/plugins/module_utils/redfish_utils.py
Lines 518 to 519 in a1c39cc
elif len(self.systems_uris) > 1: | |
self.module.fail_json(msg=FAIL_MSG % {'resource': 'System'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, just checking. I don't think it was ever reasonable in the first place to have a "multi-system" BIOS check; I think it would be very likely there'd be differences. I prefer having this check a specific system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed - I’m not sure of any system types where you’d have that, but I suppose it’s possible.
Thanks for fixing this! shipit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than a little cosmetic formatting thing in the changelog
changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml
Outdated
Show resolved
Hide resolved
…tem.yml Improve fragment Co-authored-by: Alexei Znamensky <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the adjustment. LGTM
Backport to stable-9: 💚 backport PR created✅ Backport PR branch: Backported as #9248 🤖 @patchback |
) * Fix verify_bios_attributes command * Add changelog fragment * Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml Improve fragment Co-authored-by: Alexei Znamensky <[email protected]> --------- Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 34e8e8e)
Backport to stable-10: 💚 backport PR created✅ Backport PR branch: Backported as #9249 🤖 @patchback |
) * Fix verify_bios_attributes command * Add changelog fragment * Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml Improve fragment Co-authored-by: Alexei Znamensky <[email protected]> --------- Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 34e8e8e)
…and on Systems with multiple entries (#9249) Fix VerifyBiosAttributes command on Systems with multiple entries (#9234) * Fix verify_bios_attributes command * Add changelog fragment * Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml Improve fragment Co-authored-by: Alexei Znamensky <[email protected]> --------- Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 34e8e8e) Co-authored-by: Scott Seekamp <[email protected]>
…nd on Systems with multiple entries (#9248) Fix VerifyBiosAttributes command on Systems with multiple entries (#9234) * Fix verify_bios_attributes command * Add changelog fragment * Update changelogs/fragments/9234-fix-verify-bios-attributes-multi-system.yml Improve fragment Co-authored-by: Alexei Znamensky <[email protected]> --------- Co-authored-by: Alexei Znamensky <[email protected]> (cherry picked from commit 34e8e8e) Co-authored-by: Scott Seekamp <[email protected]>
SUMMARY
Fixes #9230
ISSUE TYPE
COMPONENT NAME
redfish_utils
ADDITIONAL INFORMATION
Previously, this command was working on single system resource systems due to
get_multi_bios_attributes()
returning a consistent response. When running on a system with multiple system resources the response fromget_multi_bios_attributes()
includes additional output structure that was not being accounted for in the method.Due to this command being part of the
redfish_command
thedata_modification=True
attribute is set which requires passing inresource_id
on nodes with multiple managers/systems/chassis. We can switch to using the singularget_bios_attributes
method and eliminate the extra parsing as we will never have multiple system entries worth of data to handle.Before this change on a system with multiple system entries:
Expected failure (missing bios attribute):
Successful verification:
Expected failure (when missing
resource_id
):Running against a single resource system (without specifying
resource_id
):Successful run on single resource system: