-
Notifications
You must be signed in to change notification settings - Fork 7
Added drain and close to doGroupMembersPut #75
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
Conversation
SMD leaks memory if the request is not fully read and closed. The DrainAndCloseRequestBody function was created to do this. This change adds a call to this in doGroupMembersPut. Signed-off-by: Shane Unruh <shane.unruh@hpe.com>
bmcdonald3
left a comment
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.
Looks good to me
|
@shunr-hpe I'm currently testing this with the Can you comment as to what the difference in output I should be seeing is? 1. Creation of GroupCreation of group with members: Logs: 2. Checking CreationGroup: Membership: These seem to work. 3. Updating MembershipLogs: 4. Checking Output Again |
|
@synackd Thanks for testing that with the ochami cli. I should have thought of testing with that. Your results are all that there is to see and they worked as expected. The put call successfully changed the group members. For the log output there are no expected additional logs. This PR adds a call to DrainAndCloseRequestBody which does not log anything This call to DrainAndCloseRequestBody is like the other calls in smd-api.go. For example: The historical context is that the DrainAndCloseRequestBody was created in CSM after OpenCHAMI forked smd. And those drain changes were merged into OpenCHAMI after the doGroupMembersPut was added in OpenCHAMI SMD. |
synackd
left a comment
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.
Thanks for the clarification. Since the testing passed then, I approve. LGTM.
SMD leaks memory if the request is not fully read and closed. The DrainAndCloseRequestBody function was created to do this. This change adds a call to this in doGroupMembersPut.
I tested this using the quickstart guide, and made calls like the following