mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Merge pull request #36910 from janetkuo/restart-cluster-statefulset
Automatic merge from submit-queue Enable restart statefulset clusters in e2e tests cc @bprashanth @erictune @foxish @kow3ns @kubernetes/sig-apps
This commit is contained in:
commit
08213afe2f
@ -55,9 +55,8 @@ const (
|
||||
mysqlGaleraManifestPath = "test/e2e/testing-manifests/petset/mysql-galera"
|
||||
redisManifestPath = "test/e2e/testing-manifests/petset/redis"
|
||||
cockroachDBManifestPath = "test/e2e/testing-manifests/petset/cockroachdb"
|
||||
// Should the test restart statefulset clusters?
|
||||
// TODO: enable when we've productionzed bringup of pets in this e2e.
|
||||
restartCluster = false
|
||||
// We don't restart MySQL cluster regardless of restartCluster, since MySQL doesn't handle restart well
|
||||
restartCluster = true
|
||||
|
||||
// Timeout for reads from databases running on pets.
|
||||
readTimeout = 60 * time.Second
|
||||
@ -408,10 +407,15 @@ func (c *clusterAppTester) run() {
|
||||
By("Creating foo:bar in member with index 0")
|
||||
c.pet.write(0, map[string]string{"foo": "bar"})
|
||||
|
||||
if restartCluster {
|
||||
By("Restarting stateful set " + ps.Name)
|
||||
c.tester.restart(ps)
|
||||
c.tester.waitForRunning(ps.Spec.Replicas, ps)
|
||||
switch c.pet.(type) {
|
||||
case *mysqlGaleraTester:
|
||||
// Don't restart MySQL cluster since it doesn't handle restarts well
|
||||
default:
|
||||
if restartCluster {
|
||||
By("Restarting stateful set " + ps.Name)
|
||||
c.tester.restart(ps)
|
||||
c.tester.waitForRunning(ps.Spec.Replicas, ps)
|
||||
}
|
||||
}
|
||||
|
||||
By("Reading value under foo from member with index 2")
|
||||
|
@ -57,7 +57,6 @@ spec:
|
||||
}
|
||||
]'
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: mysql
|
||||
image: gcr.io/google_containers/mysql-galera:e2e
|
||||
|
@ -57,7 +57,6 @@ spec:
|
||||
}
|
||||
]'
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: redis
|
||||
image: debian:jessie
|
||||
|
@ -61,7 +61,6 @@ spec:
|
||||
}
|
||||
]'
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 0
|
||||
containers:
|
||||
- name: zk
|
||||
image: java:openjdk-8-jre
|
||||
|
Loading…
Reference in New Issue
Block a user