Make storage client work correctly with read only secondary accounts#376
Merged
Conversation
| func (c Client) getCanonicalizedAccountName() string { | ||
| // since we may be trying to access a secondary storage account, we need to | ||
| // remove the -secondary part of the storage name | ||
| return strings.Replace(c.accountName, "-secondary", "", -1) |
Contributor
There was a problem hiding this comment.
could this be strings.TrimSuffix?
Contributor
@dovreshef do you know if there is an English version of this article? |
Contributor
Author
|
@ahmetalpbalkan that's the only mention of the issue that I found. Had to use Google translate :). |
Contributor
|
@dovreshef I'm trying to understand why would you specify storage account name as the |
Contributor
Author
|
@ahmetalpbalkan We use it to simulate a regional downtime, read all the backups off the storage. |
Contributor
|
Ah okay, in that case, merging. |
Contributor
Author
|
@ahmetalpbalkan thanks!! |
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.
We need to remove the "-secondary" string from the account name when using it to authorize access.
See also here: https://blogs.technet.microsoft.com/ksasaki/2013/12/23/use-ra-grs/.