Skip to content

Split controld_remote_proxy_cb() into helper functions#4104

Open
nrwahl2 wants to merge 17 commits intoClusterLabs:mainfrom
nrwahl2:nrwahl2-proxy
Open

Split controld_remote_proxy_cb() into helper functions#4104
nrwahl2 wants to merge 17 commits intoClusterLabs:mainfrom
nrwahl2:nrwahl2-proxy

Conversation

@nrwahl2
Copy link
Copy Markdown
Contributor

@nrwahl2 nrwahl2 commented May 6, 2026

No description provided.

nrwahl2 added 7 commits May 6, 2026 10:00
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>
@nrwahl2 nrwahl2 requested a review from clumens May 6, 2026 17:01
/* 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)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

@nrwahl2 nrwahl2 May 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread daemons/controld/controld_remote_proxy.c Outdated
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));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See previous comment about asserting in this code.

nrwahl2 added 10 commits May 6, 2026 13:47
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants