[PATCH 3/3] [BUG] checks: fix newline termination

2010-01-11 Thread Krzysztof Piotr Oledzki
From eb10f36700f98b5f320603e3d5bd1be7f5af411c Mon Sep 17 00:00:00 2001
From: Krzysztof Piotr Oledzki o...@ans.pl
Date: Mon, 11 Jan 2010 13:16:27 +0100
Subject: [BUG] checks: fix newline termination

We can't put a newline in server_status_printf() as there might be
something added later.
---
 src/checks.c |   28 ++--
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/checks.c b/src/checks.c
index 8b89e5d..75d2dbf 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -173,13 +173,13 @@ static void server_status_printf(struct chunk *msg, 
struct server *s, unsigned o
if (xferred  0) {
if (!(s-stateSRV_RUNNING))
chunk_printf(msg, . %d active and %d backup servers 
left.%s
-%d sessions active, %d requeued, %d remaining 
in queue.\n,
+%d sessions active, %d requeued, %d remaining 
in queue,
s-proxy-srv_act, s-proxy-srv_bck,
(s-proxy-srv_bck  !s-proxy-srv_act) ?  
Running on backup. : ,
s-cur_sess, xferred, s-nbpend);
else 
chunk_printf(msg, . %d active and %d backup servers 
online.%s
-%d sessions requeued, %d total in queue.\n,
+%d sessions requeued, %d total in queue,
s-proxy-srv_act, s-proxy-srv_bck,
(s-proxy-srv_bck  !s-proxy-srv_act) ?  
Running on backup. : ,
xferred, s-nbpend);
@@ -278,13 +278,13 @@ static void set_server_check_status(struct server *s, 
short status, char *desc)
 
server_status_printf(msg, s, SSP_O_HCHK, -1);
 
-   chunk_printf(msg, , status: %d/%d %s.\n,
+   chunk_printf(msg, , status: %d/%d %s,
(state  SRV_RUNNING) ? (health - rise + 1) : (health),
(state  SRV_RUNNING) ? (fall) : (rise),
(state  SRV_RUNNING)?UP:DOWN);
 
-   Warning(%s, trash);
-   send_log(s-proxy, LOG_NOTICE, %s, trash);
+   Warning(%s.\n, trash);
+   send_log(s-proxy, LOG_NOTICE, %s.\n, trash);
}
 }
 
@@ -387,13 +387,13 @@ static void set_server_down(struct server *s)
((!s-tracked  !(s-proxy-options2  
PR_O2_LOGHCHKS))?SSP_O_HCHK:0),
xferred);
 
-   Warning(%s, trash);
+   Warning(%s.\n, trash);
 
/* we don't send an alert if the server was previously paused */
if (srv_was_paused)
-   send_log(s-proxy, LOG_NOTICE, %s, trash);
+   send_log(s-proxy, LOG_NOTICE, %s.\n, trash);
else
-   send_log(s-proxy, LOG_ALERT, %s, trash);
+   send_log(s-proxy, LOG_ALERT, %s.\n, trash);
 
if (s-proxy-srv_bck == 0  s-proxy-srv_act == 0)
set_backend_down(s-proxy);
@@ -455,8 +455,8 @@ static void set_server_up(struct server *s) {
((!s-tracked  !(s-proxy-options2  
PR_O2_LOGHCHKS))?SSP_O_HCHK:0),
xferred);
 
-   Warning(%s, trash);
-   send_log(s-proxy, LOG_NOTICE, %s, trash);
+   Warning(%s.\n, trash);
+   send_log(s-proxy, LOG_NOTICE, %s.\n, trash);
 
if (s-state  SRV_CHECKED)
for(srv = s-tracknext; srv; srv = srv-tracknext)
@@ -494,8 +494,8 @@ static void set_server_disabled(struct server *s) {
((!s-tracked  !(s-proxy-options2  
PR_O2_LOGHCHKS))?SSP_O_HCHK:0),
xferred);
 
-   Warning(%s, trash);
-   send_log(s-proxy, LOG_NOTICE, %s, trash);
+   Warning(%s.\n, trash);
+   send_log(s-proxy, LOG_NOTICE, %s.\n, trash);
 
if (!s-proxy-srv_bck  !s-proxy-srv_act)
set_backend_down(s-proxy);
@@ -530,8 +530,8 @@ static void set_server_enabled(struct server *s) {
((!s-tracked  !(s-proxy-options2  
PR_O2_LOGHCHKS))?SSP_O_HCHK:0),
xferred);
 
-   Warning(%s, trash);
-   send_log(s-proxy, LOG_NOTICE, %s, trash);
+   Warning(%s.\n, trash);
+   send_log(s-proxy, LOG_NOTICE, %s.\n, trash);
 
if (s-state  SRV_CHECKED)
for(srv = s-tracknext; srv; srv = srv-tracknext)
-- 
1.6.4.2




Re: [ANNOUNCE] haproxy 1.4-dev5 with keep-alive :-)

2010-01-11 Thread Dmitry Sivachenko
On Mon, Jan 04, 2010 at 12:13:49AM +0100, Willy Tarreau wrote:
 Hi all,
 
 Yes that's it, it's not a joke !
 
  -- Keep-alive support is now functional on the client side. --
 

Hello!

Are there any plans to implement server-side HTTP keep-alive?

I mean I want client connecting to haproxy NOT to use keep-alive,
but to utilize keep-alive between haproxy and backend servers.

Thanks!



Re: Separate appsession tables per back-end? Or shared?

2010-01-11 Thread Willy Tarreau
Hi John,

On Mon, Jan 11, 2010 at 02:50:24PM -0500, John Norman wrote:
 Hi.
 
 What happens if the same cookie is named in two (or more) backends? Is
 the table in which the cookie value is placed shared among backends,
 or is there a separate table per backend?

There's a separate table per backend. You were right to ask because that
was not clear in the doc. This would need some lifting in my opinion.
Think of it the same way as you do for servers, LB algos or cookies.

Regards,
Willy




Re: [PATCH 1/3] [BUG] health checks: fix requeued message

2010-01-11 Thread Willy Tarreau
On Mon, Jan 11, 2010 at 01:30:28PM +0100, Krzysztof Piotr Oledzki wrote:
 From 12aaba5a79caafb7ebcee3f52a4685a387306e8b Mon Sep 17 00:00:00 2001
 From: Krzysztof Piotr Oledzki o...@ans.pl
 Date: Sun, 10 Jan 2010 21:12:58 +0100
 Subject: [BUG] health checks: fix requeued message
 
 Dummy copypast is not a good idea. :( Also, we shoud
 check s-state  SRV_RUNNING instead of xferred.

all 3 applied, thanks Krzysztof!
Willy