Skip to content

Commit

Permalink
feat: fix healthy conditions of storaged
Browse files Browse the repository at this point in the history
fix: #116
  • Loading branch information
wey-gu committed Apr 26, 2023
1 parent 0d47bbd commit c9845ba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ services:
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-sf", "http://storaged0:19779/status"]
interval: 30s
test: "cat /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ret = 0;n = length(str);for (i = 1; i <= n; i++) {c = tolower(substr(str, i, 1));k = index(\"123456789abcdef\", c);ret = ret * 16 + k;}return ret;}function getIP(str,ret){ret=hextodec(substr(str,index(str,\":\")-2,2));for (i=5; i>0; i-=2) {ret = ret\".\"hextodec(substr(str,i,2));}ret = ret\":\"hextodec(substr(str,index(str,\":\")+1,4));return ret;} NR > 1 {{if(NR==2)print \"Local Listening\";local=getIP(\$2);remote=getIP(\$3)}{print local}}' | grep '0.0.0.0:9779'"
interval: 1m
timeout: 10s
retries: 3
start_period: 20s
Expand Down Expand Up @@ -160,8 +160,8 @@ services:
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-sf", "http://storaged1:19779/status"]
interval: 30s
test: "cat /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ret = 0;n = length(str);for (i = 1; i <= n; i++) {c = tolower(substr(str, i, 1));k = index(\"123456789abcdef\", c);ret = ret * 16 + k;}return ret;}function getIP(str,ret){ret=hextodec(substr(str,index(str,\":\")-2,2));for (i=5; i>0; i-=2) {ret = ret\".\"hextodec(substr(str,i,2));}ret = ret\":\"hextodec(substr(str,index(str,\":\")+1,4));return ret;} NR > 1 {{if(NR==2)print \"Local Listening\";local=getIP(\$2);remote=getIP(\$3)}{print local}}' | grep '0.0.0.0:9779'"
interval: 1m
timeout: 10s
retries: 3
start_period: 20s
Expand Down Expand Up @@ -198,8 +198,8 @@ services:
- metad1
- metad2
healthcheck:
test: ["CMD", "curl", "-sf", "http://storaged2:19779/status"]
interval: 30s
test: "cat /proc/net/tcp | awk 'function hextodec(str,ret,n,i,k,c){ret = 0;n = length(str);for (i = 1; i <= n; i++) {c = tolower(substr(str, i, 1));k = index(\"123456789abcdef\", c);ret = ret * 16 + k;}return ret;}function getIP(str,ret){ret=hextodec(substr(str,index(str,\":\")-2,2));for (i=5; i>0; i-=2) {ret = ret\".\"hextodec(substr(str,i,2));}ret = ret\":\"hextodec(substr(str,index(str,\":\")+1,4));return ret;} NR > 1 {{if(NR==2)print \"Local Listening\";local=getIP(\$2);remote=getIP(\$3)}{print local}}' | grep '0.0.0.0:9779'"
interval: 1m
timeout: 10s
retries: 3
start_period: 20s
Expand Down

0 comments on commit c9845ba

Please sign in to comment.