Page MenuHomeClusterLabs Projects

Use asynchronous communication for liblrmd commands with replies
Open, LowPublic

Assigned To
None
Authored By
kgaillot
Oct 22 2024, 4:25 PM
Tags
  • Restricted Project
  • Restricted Project
Referenced Files
None
Subscribers

Description

Currently, lrmd_send_command() with expect_reply set to TRUE, and lrmd_handshake(), call lrmd_send_xml() with a non-NULL reply. That causes it to call crm_ipc_send() or lrmd_tls_send_recv() with a blocking timeout.

We want the commands to be asynchronous for internal callers, so they get a callback when the reply is received (or after the timeout).

lrmd_send_command() is currently used by most of the lrmd_t methods. The interfaces will need to be left as-is since they are public. If possible, we can set some lrmd_t flag for internal connections and use async when that's set, otherwise we may need a duplicate set of async methods (which can be regular internal functions rather than part of lrmd_api_operations_t).

See also:

Event Timeline

kgaillot created this task.
kgaillot created this object with edit policy "Restricted Project (Project)".
clumens raised the priority of this task from Low to High.Oct 31 2024, 4:55 PM
kgaillot changed the task status from Open to WIP.Nov 4 2024, 11:20 AM
kgaillot updated the task description. (Show Details)
kgaillot added a project: Restricted Project.
kgaillot moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Nov 4 2024, 11:22 AM
kgaillot changed the task status from WIP to Open.Dec 4 2024, 12:23 PM
kgaillot removed clumens as the assignee of this task.
kgaillot lowered the priority of this task from High to Normal.
kgaillot removed a project: Restricted Project.
kgaillot added a subscriber: clumens.
kgaillot lowered the priority of this task from Normal to Low.Jan 2 2025, 4:07 PM

This is going to be very, very difficult to do which is why we've removed it from the RHEL board and lowered the priority. Basically, lrmd_send_command implements almost all of the API commands for a lrmd_t. All of those would need to be converted over to an async style, and then all of their callers would be. This includes major portions of the control daemon, which isn't very well set up to call the async versions of these functions. It would require rewriting much of liblrmd and the control daemon, and there's simply not enough time to get around to a project of that size.