[
https://issues.jboss.org/browse/ISPN-6679?page=com.atlassian.jira.plugin....
]
Sebastian Łaskawiec edited comment on ISPN-6679 at 7/27/16 5:42 AM:
--------------------------------------------------------------------
As a work around we can use a simple, CLI command for checking if the cluster is ready:
{code}
/opt/jboss/infinispan-server/bin/ispn-cli.sh -c --controller=$(hostname -i):9990
'/subsystem=datagrid-infinispan/cache-container=clustered/distributed-cache=*:read-attribute(name=cache-rebalancing-status)'
| awk '/result/{gsub("\"", "", $3); print $3}' | awk
'{if(NR>1)print}' | grep -v 'PENDING\|IN_PROGRESS\|SUSPENDED'
Returns non 0 if rebalaning is in progress
{code}
And there is also a work around for a liveness check:
{code}
/opt/jboss/infinispan-server/bin/ispn-cli.sh -c --controller=$(hostname -i):9990
'/:read-attribute(name=server-state)' | awk
'/result/{gsub("\"", "", $3); print $3}' | grep running
returns 0 if is *not* running!
{code}
was (Author: sebastian.laskawiec):
As a work around we can use a simple, CLI command for checking if the cluster is ready:
{code}
./ispn-cli.sh -c
'/subsystem=datagrid-infinispan/cache-container=clustered/distributed-cache=*:read-attribute(name=cache-rebalancing-status)'
| grep 'PENDING\|IN_PROGRESS\|SUSPENDED'
returns 0 if is *not* ready!
{code}
And there is also a work around for a liveness check:
{code}
./ispn-cli.sh -c '/:read-attribute(name=server-state)' | awk
'/result/{gsub("\"", "", $3); print $3}' | grep -v
running
returns 0 if is *not* running!
{code}
Implement REST readiness and healthcheck probe in Kubernetes
------------------------------------------------------------
Key: ISPN-6679
URL:
https://issues.jboss.org/browse/ISPN-6679
Project: Infinispan
Issue Type: Feature Request
Components: Cloud Integrations
Reporter: Sebastian Łaskawiec
Assignee: Sebastian Łaskawiec
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)