]
Michal Karm Babacek closed MODCLUSTER-608.
------------------------------------------
Resolution: Done
Should work with httpd 2.4.29+. Reopen if you need it fixed for an older httpd, please.
failonstatus parameter ignored
------------------------------
Key: MODCLUSTER-608
URL:
https://issues.jboss.org/browse/MODCLUSTER-608
Project: mod_cluster
Issue Type: Bug
Components: Native (httpd modules)
Affects Versions: 1.3.5.Final
Reporter: Bogdan Sikora
Assignee: Michal Karm Babacek
Priority: Major
Setting failonstatus to a specific code should result in the error state of the worker
that returned the code.
*Example:*
Httpd mod_cluster balancer with 2 tomcat workers that have deployed clusterbench app
{noformat}
ProxyPass / balancer://balancerxxx stickysession=JSESSIONID|jsessionid nofailover=on
failonstatus=201
ProxyPassReverse / balancer://balancerxxx
ProxyPreserveHost on
{noformat}
{noformat}
Checking for
http://192.168.122.206:2080/clusterbench/jvmroute response code: was 200,
expected [200, 201, 202, 203]
{noformat}
Let's send special request that returns 201(failonstatus code)
{noformat}
Checking for
http://192.168.122.206:2080/clusterbench/httpcode/?http_code=201 response
code: was 201, expected 201
{noformat}
This should result in worker in error state
{noformat}
<h1> Node tomcat-7-1 (ajp://192.168.122.206:8009): </h1>
...Status: NOTOK,Elected: 13,Read: 245,Transferred: 0,Connected: 0,Load: 100...
><h1> Node tomcat-7-2 (ajp://192.168.122.206:8110): </h1>
...Status: OK,Elected: 1,Read: 10,Transferred: 0,Connected: 0,Load: 100...
{noformat}
as in example. This example is made with 2.4.6 httpd.
Debug log
{noformat}
[Wed Jul 26 09:13:12.646541 2017] [:error] [pid 22223] [client 192.168.122.206:41482]
balancer://balancerxxx: Forcing worker (ajp://192.168.122.206:8009) into error state due
to status code 201 matching 'failonstatus' balancer parameter
{noformat}
*Issue:*
2.4.23+ Httpd ignores failonstatus parameter.
Return of 201 as in example trigger no error state.
There is no mention in the log and workers on the console are in OK state.