-
Notifications
You must be signed in to change notification settings - Fork 635
[cinder-csi-plugin] Use context #2864
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
base: master
Are you sure you want to change the base?
Conversation
[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.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Looks like an oversight in commit 7bfb2eb. Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
f264505
to
7159398
Compare
@@ -220,8 +220,8 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol | |||
return nil, status.Errorf(codes.InvalidArgument, "failed to resolve anti-affinity volume UUIDs: %v", err) | |||
} | |||
|
|||
volCtx = util.SetMapIfNotEmpty(volCtx, "affinity", affinity) | |||
volCtx = util.SetMapIfNotEmpty(volCtx, "anti-affinity", antiAffinity) | |||
volCtx[affinityKey] = affinity |
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.
This seems to change the behavior, as it can now set volCtx[affinityKey]
or volCtx[antiAffinityKey]
to an empty value, while previously it could not. Are we sure this is the intended behavior?
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.
Correct, the behavior has been changed. cinder.csi.openstack.org/anti-affinity
!= anti-affinity
. volCtx
will represent the resolved volume anti-affinities, and this info should be available in PV. So the flow is PVC annotation -> PV parameters.
What this PR does / why we need it:
Use the generated VolumeContext.
Which issue this PR fixes(if applicable):
fixes #2863
Special notes for reviewers:
Release note: