-
Notifications
You must be signed in to change notification settings - Fork 184
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
provider: fix clientProfileName calculation #2932
base: main
Are you sure you want to change the base?
provider: fix clientProfileName calculation #2932
Conversation
9291720
to
8defa00
Compare
services/provider/server/server.go
Outdated
// Using the same hash function we have in client op to calculate the clientProfile Name | ||
clientProfileHash := md5.Sum([]byte(fmt.Sprintf("%s-ceph-rbd", clientName))) | ||
clientProfileName := hex.EncodeToString(clientProfileHash[:]) |
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.
so in provider before hashing we are turning them into a slice 😅
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 right
/retest-required |
/hold |
8defa00
to
3422906
Compare
New changes are detected. LGTM label has been removed. |
return "", client.IgnoreNotFound(err) | ||
} | ||
|
||
return clientMappingConfig.Data[consumer.Status.Client.ID], 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.
What if the key or the value does not exist? are we still going to return an empty value? and if so who is going to handle such a case?
use localClientId for localClientProfile name use remoteClientId for remoteClinetProfile name Signed-off-by: Rewant Soni <resoni@redhat.com>
3422906
to
7b1164e
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: leelavg, rewantsoni 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 |
Testing:
|
For the clientProfileMapping sent from provider to the client,