[manila-csi-plugin] Use GET-based share access rules API when available#3134
Open
gouthampacha wants to merge 1 commit into
Open
[manila-csi-plugin] Use GET-based share access rules API when available#3134gouthampacha wants to merge 1 commit into
gouthampacha wants to merge 1 commit into
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Use the GET-based share-access-rules API (microversion 2.45+) instead of the deprecated os-access_list POST action for listing access rules. Some deployments rate-limit POST requests as writes, causing unnecessary throttling on what is semantically a read operation. The server's max supported microversion is now stored at client init time. GetAccessRights conditionally uses shareaccessrules.List (GET) when the server supports >= 2.45, falling back to shares.ListAccessRights (POST) for older deployments.
c29d63e to
01b4bf6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Switches from the deprecated
os-access_listPOST action to theGET-based
share-access-rulesAPI (microversion 2.45+) for listingaccess rules. Falls back to the old API for pre-2.45 deployments.
Some OpenStack deployments rate-limit POST/PUT as write requests,
causing unnecessary throttling on what is semantically a read operation.
Which issue this PR fixes(if applicable):
fixes #2277
Special notes for reviewers:
The server's max supported microversion (already fetched during client
init validation) is now stored in the Client struct.
GetAccessRightsconditionally uses
shareaccessrules.List(GET) when the serversupports >= 2.45, otherwise falls back to
shares.ListAccessRights(POST). The
Interfacereturn type is unchanged — all callers stillreceive
[]shares.AccessRight.Release note: