Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
[CSTACKEX-216] Review Comments for Igroup Name Length#79
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -149,9 +149,9 @@ public static StorageStrategy getStrategyByStoragePoolDetails(Map<String, String | ||
| } | ||
| public static String getIgroupName(String svmName, String hostUuid) { | ||
| //Igroup name format: cs_svmName_hostUuid | ||
| //Igroup name format: cs_hostUuid_svmName | ||
| String sanitizedHostUuid = hostUuid.replaceAll("[^a-zA-Z0-9_-]", "_"); | ||
| String igroupName = OntapStorageConstants.CS + OntapStorageConstants.UNDERSCORE + svmName + OntapStorageConstants.UNDERSCORE + sanitizedHostUuid; | ||
| String igroupName = OntapStorageConstants.CS + OntapStorageConstants.UNDERSCORE + sanitizedHostUuid + OntapStorageConstants.UNDERSCORE + svmName; | ||
| // ONTAP igroup names are limited to 96 characters; truncate if longer. | ||
Comment on lines
151
to
155
Author There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we will try to push this change in 4.23 so that we will not see this issue during upgrade | ||
| if (igroupName.length() > OntapStorageConstants.IGROUP_NAME_MAX_LENGTH) { | ||
| igroupName = igroupName.substring(0, OntapStorageConstants.IGROUP_NAME_MAX_LENGTH); | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
For normal CloudStack UUIDs (hex + hyphens), sanitization is a no-op, so 550e8400-e29b-41d4-a716-446655440000 stays as-is. It only matters if the input has characters outside [a-zA-Z0-9_-].