View | Details | Raw Unified | Return to bug 51247
Collapse All | Expand All

(-)docs/manual/mod/mod_proxy.xml (-1 / +2 lines)
Lines 997-1003 expressions</description> Link Here
997
        <td>-</td>
997
        <td>-</td>
998
        <td>Single letter value defining the initial status of
998
        <td>Single letter value defining the initial status of
999
        this worker: 'D' is disabled, 'S' is stopped, 'I' is ignore-errors,
999
        this worker: 'D' is disabled, 'S' is stopped, 'I' is ignore-errors,
1000
        'H' is hot-standby and 'E' is in an error state. Status 
1000
        'H' is hot-standby, 'R' is route-only to only accept requests with 
1001
        sticky session routes, and 'E' is in an error state. Status 
1001
        can be set (which is the default) by prepending with '+' or 
1002
        can be set (which is the default) by prepending with '+' or 
1002
        cleared by prepending with '-'.
1003
        cleared by prepending with '-'.
1003
        Thus, a setting of 'S-E' sets this worker to Stopped and
1004
        Thus, a setting of 'S-E' sets this worker to Stopped and
(-)modules/proxy/mod_proxy_balancer.c (+4 lines)
Lines 1015-1020 static int balancer_handler(request_rec *r) Link Here
1015
        if ((val = apr_table_get(params, "w_status_H"))) {
1015
        if ((val = apr_table_get(params, "w_status_H"))) {
1016
            ap_proxy_set_wstatus('H', atoi(val), wsel);
1016
            ap_proxy_set_wstatus('H', atoi(val), wsel);
1017
        }
1017
        }
1018
        if ((val = apr_table_get(params, "w_status_R"))) {
1019
            ap_proxy_set_wstatus('R', atoi(val), wsel);
1020
        }
1018
        if ((val = apr_table_get(params, "w_ls"))) {
1021
        if ((val = apr_table_get(params, "w_ls"))) {
1019
            int ival = atoi(val);
1022
            int ival = atoi(val);
1020
            if (ival >= 0 && ival <= 99) {
1023
            if (ival >= 0 && ival <= 99) {
Lines 1287-1292 static int balancer_handler(request_rec *r) Link Here
1287
            create_radio("w_status_N", (PROXY_WORKER_DRAIN & wsel->s->status), r);
1290
            create_radio("w_status_N", (PROXY_WORKER_DRAIN & wsel->s->status), r);
1288
            create_radio("w_status_D", (PROXY_WORKER_DISABLED & wsel->s->status), r);
1291
            create_radio("w_status_D", (PROXY_WORKER_DISABLED & wsel->s->status), r);
1289
            create_radio("w_status_H", (PROXY_WORKER_HOT_STANDBY & wsel->s->status), r);
1292
            create_radio("w_status_H", (PROXY_WORKER_HOT_STANDBY & wsel->s->status), r);
1293
            create_radio("w_status_R", (PROXY_WORKER_ROUTE_ONLY & wsel->s->status), r);
1290
            ap_rputs("</tr></table>\n", r);
1294
            ap_rputs("</tr></table>\n", r);
1291
            ap_rputs("<tr><td colspan=2><input type=submit value='Submit'></td></tr>\n", r);
1295
            ap_rputs("<tr><td colspan=2><input type=submit value='Submit'></td></tr>\n", r);
1292
            ap_rvputs(r, "</table>\n<input type=hidden name='w' id='w' ",  NULL);
1296
            ap_rvputs(r, "</table>\n<input type=hidden name='w' id='w' ",  NULL);
(-)modules/proxy/balancers/mod_lbmethod_bybusyness.c (+3 lines)
Lines 59-64 static proxy_worker *find_best_bybusyness(proxy_ba Link Here
59
                if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) )
59
                if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) )
60
                    continue;
60
                    continue;
61
61
62
                if (PROXY_WORKER_IS_ROUTE_ONLY(worker))
63
                    continue;
64
62
                /* If the worker is in error state run
65
                /* If the worker is in error state run
63
                 * retry on that worker. It will be marked as
66
                 * retry on that worker. It will be marked as
64
                 * operational if the retry timeout is elapsed.
67
                 * operational if the retry timeout is elapsed.
(-)modules/proxy/balancers/mod_lbmethod_byrequests.c (+2 lines)
Lines 98-103 static proxy_worker *find_best_byrequests(proxy_ba Link Here
98
                    continue;
98
                    continue;
99
                if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) )
99
                if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) )
100
                    continue;
100
                    continue;
101
                if (PROXY_WORKER_IS_ROUTE_ONLY(worker))
102
                    continue;
101
                /* If the worker is in error state run
103
                /* If the worker is in error state run
102
                 * retry on that worker. It will be marked as
104
                 * retry on that worker. It will be marked as
103
                 * operational if the retry timeout is elapsed.
105
                 * operational if the retry timeout is elapsed.
(-)modules/proxy/balancers/mod_lbmethod_bytraffic.c (+2 lines)
Lines 70-75 static proxy_worker *find_best_bytraffic(proxy_bal Link Here
70
                    continue;
70
                    continue;
71
                if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) )
71
                if ( (checking_standby ? !PROXY_WORKER_IS_STANDBY(*worker) : PROXY_WORKER_IS_STANDBY(*worker)) )
72
                    continue;
72
                    continue;
73
                if (PROXY_WORKER_IS_ROUTE_ONLY(worker))
74
                    continue;
73
                /* If the worker is in error state run
75
                /* If the worker is in error state run
74
                 * retry on that worker. It will be marked as
76
                 * retry on that worker. It will be marked as
75
                 * operational if the retry timeout is elapsed.
77
                 * operational if the retry timeout is elapsed.
(-)modules/proxy/balancers/mod_lbmethod_heartbeat.c (-1 / +1 lines)
Lines 330-336 static proxy_worker *find_best_hb(proxy_balancer * Link Here
330
            ap_proxy_retry_worker("BALANCER", *worker, r->server);
330
            ap_proxy_retry_worker("BALANCER", *worker, r->server);
331
        }
331
        }
332
332
333
        if (PROXY_WORKER_IS_USABLE(*worker)) {
333
        if (PROXY_WORKER_IS_USABLE(*worker) && !PROXY_WORKER_IS_ROUTE_ONLY(*worker)) {
334
            server->worker = *worker;
334
            server->worker = *worker;
335
            if (server->seen < LBM_HEARTBEAT_MAX_LASTSEEN) {
335
            if (server->seen < LBM_HEARTBEAT_MAX_LASTSEEN) {
336
                openslots += server->ready;
336
                openslots += server->ready;
(-)modules/proxy/proxy_util.c (+1 lines)
Lines 59-64 static struct wstat { Link Here
59
    {PROXY_WORKER_IN_ERROR,      PROXY_WORKER_IN_ERROR_FLAG,      "Err "},
59
    {PROXY_WORKER_IN_ERROR,      PROXY_WORKER_IN_ERROR_FLAG,      "Err "},
60
    {PROXY_WORKER_HOT_STANDBY,   PROXY_WORKER_HOT_STANDBY_FLAG,   "Stby "},
60
    {PROXY_WORKER_HOT_STANDBY,   PROXY_WORKER_HOT_STANDBY_FLAG,   "Stby "},
61
    {PROXY_WORKER_FREE,          PROXY_WORKER_FREE_FLAG,          "Free "},
61
    {PROXY_WORKER_FREE,          PROXY_WORKER_FREE_FLAG,          "Free "},
62
    {PROXY_WORKER_ROUTE_ONLY,    PROXY_WORKER_ROUTE_ONLY_FLAG,    "Rto "},
62
    {0x0, '\0', NULL}
63
    {0x0, '\0', NULL}
63
};
64
};
64
65
(-)modules/proxy/mod_proxy.h (+4 lines)
Lines 269-274 struct proxy_conn_pool { Link Here
269
#define PROXY_WORKER_IN_ERROR       0x0080
269
#define PROXY_WORKER_IN_ERROR       0x0080
270
#define PROXY_WORKER_HOT_STANDBY    0x0100
270
#define PROXY_WORKER_HOT_STANDBY    0x0100
271
#define PROXY_WORKER_FREE           0x0200
271
#define PROXY_WORKER_FREE           0x0200
272
#define PROXY_WORKER_ROUTE_ONLY     0x0400
272
273
273
/* worker status flags */
274
/* worker status flags */
274
#define PROXY_WORKER_INITIALIZED_FLAG    'O'
275
#define PROXY_WORKER_INITIALIZED_FLAG    'O'
Lines 280-285 struct proxy_conn_pool { Link Here
280
#define PROXY_WORKER_IN_ERROR_FLAG       'E'
281
#define PROXY_WORKER_IN_ERROR_FLAG       'E'
281
#define PROXY_WORKER_HOT_STANDBY_FLAG    'H'
282
#define PROXY_WORKER_HOT_STANDBY_FLAG    'H'
282
#define PROXY_WORKER_FREE_FLAG           'F'
283
#define PROXY_WORKER_FREE_FLAG           'F'
284
#define PROXY_WORKER_ROUTE_ONLY_FLAG     'R'
283
285
284
#define PROXY_WORKER_NOT_USABLE_BITMAP ( PROXY_WORKER_IN_SHUTDOWN | \
286
#define PROXY_WORKER_NOT_USABLE_BITMAP ( PROXY_WORKER_IN_SHUTDOWN | \
285
PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PROXY_WORKER_IN_ERROR )
287
PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PROXY_WORKER_IN_ERROR )
Lines 292-297 PROXY_WORKER_DISABLED | PROXY_WORKER_STOPPED | PRO Link Here
292
#define PROXY_WORKER_IS_USABLE(f)   ( ( !( (f)->s->status & PROXY_WORKER_NOT_USABLE_BITMAP) ) && \
294
#define PROXY_WORKER_IS_USABLE(f)   ( ( !( (f)->s->status & PROXY_WORKER_NOT_USABLE_BITMAP) ) && \
293
  PROXY_WORKER_IS_INITIALIZED(f) )
295
  PROXY_WORKER_IS_INITIALIZED(f) )
294
296
297
#define PROXY_WORKER_IS_ROUTE_ONLY(f)   ( (f)->s->status &  PROXY_WORKER_ROUTE_ONLY )
298
295
/* default worker retry timeout in seconds */
299
/* default worker retry timeout in seconds */
296
#define PROXY_WORKER_DEFAULT_RETRY    60
300
#define PROXY_WORKER_DEFAULT_RETRY    60
297
301

Return to bug 51247