Skip to content

Commit 5693eae

Browse files
authored
Merge pull request #3896 from clumens/revert-ipc-split
Revert ipc split merge
2 parents 806c999 + 7fb5066 commit 5693eae

14 files changed

Lines changed: 289 additions & 60 deletions

File tree

ChangeLog

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
* Thu Jun 19 2025 Chris Lumens <clumens@redhat.com> Pacemaker-2.1.10
2-
- 98 commits with 93 files changed, 1342 insertions(+), 867 deletions(-)
2+
- 101 commits with 86 files changed, 1294 insertions(+), 607 deletions(-)
33

44
- Fixes since Pacemaker-2.1.9
55
+ build: Fix default pacemaker-remoted path on Fedora >= 42
@@ -8,9 +8,8 @@
88
+ executor: avoid use-after-free upon shutdown
99
+ libcrmcluster: better detect remote nodes in peer cache
1010
+ libcrmcluster: use pcmk__cluster_get_xml_id() when possible
11-
+ libcrmcommon: Consistently free iov on error.
12-
+ libcrmservices: Fix overrides for systemd resources
13-
+ libcrmservices: Don't leak msg if systemd_proxy is NULL.
11+
+ libcrmservice: Fix overrides for systemd resources
12+
+ libcrmservice: Don't leak msg if systemd_proxy is NULL.
1413
+ libpacemaker: set fail-count to INFINITY for fatal failures
1514
+ libpe_status: consider parents of an unmanaged resource active on the node
1615
+ pacemaker-attrd: bail earlier if value won't be written
@@ -27,9 +26,6 @@
2726

2827
- Public API changes since Pacemaker-2.1.9
2928
+ libcrmcommon: add pcmk_common_cleanup()
30-
+ libcrmcommon: Deprecate crm_ipc_compressed.
31-
+ libcrmcommon: Deprecate max_size parameter to mainloop_add_ipc_client.
32-
+ libcrmcommon: Ignore the max_size parameter in crm_ipc_new.
3329

3430
* Thu Oct 31 2024 Ken Gaillot <kgaillot@redhat.com> Pacemaker-2.1.9
3531
- 169 commits with 252 files changed, 4498 insertions(+), 2259 deletions(-)

daemons/based/based_notify.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2004-2025 the Pacemaker project contributors
2+
* Copyright 2004-2024 the Pacemaker project contributors
33
*
44
* The version control history for this file may have further details.
55
*
@@ -110,19 +110,19 @@ cib_notify_send(const xmlNode *xml)
110110
struct cib_notification_s update;
111111

112112
ssize_t bytes = 0;
113-
int rc = pcmk__ipc_prepare_iov(0, xml, &iov, &bytes);
113+
int rc = pcmk__ipc_prepare_iov(0, xml, 0, &iov, &bytes);
114114

115115
if (rc == pcmk_rc_ok) {
116116
update.msg = xml;
117117
update.iov = iov;
118118
update.iov_size = bytes;
119119
pcmk__foreach_ipc_client(cib_notify_send_one, &update);
120-
pcmk_free_ipc_event(iov);
121120

122121
} else {
123122
crm_notice("Could not notify clients: %s " CRM_XS " rc=%d",
124123
pcmk_rc_str(rc), rc);
125124
}
125+
pcmk_free_ipc_event(iov);
126126
}
127127

128128
static void

doc/sphinx/Pacemaker_Explained/local-options.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,19 @@ environment variables when Pacemaker daemons start up.
639639
* ``posix``
640640
* ``sysv``
641641

642+
* - .. _pcmk_ipc_buffer:
643+
644+
.. index::
645+
pair: node option; PCMK_ipc_buffer
646+
647+
PCMK_ipc_buffer
648+
- :ref:`nonnegative integer <nonnegative_integer>`
649+
- 131072
650+
- *Advanced Use Only:* Specify an IPC buffer size in bytes. This can be
651+
useful when connecting to large clusters that result in messages
652+
exceeding the default size (which will also result in log messages
653+
referencing this variable).
654+
642655
* - .. _pcmk_cluster_type:
643656

644657
.. index::

etc/sysconfig/pacemaker.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,14 @@
319319
#
320320
# Default: PCMK_ipc_type="shared-mem"
321321

322+
# PCMK_ipc_buffer (Advanced Use Only)
323+
#
324+
# Specify an IPC buffer size in bytes. This can be useful when connecting to
325+
# large clusters that result in messages exceeding the default size (which will
326+
# also result in log messages referencing this variable).
327+
#
328+
# Default: PCMK_ipc_buffer="131072"
329+
322330

323331
## Cluster type
324332

include/crm/common/ipc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ int pcmk_ipc_purge_node(pcmk_ipc_api_t *api, const char *node_name,
162162
enum crm_ipc_flags
163163
{
164164
crm_ipc_flags_none = UINT32_C(0),
165-
//! \deprecated Since 2.1.10
165+
//! Message has been compressed
166166
crm_ipc_compressed = (UINT32_C(1) << 0),
167167
//! _ALL_ replies to proxied connections need to be sent as events
168168
crm_ipc_proxied = (UINT32_C(1) << 8),

include/crm/common/ipc_internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2025 the Pacemaker project contributors
2+
* Copyright 2013-2024 the Pacemaker project contributors
33
*
44
* The version control history for this file may have further details.
55
*
@@ -251,6 +251,7 @@ int pcmk__ipc_send_ack_as(const char *function, int line, pcmk__client_t *c,
251251
pcmk__ipc_send_ack_as(__func__, __LINE__, (c), (req), (flags), (tag), (ver), (st))
252252

253253
int pcmk__ipc_prepare_iov(uint32_t request, const xmlNode *message,
254+
uint32_t max_send_size,
254255
struct iovec **result, ssize_t *bytes);
255256
int pcmk__ipc_send_xml(pcmk__client_t *c, uint32_t request,
256257
const xmlNode *message, uint32_t flags);

include/crm/common/mainloop.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2025 the Pacemaker project contributors
2+
* Copyright 2009-2024 the Pacemaker project contributors
33
*
44
* The version control history for this file may have further details.
55
*
@@ -130,7 +130,6 @@ qb_ipcs_service_t *mainloop_add_ipc_server_with_prio(const char *name,
130130

131131
void mainloop_del_ipc_server(qb_ipcs_service_t * server);
132132

133-
// @COMPAT max_size parameter is deprecated and unused since 2.1.10
134133
mainloop_io_t *mainloop_add_ipc_client(const char *name, int priority, size_t max_size,
135134
void *userdata, struct ipc_client_callbacks *callbacks);
136135

include/crm/common/options_internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ bool pcmk__valid_stonith_watchdog_timeout(const char *value);
129129
#define PCMK__ENV_DH_MAX_BITS "dh_max_bits"
130130
#define PCMK__ENV_DH_MIN_BITS "dh_min_bits"
131131
#define PCMK__ENV_FAIL_FAST "fail_fast"
132+
#define PCMK__ENV_IPC_BUFFER "ipc_buffer"
132133
#define PCMK__ENV_IPC_TYPE "ipc_type"
133134
#define PCMK__ENV_LOGFACILITY "logfacility"
134135
#define PCMK__ENV_LOGFILE "logfile"

lib/cib/cib_native.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2004 International Business Machines
3-
* Later changes copyright 2004-2025 the Pacemaker project contributors
3+
* Later changes copyright 2004-2024 the Pacemaker project contributors
44
*
55
* The version control history for this file may have further details.
66
*
@@ -314,7 +314,7 @@ cib_native_signon_raw(cib_t *cib, const char *name, enum cib_conn_type type,
314314

315315
} else {
316316
native->source =
317-
mainloop_add_ipc_client(channel, G_PRIORITY_HIGH, 0, cib,
317+
mainloop_add_ipc_client(channel, G_PRIORITY_HIGH, 512 * 1024 /* 512k */ , cib,
318318
&cib_callbacks);
319319
native->ipc = mainloop_get_ipc_client(native->source);
320320
}

lib/common/crmcommon_private.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2025 the Pacemaker project contributors
2+
* Copyright 2018-2024 the Pacemaker project contributors
33
*
44
* The version control history for this file may have further details.
55
*
@@ -257,6 +257,7 @@ typedef struct pcmk__ipc_methods_s {
257257
struct pcmk_ipc_api_s {
258258
enum pcmk_ipc_server server; // Daemon this IPC API instance is for
259259
enum pcmk_ipc_dispatch dispatch_type; // How replies should be dispatched
260+
size_t ipc_size_max; // maximum IPC buffer size
260261
crm_ipc_t *ipc; // IPC connection
261262
mainloop_io_t *mainloop_io; // If using mainloop, I/O source for IPC
262263
bool free_on_disconnect; // Whether disconnect should free object
@@ -268,7 +269,8 @@ struct pcmk_ipc_api_s {
268269

269270
typedef struct pcmk__ipc_header_s {
270271
struct qb_ipc_response_header qb;
271-
uint32_t size;
272+
uint32_t size_uncompressed;
273+
uint32_t size_compressed;
272274
uint32_t flags;
273275
uint8_t version;
274276
} pcmk__ipc_header_t;
@@ -281,6 +283,9 @@ void pcmk__call_ipc_callback(pcmk_ipc_api_t *api,
281283
enum pcmk_ipc_event event_type,
282284
crm_exit_t status, void *event_data);
283285

286+
G_GNUC_INTERNAL
287+
unsigned int pcmk__ipc_buffer_size(unsigned int max);
288+
284289
G_GNUC_INTERNAL
285290
bool pcmk__valid_ipc_header(const pcmk__ipc_header_t *header);
286291

0 commit comments

Comments
 (0)