[MINOR] add the "force-persist" statement to force persistence on down servers
This is used to force access to down servers for some requests. This
is useful when validating that a change on a server correctly works
before enabling the server again.
diff --git a/include/types/proxy.h b/include/types/proxy.h
index a4c99cb..c4fb505 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -171,6 +171,7 @@
struct list block_cond; /* early blocking conditions (chained) */
struct list redirect_rules; /* content redirecting rules (chained) */
struct list switching_rules; /* content switching rules (chained) */
+ struct list force_persist_rules; /* 'force-persist' rules (chained) */
struct list sticking_rules; /* content sticking rules (chained) */
struct list storersp_rules; /* content store response rules (chained) */
struct { /* TCP request processing */
@@ -297,6 +298,11 @@
} be;
};
+struct force_persist_rule {
+ struct list list; /* list linked to from the proxy */
+ struct acl_cond *cond; /* acl condition to meet */
+};
+
struct sticking_rule {
struct list list; /* list linked to from the proxy */
struct acl_cond *cond; /* acl condition to meet */
diff --git a/include/types/session.h b/include/types/session.h
index ecbb6c1..6c8cfa0 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -2,7 +2,7 @@
* include/types/session.h
* This file defines everything related to sessions.
*
- * Copyright (C) 2000-2009 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2010 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -47,7 +47,7 @@
#define SN_ADDR_SET 0x00000004 /* this session's server address has been set */
#define SN_BE_ASSIGNED 0x00000008 /* a backend was assigned. Conns are accounted. */
-/* unused: 0x00000010 */
+#define SN_FORCE_PRST 0x00000010 /* force persistence here, even if server is down */
#define SN_MONITOR 0x00000020 /* this session comes from a monitoring system */
#define SN_CURR_SESS 0x00000040 /* a connection is currently being counted on the server */
#define SN_FRT_ADDR_SET 0x00000080 /* set if the frontend address has been filled */