Skip to content

Commit

Permalink
mysqlcluster: sysbench press the database, Pod is recreated by k8s #305
Browse files Browse the repository at this point in the history
  • Loading branch information
acekingke committed Nov 29, 2021
1 parent 0a48820 commit 7a24589
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions mysqlcluster/container/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ func (c *mysql) getLivenessProbe() *corev1.Probe {
return &corev1.Probe{
Handler: corev1.Handler{
Exec: &corev1.ExecAction{
Command: []string{
"sh",
"-c",
fmt.Sprintf("mysqladmin --defaults-file=%s ping", utils.ConfClientPath),
},
Command: []string{"pgrep", "mysqld"},
},
},
InitialDelaySeconds: 30,
Expand Down
2 changes: 1 addition & 1 deletion mysqlcluster/container/mysql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func TestGetMysqlLivenessProbe(t *testing.T) {
livenessProbe := &corev1.Probe{
Handler: corev1.Handler{
Exec: &corev1.ExecAction{
Command: []string{"sh", "-c", "mysqladmin --defaults-file=/etc/mysql/client.conf ping"},
Command: []string{"pgrep", "mysqld"},
},
},
InitialDelaySeconds: 30,
Expand Down

0 comments on commit 7a24589

Please sign in to comment.