Author: ru Date: 2013-04-12 19:12:13 +0000 (Fri, 12 Apr 2013) New Revision: 5174 URL: http://trac.nginx.org/nginx/changeset/5174/nginx
Log: Upstream: warn if multiple non-stackable balancers are installed. Modified: trunk/src/http/modules/ngx_http_upstream_ip_hash_module.c trunk/src/http/modules/ngx_http_upstream_least_conn_module.c Modified: trunk/src/http/modules/ngx_http_upstream_ip_hash_module.c =================================================================== --- trunk/src/http/modules/ngx_http_upstream_ip_hash_module.c 2013-04-12 17:31:08 UTC (rev 5173) +++ trunk/src/http/modules/ngx_http_upstream_ip_hash_module.c 2013-04-12 19:12:13 UTC (rev 5174) @@ -252,6 +252,11 @@ uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module); + if (uscf->peer.init_upstream) { + ngx_conf_log_error(NGX_LOG_WARN, cf, 0, + "load balancing method redefined"); + } + uscf->peer.init_upstream = ngx_http_upstream_init_ip_hash; uscf->flags = NGX_HTTP_UPSTREAM_CREATE Modified: trunk/src/http/modules/ngx_http_upstream_least_conn_module.c =================================================================== --- trunk/src/http/modules/ngx_http_upstream_least_conn_module.c 2013-04-12 17:31:08 UTC (rev 5173) +++ trunk/src/http/modules/ngx_http_upstream_least_conn_module.c 2013-04-12 19:12:13 UTC (rev 5174) @@ -387,6 +387,11 @@ uscf = ngx_http_conf_get_module_srv_conf(cf, ngx_http_upstream_module); + if (uscf->peer.init_upstream) { + ngx_conf_log_error(NGX_LOG_WARN, cf, 0, + "load balancing method redefined"); + } + uscf->peer.init_upstream = ngx_http_upstream_init_least_conn; uscf->flags = NGX_HTTP_UPSTREAM_CREATE _______________________________________________ nginx-devel mailing list nginx-devel@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx-devel