[infinispan-issues] [JBoss JIRA] (ISPN-6679) Implement REST readiness and healthcheck probe in Kubernetes
Sebastian Łaskawiec (JIRA)
issues at jboss.org
Wed Jul 27 05:44:00 EDT 2016
[ https://issues.jboss.org/browse/ISPN-6679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13270460#comment-13270460 ]
Sebastian Łaskawiec edited comment on ISPN-6679 at 7/27/16 5:43 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 non 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}
/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}
> 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)
More information about the infinispan-issues
mailing list