Skip to content

Commit d18d5ca

Browse files
authored
Merge pull request #405 from runkecheng/bugfix_xenon_unhealthy
container: Add xenoncli check in the liveness probe.
2 parents 3677aab + 09e9c34 commit d18d5ca

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

mysqlcluster/container/xenon.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ func (c *xenon) getLivenessProbe() *corev1.Probe {
7676
return &corev1.Probe{
7777
Handler: corev1.Handler{
7878
Exec: &corev1.ExecAction{
79-
Command: []string{"pgrep", "xenon"},
79+
Command: []string{
80+
"sh",
81+
"-c",
82+
"pgrep xenon && xenoncli xenon ping",
83+
},
8084
},
8185
},
8286
InitialDelaySeconds: 30,

mysqlcluster/container/xenon_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,11 @@ func TestGetXenonLivenessProbe(t *testing.T) {
9696
livenessProbe := &corev1.Probe{
9797
Handler: corev1.Handler{
9898
Exec: &corev1.ExecAction{
99-
Command: []string{"pgrep", "xenon"},
99+
Command: []string{
100+
"sh",
101+
"-c",
102+
"pgrep xenon && xenoncli xenon ping",
103+
},
100104
},
101105
},
102106
InitialDelaySeconds: 30,

0 commit comments

Comments
 (0)