-
Notifications
You must be signed in to change notification settings - Fork 118
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
Check for ownership on migrate cancel and status #1099
Check for ownership on migrate cancel and status #1099
Conversation
2b522f5
to
9c1492e
Compare
4e5c2d1
to
2b67287
Compare
2b67287
to
b446805
Compare
for _, cluster := range resp.Info { | ||
for _, migrateInfo := range cluster.List { | ||
if err := checkAccessFromDriverForVolumeId(ctx, s.driver(ctx), | ||
migrateInfo.GetLocalVolumeId(), api.Ownership_Read); err != nil { |
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.
Shouldn't this be api.OwnershipWrite? since the check is being used for cancel?
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 can change it to that, but anyone with Read Access can start a migration for that volume, so I figured that delete/status should match that.
Let me see what Bhavana and Luis think.
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.
ok
Signed-off-by: Grant Griffiths <[email protected]>
b446805
to
0d4fdf9
Compare
Just re-tested this on two px clusters with the latest changes - works as expected. |
Signed-off-by: Grant Griffiths [email protected]
What this PR does / why we need it:
Which issue(s) this PR fixes (optional)
Closes #1098
Special notes for your reviewer: