Skip to content

Fix: pacemakerd: Correctly detect ping requests from sbd#4066

Open
gao-yan wants to merge 1 commit intoClusterLabs:mainfrom
gao-yan:sbd-ping-requests
Open

Fix: pacemakerd: Correctly detect ping requests from sbd#4066
gao-yan wants to merge 1 commit intoClusterLabs:mainfrom
gao-yan:sbd-ping-requests

Conversation

@gao-yan
Copy link
Member

@gao-yan gao-yan commented Mar 10, 2026

This fixes a regression introduced by 6f7dd0b, which has not made it into any release. Even though the ipc_name is set to sbd:pcmk by sbd, do_pacemakerd_api_call() generates the sender_system in the format <pid>_sbd:pcmk.

This fixes a regression introduced by 6f7dd0b, which has not made it
into any release. Even though the ipc_name is set to "sbd:pcmk" by sbd,
do_pacemakerd_api_call() generates the sender_system in the format
"<pid>_sbd:pcmk".
@wenningerk
Copy link
Contributor

Was there a reason to go for stricter checking with the commit mentioned?
If yes we could go checking for a suffix. Or make the check a utility function in the library for the case we change naming. We wouldn't necessarily have to add it to the api though.

@nrwahl2
Copy link
Contributor

nrwahl2 commented Mar 11, 2026

Was there a reason to go for stricter checking with the commit mentioned?

Just wanted to standardize and be a little bit clearer. We're making decisions on the server based on a magic string that's set by the client. I thought we could at least restrict it to the beginning of the string.

@wenningerk
Copy link
Contributor

Was there a reason to go for stricter checking with the commit mentioned?

Just wanted to standardize and be a little bit clearer. We're making decisions on the server based on a magic string that's set by the client. I thought we could at least restrict it to the beginning of the string.

The magic 'sbd' is coming directly from the client but as pacemaker is providing the library the client is using we could use the knowledge about mangling.

@gao-yan
Copy link
Member Author

gao-yan commented Mar 11, 2026

Do we really want an exact suffix match, or just the way it is? :-)

@wenningerk
Copy link
Contributor

Do we really want an exact suffix match, or just the way it is? :-)

Just wanted to make sure if there was an issue that led to more stringent (wrongly in this case ;-) ) checking.
And if we want it more stringent then we might want to move it to the library to prevent future surprises.
But personally I'm fine with the strstr thing - well was my initial code right.

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.

3 participants