HomeClusterLabs Projects

Feature: libcrmcommon: Handle sending multi-part IPC server events.

Description

Feature: libcrmcommon: Handle sending multi-part IPC server events.

Server events are sent by pcmkipc_send_iov assuming the right flag is
passed to it. That function also sends other IPC responses that aren't
server events. We're not going to worry with that right now. In order
to send multi-part server events, we don't actually have to do anything
in pcmk
ipc_send_iov - it's all handled by the callers.

The main caller is pcmkipc_send_xml, which can also be called for both
server events and regular responses. For now we're only worrying with
server events. Basically, just loop over the input message, breaking it
up into chunks, constructing an iov for each chunk, and calling
pcmk
ipc_send_iov on it.

One additional thing to note: EAGAIN on a server event is not an error,
and isn't even something we really need to worry with. Transmitting an
event works by putting it into a queue and eventually flushing that
queue. EAGAIN means we weren't able to transmit it immediately, but we
try to flush the queue in various places so there's no action we need to
take. I'm undecided as to whether the various places we print an error
message on EAGAIN are confusing or not.

Details

Provenance
clumensAuthored on Thu, May 1, 11:58 AM
Parents
rPfd7d099baed2: Refactor: libcrmcommon: Minor refactorings in pcmk__ipc_send_iov.
Branches
Unknown
Tags
Unknown