From 9d1911c5a497fe625989f5795676d9f2fa4029e6 Mon Sep 17 00:00:00 2001
From: Vikram Hosakote <vhosakot@cisco.com>
Date: Sun, 13 Mar 2016 06:47:38 +0000
Subject: [PATCH] Fix false alert messages in HAProxy logs

Bug #1549753 raises false alarm about haproxy to the operator and
monitoring tools even though haproxy is running fine and there is
no issue.

haproxy uses UDP datagram socket for logging and the default queue
length of 10 datagrams causes false alert messages in haproxy
logs. This patch set fixes this bug by increasing the queue length
to 128.

Test results of the fix in this patch set are at
http://paste.openstack.org/show/490302/.

Change-Id: I64fdd17cd278d51616aa0dfa4e8d2a422c8ee630
Closes-Bug: #1549753
---
 docker/haproxy/extend_start.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/docker/haproxy/extend_start.sh b/docker/haproxy/extend_start.sh
index cf50a5c9fc..16a65c0afa 100644
--- a/docker/haproxy/extend_start.sh
+++ b/docker/haproxy/extend_start.sh
@@ -1,4 +1,8 @@
 #!/bin/bash
+
+# Set datagram receiving queue length to 128 for haproxy's socket
+sysctl net.unix.max_dgram_qlen=128
+
 # We are intentionally not using exec so we can reload the haproxy config later
 echo "Running command: '${CMD}'"
 $CMD