diff --git a/native/balancers/mod_lbmethod_cluster.c b/native/balancers/mod_lbmethod_cluster.c index 3e3b6257..bda7ab36 100644 --- a/native/balancers/mod_lbmethod_cluster.c +++ b/native/balancers/mod_lbmethod_cluster.c @@ -6,7 +6,6 @@ #include "mod_watchdog.h" #include "common.h" - #define LB_CLUSTER_WATHCHDOG_NAME ("_lb_cluster_") static ap_watchdog_t *watchdog; @@ -16,6 +15,9 @@ static struct context_storage_method *context_storage = NULL; static struct balancer_storage_method *balancer_storage = NULL; static struct domain_storage_method *domain_storage = NULL; +static apr_table_t *proxyhctemplate; +static void (*set_proxyhctemplate_f)(apr_pool_t *, apr_table_t *) = NULL; + static int use_alias = 0; /* 1 : Compare Alias with server_name */ static int use_nocanon = 0; static apr_time_t lbstatus_recalc_time = @@ -91,7 +93,9 @@ static proxy_worker *find_best(proxy_balancer *balancer, request_rec *r) node_table = read_node_table(r->pool, node_storage, 0); } + node_storage->lock_nodes(); mycandidate = internal_find_best_byrequests(r, balancer, vhost_table, context_table, node_table); + node_storage->unlock_nodes(); return mycandidate; } @@ -319,7 +323,9 @@ static apr_status_t mc_watchdog_callback(int state, void *data, apr_pool_t *pool } /* cleanup removed node in shared memory */ + node_storage->lock_nodes(); remove_removed_node(s, pool, now, node_table); + node_storage->unlock_nodes(); } break; @@ -339,29 +345,38 @@ static int lbmethod_cluster_post_config(apr_pool_t *p, apr_pool_t *plog, apr_poo node_storage = ap_lookup_provider("manager", "shared", "0"); if (node_storage == NULL) { - ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "proxy_cluster_post_config: Can't find mod_manager for nodes"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "lbmethod_cluster_post_config: Can't find mod_manager for nodes"); return !OK; } host_storage = ap_lookup_provider("manager", "shared", "1"); if (host_storage == NULL) { - ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "proxy_cluster_post_config: Can't find mod_manager for hosts"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "lbmethod_cluster_post_config: Can't find mod_manager for hosts"); return !OK; } context_storage = ap_lookup_provider("manager", "shared", "2"); if (context_storage == NULL) { - ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "proxy_cluster_post_config: Can't find mod_manager for contexts"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, + "lbmethod_cluster_post_config: Can't find mod_manager for contexts"); return !OK; } balancer_storage = ap_lookup_provider("manager", "shared", "3"); if (balancer_storage == NULL) { - ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "proxy_cluster_post_config: Can't find mod_manager for balancers"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, + "lbmethod_cluster_post_config: Can't find mod_manager for balancers"); return !OK; } domain_storage = ap_lookup_provider("manager", "shared", "5"); if (domain_storage == NULL) { - ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "proxy_cluster_post_config: Can't find mod_manager for domains"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "lbmethod_cluster_post_config: Can't find mod_manager for domains"); return !OK; } + set_proxyhctemplate_f = ap_lookup_provider("manager", "shared", "6"); + if (set_proxyhctemplate_f == NULL) { + ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, + "lbmethod_cluster_post_config: Can't find mod_manager for set_proxyhctemplate function"); + } else if (!apr_is_empty_table(proxyhctemplate)) { + set_proxyhctemplate_f(p, proxyhctemplate); + } /* Add version information */ ap_add_version_component(p, MOD_CLUSTER_EXPOSED_VERSION); @@ -375,19 +390,19 @@ static int lbmethod_cluster_post_config(apr_pool_t *p, apr_pool_t *plog, apr_poo mc_watchdog_register_callback = APR_RETRIEVE_OPTIONAL_FN(ap_watchdog_register_callback); if (!mc_watchdog_get_instance || !mc_watchdog_register_callback) { ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, - APLOGNO(03262) "proxy_cluster_post_config: mod_watchdog is required"); + APLOGNO(03262) "lbmethod_cluster_post_config: mod_watchdog is required"); return !OK; } if (mc_watchdog_get_instance(&watchdog, LB_CLUSTER_WATHCHDOG_NAME, 0, 1, p)) { ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, - APLOGNO(03263) "proxy_cluster_post_config: Failed to create watchdog instance (%s)", + APLOGNO(03263) "lbmethod_cluster_post_config: Failed to create watchdog instance (%s)", LB_CLUSTER_WATHCHDOG_NAME); return !OK; } while (s) { if (mc_watchdog_register_callback(watchdog, AP_WD_TM_SLICE, s, mc_watchdog_callback)) { ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, - APLOGNO(03264) "proxy_cluster_post_config: Failed to register watchdog callback (%s)", + APLOGNO(03264) "lbmethod_cluster_post_config: Failed to register watchdog callback (%s)", LB_CLUSTER_WATHCHDOG_NAME); return !OK; } @@ -405,10 +420,30 @@ static const char *cmd_nocanon(cmd_parms *parms, void *mconfig, int on) return NULL; } +static const char *cmd_proxyhctemplate(cmd_parms *cmd, void *dummy, const char *arg) +{ + const char *err = NULL; + (void)dummy; + + if (!proxyhctemplate) { + proxyhctemplate = apr_table_make(cmd->pool, 8); + } + + err = parse_proxyhctemplate_params(cmd->pool, arg, proxyhctemplate); + if (err != NULL) { + return err; + } + return NULL; +} + static const command_rec lbmethod_cmds[] = { AP_INIT_FLAG("UseNocanon", cmd_nocanon, NULL, OR_ALL, "UseNocanon - When no ProxyPass or ProxyMatch for the URL, passes the URL path \"raw\" to the backend " - "(Default: Off)")}; + "(Default: Off)"), + AP_INIT_RAW_ARGS( + "ModProxyClusterHCTemplate", cmd_proxyhctemplate, NULL, OR_ALL, + "ModProxyClusterHCTemplate - Set of health check parameters to use with mod_lbmethod_cluster workers."), + {NULL}}; static void register_hooks(apr_pool_t *p) { diff --git a/native/common/common.c b/native/common/common.c index 8d2c0d5d..fe7dbc3a 100644 --- a/native/common/common.c +++ b/native/common/common.c @@ -670,3 +670,19 @@ const node_context *context_host_ok(request_rec *r, const proxy_balancer *balanc return best->node != -1 ? best : NULL; } + +const char *parse_proxyhctemplate_params(apr_pool_t *pool, const char *arg, apr_table_t *params) +{ + while (*arg) { + char *key, *val; + key = ap_getword_conf(pool, &arg); + val = strchr(key, '='); + if (!val) { + return "Invalid ProxyHCTemplate parameter. Parameter must be in the form 'key=value'"; + } + *val++ = '\0'; + + apr_table_add(params, key, val); + } + return NULL; +} diff --git a/native/include/balancer.h b/native/include/balancer.h index fb3ca714..913102a8 100644 --- a/native/include/balancer.h +++ b/native/include/balancer.h @@ -143,4 +143,10 @@ struct balancer_storage_method */ int (*get_max_size_balancer)(void); }; + +/** + * Helper function for translating hcheck template parameters to corresponding balancer parameters + */ +const char *translate_balancer_params(const char *param); + #endif /*BALANCER_H*/ diff --git a/native/include/common.h b/native/include/common.h index a4cedb13..86d010fc 100644 --- a/native/include/common.h +++ b/native/include/common.h @@ -7,7 +7,6 @@ * Common routines */ - #include "mod_proxy_cluster.h" @@ -17,7 +16,6 @@ struct counter int *values; }; - /** * Read the virtual host table from shared memory * @param pool pool to use for memory allocation @@ -222,3 +220,9 @@ apr_status_t loc_get_id(void *mem, void *data, apr_pool_t *pool); const node_context *context_host_ok(request_rec *r, const proxy_balancer *balancer, int node, int use_alias, const proxy_vhost_table *vhost_table, const proxy_context_table *context_table, const proxy_node_table *node_table); + +/** + * Parse ProxyHCTemplate parameters from @param arg into @param params using @param pool for allocations + * @return error message or NULL if everything went well + */ +const char *parse_proxyhctemplate_params(apr_pool_t *pool, const char *arg, apr_table_t *params); diff --git a/native/mod_manager/balancer.c b/native/mod_manager/balancer.c index 5336d04c..d0fc37ce 100644 --- a/native/mod_manager/balancer.c +++ b/native/mod_manager/balancer.c @@ -174,3 +174,27 @@ mem_t *create_mem_balancer(char *string, unsigned *num, int persist, apr_pool_t { return create_attach_mem_balancer(string, num, persist, 1, p, storage); } + +const char *translate_balancer_params(const char *param) +{ + if (strcasecmp(param, "hcinterval") == 0) { + return "w_hi"; + } + if (strcasecmp(param, "hcpasses") == 0) { + return "w_hp"; + } + if (strcasecmp(param, "hcfails") == 0) { + return "w_hf"; + } + if (strcasecmp(param, "hcmethod") == 0) { + return "w_hm"; + } + if (strcasecmp(param, "hcuri") == 0) { + return "w_hu"; + } + if (strcasecmp(param, "hcexpr") == 0) { + return "w_he"; + } + + return NULL; +} diff --git a/native/mod_manager/mod_manager.c b/native/mod_manager/mod_manager.c index 7348c0db..a391f939 100644 --- a/native/mod_manager/mod_manager.c +++ b/native/mod_manager/mod_manager.c @@ -107,6 +107,13 @@ static mem_t *hoststatsmem = NULL; static mem_t *balancerstatsmem = NULL; static mem_t *sessionidstatsmem = NULL; static mem_t *domainstatsmem = NULL; +/* Used for HCExpr templates with lbmethod_cluster */ +static apr_table_t *proxyhctemplate = NULL; + +static void set_proxyhctemplate(apr_pool_t *p, apr_table_t *t) +{ + proxyhctemplate = apr_table_overlay(p, t, proxyhctemplate); +} static slotmem_storage_method *storage = NULL; static balancer_method *balancerhandler = NULL; @@ -540,6 +547,7 @@ static int manager_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *p (void)ptemp; ap_mutex_register(pconf, node_mutex_type, NULL, APR_LOCK_DEFAULT, 0); ap_mutex_register(pconf, context_mutex_type, NULL, APR_LOCK_DEFAULT, 0); + proxyhctemplate = apr_table_make(plog, 1); return OK; } @@ -910,6 +918,11 @@ static int is_same_worker_existing(const request_rec *r, const nodeinfo_t *node) static apr_status_t mod_manager_manage_worker(request_rec *r, const nodeinfo_t *node, const balancerinfo_t *bal) { apr_table_t *params; + apr_status_t rv; + int i; + const apr_array_header_t *h; + const apr_table_entry_t *entries; + params = apr_table_make(r->pool, 10); /* balancer */ apr_table_set(params, "b", node->mess.balancer); @@ -922,7 +935,10 @@ static apr_status_t mod_manager_manage_worker(request_rec *r, const nodeinfo_t * apr_table_set(params, "b_wyes", "1"); apr_table_set(params, "b_nwrkr", apr_pstrcat(r->pool, node->mess.Type, "://", node->mess.Host, ":", node->mess.Port, NULL)); - balancer_manage(r, params); + rv = balancer_manage(r, params); + if (rv != APR_SUCCESS) { + return rv; + } apr_table_clear(params); /* now process the worker */ @@ -938,6 +954,17 @@ static apr_status_t mod_manager_manage_worker(request_rec *r, const nodeinfo_t * /* Use 10 sec for the moment, the idea is to adjust it with the STATUS frequency */ apr_table_set(params, "w_hi", "10000"); + + h = apr_table_elts(proxyhctemplate); + entries = (const apr_table_entry_t *)h->elts; + + for (i = 0; i < h->nelts; i++) { + const char *key = translate_balancer_params(entries[i].key); + if (key != NULL) { + apr_table_set(params, key, entries[i].val); + } + } + return balancer_manage(r, params); } @@ -1548,7 +1575,6 @@ static char *process_config(request_rec *r, char **ptr, int *errtype) /* Insert the Alias and corresponding Context */ phost = vhost; if (phost->host == NULL && phost->context == NULL) { - loc_unlock_nodes(); /* if using mod_balancer create or update the worker */ if (balancer_manage) { apr_status_t rv = mod_manager_manage_worker(r, &nodeinfo, &balancerinfo); @@ -1556,6 +1582,7 @@ static char *process_config(request_rec *r, char **ptr, int *errtype) } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "process_config: NO balancer-manager"); } + loc_unlock_nodes(); return NULL; /* Alias and Context missing */ } while (phost) { @@ -1570,7 +1597,6 @@ static char *process_config(request_rec *r, char **ptr, int *errtype) phost = phost->next; vid++; } - loc_unlock_nodes(); /* if using mod_balancer create or update the worker */ if (balancer_manage) { @@ -1579,6 +1605,7 @@ static char *process_config(request_rec *r, char **ptr, int *errtype) } else { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "process_config: NO balancer-manager"); } + loc_unlock_nodes(); ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server, "process_config: Done"); @@ -2157,7 +2184,7 @@ static char *process_appl_cmd(request_rec *r, char **ptr, int status, int *errty if (vhost->host != NULL) { int start = 0; i = 0; - while (host == NULL && i + start < strlen(vhost->host)) { + while (host == NULL && (unsigned)(i + start) < strlen(vhost->host)) { while (vhost->host[start + i] != ',' && vhost->host[start + i] != '\0') { i++; } @@ -3935,6 +3962,7 @@ static void manager_hooks(apr_pool_t *p) ap_register_provider(p, "manager", "shared", "3", &balancer_storage); ap_register_provider(p, "manager", "shared", "4", &sessionid_storage); ap_register_provider(p, "manager", "shared", "5", &domain_storage); + ap_register_provider(p, "manager", "shared", "6", &set_proxyhctemplate); } /* diff --git a/native/mod_proxy_cluster/mod_proxy_cluster.c b/native/mod_proxy_cluster/mod_proxy_cluster.c index 5323daa8..159d8dcd 100644 --- a/native/mod_proxy_cluster/mod_proxy_cluster.c +++ b/native/mod_proxy_cluster/mod_proxy_cluster.c @@ -113,7 +113,7 @@ static proxy_balancer_table *cached_balancer_table = NULL; static proxy_node_table *cached_node_table = NULL; /* for the hctemplate stuff */ -static char *proxyhctemplate = NULL; +static apr_table_t *proxyhctemplate = NULL; static APR_OPTIONAL_FN_TYPE(set_worker_hc_param) *set_worker_hc_param_f = NULL; /* To stop the watchdog loop */ @@ -170,25 +170,18 @@ static char *normalize_workername(apr_pool_t *pool, const char *url) static void add_hcheck(server_rec *s, const proxy_server_conf *conf, proxy_worker *worker) { if (set_worker_hc_param_f) { - const char *arg = apr_pstrdup(conf->pool, proxyhctemplate); - while (*arg) { - char *key, *val; - const char *err; - key = ap_getword_conf(conf->pool, &arg); - val = strchr(key, '='); - if (!val) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, - "Invalid ProxyHCTemplate parameter. Parameter must be " - "in the form 'key=value'"); - return; - } + int i; + const apr_array_header_t *h = apr_table_elts(proxyhctemplate); + const apr_table_entry_t *entries = (const apr_table_entry_t *)h->elts; - *val++ = '\0'; - err = set_worker_hc_param_f(conf->pool, s, worker, key, val, NULL); + for (i = 0; i < h->nelts; i++) { + const char *err = set_worker_hc_param_f(conf->pool, s, worker, entries[i].key, entries[i].val, NULL); if (err != NULL) { - ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "error %s for key: %s=%s", err, key, val); + ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, "error %s for key: %s=%s", err, entries[i].key, + entries[i].val); } else { - ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "hcheck %s=%s add to worker %s", key, val, + ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, "hcheck %s=%s add to worker %s", entries[i].key, + entries[i].val, #ifdef PROXY_WORKER_EXT_NAME_SIZE worker->s->name_ex); #else @@ -244,7 +237,7 @@ static void check_workers(const proxy_server_conf *conf, const server_rec *s) worker->s = helper->shared; helper->isinnodes = 0; /* If we use hcheck, we need to stop it for the worker */ - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { worker->s->method = NONE; worker->s->updated = 0; worker->s->status |= PROXY_WORKER_STOPPED; @@ -328,7 +321,7 @@ static apr_status_t create_worker_reuse(proxy_server_conf *conf, const char *ptr /* add health check */ worker->s->updated = apr_time_now(); - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { add_hcheck(server, conf, worker); } ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server, @@ -370,7 +363,7 @@ static apr_status_t create_worker_reuse(proxy_server_conf *conf, const char *ptr /* add health check */ worker->s->updated = apr_time_now(); - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { add_hcheck(server, conf, worker); } return APR_SUCCESS; @@ -462,7 +455,7 @@ static void create_worker_arrange_shared_mem(proxy_server_conf *conf, proxy_work /* check add health check */ worker->s->updated = apr_time_now(); - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { add_hcheck(server, conf, worker); } } @@ -818,7 +811,7 @@ static proxy_worker *get_worker_from_id_stat(const proxy_server_conf *conf, int /* Stop hcheck if in use. Worker must not be NULL */ static void worker_stop_hcheck(proxy_worker *worker) { - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { worker->s->method = NONE; worker->s->updated = 0; worker->s->status |= PROXY_WORKER_STOPPED; @@ -1362,7 +1355,7 @@ static int update_lbstatus_hcheck(proxy_server_conf *conf, server_rec *server, a return 1; } - if (proxyhctemplate) { + if (!apr_is_empty_table(proxyhctemplate)) { ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, server, "update_workers_lbstatus: Using hcheck!"); update_lbstatus_failure_idle(ou, worker, now); return 1; @@ -1875,7 +1868,7 @@ static int proxy_node_isup(request_rec *r, int id, int load) /* Try a ping/pong to check the node */ if (load >= 0 || load == -2) { /* Only try usuable nodes */ - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { /* Don't ping the hcheck is doing it for us */ /* TODO : worker->s->error_time = 0; Force retry now do we need something? */ if (worker->s->status & PROXY_WORKER_NOT_USABLE_BITMAP) { @@ -2109,7 +2102,7 @@ static void init_proxy_worker(server_rec *server, nodeinfo_t *node, proxy_worker /* add health check */ worker->s->updated = apr_time_now(); - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { add_hcheck(server, the_conf, worker); } } @@ -2478,7 +2471,7 @@ static int proxy_cluster_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t } /* if we have a proxyhctemplate check for the template or failed */ - if (proxyhctemplate != NULL) { + if (!apr_is_empty_table(proxyhctemplate)) { if (ap_find_linked_module("mod_proxy_hcheck.c") == NULL) { ap_log_error(APLOG_MARK, APLOG_EMERG, 0, s, "UseProxyHCTemplate requires mod_proxy_hcheck"); return HTTP_INTERNAL_SERVER_ERROR; @@ -3514,6 +3507,8 @@ static void *create_proxy_cluster_server_config(apr_pool_t *p, server_rec *s) { (void)p; (void)s; + + proxyhctemplate = apr_table_make(p, 8); return NULL; } @@ -3624,32 +3619,34 @@ static const char *cmd_proxy_cluster_proxyhctemplate(cmd_parms *cmd, void *dummy proxy_worker_shared shared; const char *err; apr_pool_t *pool; - server_rec *s = cmd->server; + int i; + const apr_array_header_t *h; + const apr_table_entry_t *entries; (void)dummy; - proxyhctemplate = apr_pstrdup(cmd->pool, arg); - while (*arg) { - char *key, *val; - key = ap_getword_conf(cmd->pool, &arg); - val = strchr(key, '='); - if (!val) { - return "Invalid ProxyHCTemplate parameter. Parameter must be in the form 'key=value'"; - } + err = parse_proxyhctemplate_params(cmd->pool, arg, proxyhctemplate); + if (err != NULL) { + return err; + } - *val++ = '\0'; - /* are we able to check more stuff? err= test() */ - if (set_worker_hc_param_f == NULL) { - return "Can't check ProxyHCTemplate parameter, is proxy_hcheck_module loaded?"; - } + if (set_worker_hc_param_f == NULL) { + return "Can't check ProxyHCTemplate parameter, is proxy_hcheck_module loaded?"; + } + + h = apr_table_elts(proxyhctemplate); + entries = (const apr_table_entry_t *)h->elts; + apr_pool_create(&pool, cmd->pool); + for (i = 0; i < h->nelts; i++) { worker.s = &shared; - apr_pool_create(&pool, cmd->pool); - err = set_worker_hc_param_f(pool, s, &worker, key, val, NULL); - apr_pool_destroy(pool); + err = set_worker_hc_param_f(pool, cmd->server, &worker, entries[i].key, entries[i].val, NULL); if (err != NULL) { - return apr_psprintf(cmd->pool, "%s key: %s=%s", err, key, val); + return apr_psprintf(cmd->pool, "%s key: %s=%s", err, entries[i].key, entries[i].val); } } + + apr_pool_destroy(pool); + return NULL; } diff --git a/test/MODCLUSTER-734/mod_lbmethod_cluster.conf b/test/MODCLUSTER-734/mod_lbmethod_cluster.conf new file mode 100644 index 00000000..b119acfa --- /dev/null +++ b/test/MODCLUSTER-734/mod_lbmethod_cluster.conf @@ -0,0 +1,41 @@ +LoadModule proxy_module modules/mod_proxy.so +LoadModule proxy_http_module modules/mod_proxy_http.so +LoadModule proxy_balancer_module modules/mod_proxy_balancer.so +LoadModule proxy_hcheck_module modules/mod_proxy_hcheck.so + +LoadModule slotmem_shm_module modules/mod_slotmem_shm.so +LoadModule manager_module modules/mod_manager.so +LoadModule lbmethod_cluster_module modules/mod_lbmethod_cluster.so +LoadModule watchdog_module modules/mod_watchdog.so + +ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/} +ModProxyClusterHCTemplate hcmethod=GET hcexpr=in_maint hcuri=/status.jsp + +Maxnode 505 +Maxhost 1010 +Maxcontext 1100 +Listen 6666 +ManagerBalancerName mycluster +ServerName localhost + + + EnableMCMPReceive + + Require ip 127.0.0. + Require ip ::1 + # This one is used in GH Actions + Require ip 172.17. + + + SetHandler mod_cluster-manager + Require ip 127.0.0. + Require ip ::1 + # This one is used in GH Actions + Require ip 172.17. + + + + + ProxySet growth=20 + ProxySet lbmethod=cluster + diff --git a/test/testsuite.sh b/test/testsuite.sh index 79d20d19..de307743 100644 --- a/test/testsuite.sh +++ b/test/testsuite.sh @@ -93,9 +93,8 @@ MPC_CONF=httpd/mod_lbmethod_cluster.conf run_test basetests.sh "Basic tests with res=$(expr $res + $?) MPC_CONF=MODCLUSTER-640/mod_lbmethod_cluster.conf run_test MODCLUSTER-640/testit.sh "MODCLUSTER-640 with mod_proxy_balancer" res=$(expr $res + $?) -# TODO: ref #301 https://github.com/modcluster/mod_proxy_cluster/issues/301 -# MPC_CONF=MODCLUSTER-734/mod_lbmethod_cluster.conf run_test MODCLUSTER-734/testit.sh "MODCLUSTER-734 with mod_proxy_balancer" -# res=$(expr $res + $?) +MPC_CONF=MODCLUSTER-734/mod_lbmethod_cluster.conf run_test MODCLUSTER-734/testit.sh "MODCLUSTER-734 with mod_proxy_balancer" +res=$(expr $res + $?) MPC_CONF=httpd/mod_lbmethod_cluster.conf run_test MODCLUSTER-755/testit.sh "MODCLUSTER-755 with mod_proxy_balancer" res=$(expr $res + $?) MPC_CONF=MODCLUSTER-785/mod_lbmethod_cluster.conf run_test MODCLUSTER-785/testit.sh "MODCLUSTER-785 with mod_proxy_balancer" @@ -103,7 +102,6 @@ res=$(expr $res + $?) MPC_CONF=MODCLUSTER-794/mod_lbmethod_cluster.conf run_test MODCLUSTER-794/testit.sh "MODCLUSTER-794 with mod_proxy_balancer" res=$(expr $res + $?) - echo -n "Cleaning containers if any..." httpd_remove > /dev/null 2>&1 tomcat_all_remove > /dev/null 2>&1