File bug-940992_pacemaker-ipc-buffer-size-3.patch of Package pacemaker.9287
commit d8176364964b95d3fcc43d9b5a153ed25f11e2c5
Author: Gao,Yan <ygao@suse.com>
Date: Mon Aug 10 18:15:55 2015 +0200
Fix: ipc: Do not constantly increase suggested size for PCMK_ipc_buffer every time we find it's insufficient
Previously, the suggested size for PCMK_ipc_buffer could be constantly
doubled every time the error was encountered, which leaded to confusion.
This commit also changes the logging format to indicate the size of the
original message.
diff --git a/lib/common/ipc.c b/lib/common/ipc.c
index 8511257..f4188ed 100644
--- a/lib/common/ipc.c
+++ b/lib/common/ipc.c
@@ -579,20 +579,18 @@ crm_ipc_prepare(uint32_t request, xmlNode * message, struct iovec ** result, uin
free(buffer);
- if (header->size_compressed > biggest) {
- biggest = 2 * QB_MAX(header->size_compressed, biggest);
- }
+ biggest = QB_MAX(header->size_compressed, biggest);
} else {
ssize_t rc = -EMSGSIZE;
crm_log_xml_trace(message, "EMSGSIZE");
- biggest = 2 * QB_MAX(header->size_uncompressed, biggest);
+ biggest = QB_MAX(header->size_uncompressed, biggest);
crm_err
- ("Could not compress the message into less than the configured ipc limit (%u bytes)."
- "Set PCMK_ipc_buffer to a higher value (%u bytes suggested)", max_send_size,
- biggest);
+ ("Could not compress the message (%u bytes) into less than the configured ipc limit (%u bytes). "
+ "Set PCMK_ipc_buffer to a higher value (%u bytes suggested)",
+ header->size_uncompressed, max_send_size, 4 * biggest);
free(compressed);
free(buffer);