-
Notifications
You must be signed in to change notification settings - Fork 27
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
Rename sdc #153
Rename sdc #153
Conversation
seeing |
updated the go.mod with the latest goscaleio commit. |
I think case 3 should be dropped:
|
Addressed this, thanks. |
Is there a downside to renaming SDC always and add only a SDCPrefix if a customer specifies a prefix? |
iirc: back when this was being planned, we wanted the driver behavior to match earlier versions by default |
service/features/service.feature
Outdated
@@ -942,3 +942,21 @@ Feature: VxFlex OS CSI interface | |||
When I call Probe | |||
And I call setQoSParameters with systemID "15dbbf5617523655" sdcID "d0f055a700000000" bandwidthLimit "10240" iopsLimit "10" volumeName "k8s-a031818af5" csiVolID "15dbbf5617523655-456ca4fc00000009" nodeID "9E56672F-2F4B-4A42-BFF4-88B6846FBFDA" | |||
Then the error contains "error setting QoS parameters" | |||
|
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.
These look good, but I think we should add some negative test cases
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.
Negative test cases are added.
service/node.go
Outdated
// fetch hostname | ||
hostName, ok := os.LookupEnv("HOSTNAME") | ||
if !ok { | ||
Log.Infof("%s not set\n", "HOSTNAME") |
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.
I don't think this block should be hit, but if it is, should we exit here?
If there's no hostname and no prefix, SDC name will = ""
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.
Yes, We should not hit this case. Now I have made the changes to return an error if the HOSTNAME is not. We wont hit this case at all, But added it for safe side.
I understand, but I was thinking if we can improve SDC names by renaming them to be more legible as opposed to what we had earlier, would that have any negative impact? would that cause any volumes mapped via the SDC to fail when users upgrade to newer version of the driver. |
What if a customer already named their SDCs based on their own convention and then updated driver? Their old SDC names will get replaced and they will probably be confused as to why that happened. I think in general, we should not alter anything on their pflex array unless they request it via enable value. |
Looks good, outside of some quick comments, my two main questions are:
|
If customers already renamed, I guess this might be a concern. Thanks for explaining. |
If customer upgraded the driver from 2.5 to 2.6 suppose, then in that case rename would not happen on its own unless they have enabled it from values.yaml, so whatever was the previous name it would still stay the same for them. |
9a35a52
to
96c1b13
Compare
sdcID := sdc.Sdc.ID | ||
|
||
var newName string | ||
if len(opts.SdcPrefix) > 0 { |
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.
you can simplify code here if you would like (nothing wrong with what you have).
newName = hostName
if (sdcPrefix > 0) newName = opts.SdcPrefix + "_" + newName.
Basically remove the else clause. Not major, I am fine with as is.
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
Description
Add support for Rename SDC operation from CSI-PowerFlex driver
GitHub Issues
List the GitHub issues impacted by this PR:
Checklist:
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration
Renaming SDC with name set as "prefix-hostname"
Renaming SDC with name set as "hostname"