Re: svn commit: r1890947 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS include/ap_mmn.h modules/proxy/mod_proxy.h modules/proxy/mod_proxy_ajp.c modules/proxy/mod_proxy_balancer.c modules/proxy/m

2021-06-22 Thread Graham Leggett
On 22 Jun 2021, at 09:09, Ruediger Pluem  wrote:

>> +timeout = apr_time_from_sec(10); /* 10 seconds */
> 
> Sorry for jumping on this late, but as I already mentioned on the original 
> trunk revision a hard coded timeout is bad.
> Please also backport r1887439. For the record I am +1 on backporting r1887439.

+1 to this.

I’ve proposed it here: http://svn.apache.org/viewvc?rev=1890960=rev 


Regards,
Graham
—



Re: svn commit: r1890947 - in /httpd/httpd/branches/2.4.x: ./ CHANGES STATUS include/ap_mmn.h modules/proxy/mod_proxy.h modules/proxy/mod_proxy_ajp.c modules/proxy/mod_proxy_balancer.c modules/proxy/m

2021-06-22 Thread Ruediger Pluem



On 6/21/21 7:03 PM, minf...@apache.org wrote:
> Author: minfrin
> Date: Mon Jun 21 17:03:35 2021
> New Revision: 1890947
> 
> URL: http://svn.apache.org/viewvc?rev=1890947=rev
> Log:
> *) back port: Add CPING to health check logic.
>Trunk version of patch:
> https://svn.apache.org/r1887415
>Backport version for 2.4.x of patch:
>   Trunk version of patch works
>   svn merge -c 1887415 ^/httpd/httpd/trunk .
>+1: jfclere, jim, minfrin
> 
> 
> Modified:
> httpd/httpd/branches/2.4.x/   (props changed)
> httpd/httpd/branches/2.4.x/CHANGES
> httpd/httpd/branches/2.4.x/STATUS
> httpd/httpd/branches/2.4.x/include/ap_mmn.h
> httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy.h
> httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_ajp.c
> httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_balancer.c
> httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_hcheck.c
> 
> Propchange: httpd/httpd/branches/2.4.x/
> --
>   Merged /httpd/httpd/trunk:r1887415
> 

> 
> Modified: httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_hcheck.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_hcheck.c?rev=1890947=1890946=1890947=diff
> ==
> --- httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_hcheck.c (original)
> +++ httpd/httpd/branches/2.4.x/modules/proxy/mod_proxy_hcheck.c Mon Jun 21 
> 17:03:35 2021

> @@ -613,6 +615,39 @@ static int hc_get_backend(const char *pr
>  return hc_determine_connection(ctx, hc, &(*backend)->addr, ptemp);
>  }
>  
> +static apr_status_t hc_check_cping(baton_t *baton)
> +{
> +int status;
> +sctx_t *ctx = baton->ctx;
> +proxy_worker *hc = baton->hc;
> +proxy_conn_rec *backend = NULL;
> +apr_pool_t *ptemp = baton->ptemp;
> +request_rec *r;
> +apr_interval_time_t timeout;
> +
> +if (!ajp_handle_cping_cpong) {
> +return APR_ENOTIMPL;
> +}
> +
> +ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, baton->ctx->s, "HCCPING 
> starting");
> +if ((status = hc_get_backend("HCCPING", , hc, ctx, 
> baton->ptemp)) != OK) {
> +return backend_cleanup("HCCPING", backend, ctx->s, status);
> +}
> +if ((status = ap_proxy_connect_backend("HCCPING", backend, hc, ctx->s)) 
> != OK) {
> +return backend_cleanup("HCCPING", backend, ctx->s, status);
> +}
> +r = create_request_rec(ptemp, ctx->s, baton->balancer, "CPING");
> +if ((status = ap_proxy_connection_create_ex("HCCPING", backend, r)) != 
> OK) {
> +return backend_cleanup("HCCPING", backend, ctx->s, status);
> +}
> +set_request_connection(r, backend->connection);
> +
> +timeout = apr_time_from_sec(10); /* 10 seconds */

Sorry for jumping on this late, but as I already mentioned on the original 
trunk revision a hard coded timeout is bad.
Please also backport r1887439. For the record I am +1 on backporting r1887439.

Regards

Rüdiger