Split controld_remote_proxy_cb() into helper functions#4104
Split controld_remote_proxy_cb() into helper functions#4104nrwahl2 wants to merge 17 commits intoClusterLabs:mainfrom
Conversation
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
To controld_remote_ra_in_maintenance(). Also return bool and take a const argument. Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
To controld_remote_ra_controlling_guest(). Also return bool and take a const argument. Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
| /* This is msg from remote ipc client going to real ipc server */ | ||
|
|
||
| if (pcmk__str_eq(op, LRMD_IPC_OP_NEW, pcmk__str_casei)) { | ||
| if (pcmk__str_eq(op, LRMD_IPC_OP_NEW, pcmk__str_none)) { |
There was a problem hiding this comment.
ACK, but it looks like there's a fair number of places where we're still comparing operations case-sensitively (grep -r pcmk__str_eq | grep _OP_). There doesn't appear to be any consistency to this. I suppose it's just things getting cleaned up as they're discovered.
There was a problem hiding this comment.
That's been exactly it.
I started to go change other comparisons just now, but I think it's going to create more conflicts in my other branches, and I'd rather not deal with that.
| pcmk__xe_get_int(msg, PCMK__XA_LRMD_IPC_MSG_ID, &msg_id); | ||
|
|
||
| CRM_CHECK(request != NULL, return); | ||
| pcmk__assert((lrm_state->node_name != NULL) && (request != NULL)); |
There was a problem hiding this comment.
I'm a little hesitant about this. Doesn't this change us to a situation where controld can crash if another daemon sends it a malformed message? I certainly don't expect us to be able to handle that, but I also don't want us to have to restart controld and deal with whatever chaos results.
There was a problem hiding this comment.
Yeah, I think you're right.
| CRM_CHECK((op != NULL) && (session != NULL), return); | ||
|
|
||
| /* This is msg from remote ipc client going to real ipc server */ | ||
| pcmk__assert((op != NULL) && (session != NULL)); |
There was a problem hiding this comment.
See previous comment about asserting in this code.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
And clean up a couple of comments. Signed-off-by: Reid Wahl <nrwahl@protonmail.com>
No description provided.