Added drain and close to doGroupMembersPut#75
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>
|
@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.
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