Skip to content

Commit

Permalink
Reverted termination grace period to 30s (#207)
Browse files Browse the repository at this point in the history
Signed-off-by: anisha.kj <[email protected]>
  • Loading branch information
anishakj authored Jun 17, 2020
1 parent 1f62ede commit 0544641
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docker/bin/zookeeperTeardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LOG4J_CONF=/conf/log4j-quiet.properties
# Wait for client connections to drain. Kubernetes will wait until the confiugred
# "terminationGracePeriodSeconds" before focibly killing the container
CONN_COUNT=`echo cons | nc localhost 2181 | grep -v "^$" |grep -v "/127.0.0.1:" | wc -l`
for (( i = 0; i < 36; i++ )); do
for (( i = 0; i < 6; i++ )); do
if [[ "$CONN_COUNT" -gt 0 ]]; then
echo "$CONN_COUNT non-local connections still connected."
sleep 5
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/zookeeper/v1beta1/deepcopy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ var _ = Describe("ZookeeperCluster DeepCopy", func() {
It("value of str7 should be 2000", func() {
Ω(str7).To(Equal("2000"))
})
It("value of str8 should be 180", func() {
Ω(str8).To(Equal("180"))
It("value of str8 should be 30", func() {
Ω(str8).To(Equal("30"))
})
It("value of str9 should be 180", func() {
Ω(str9).To(Equal("180"))
It("value of str9 should be 30", func() {
Ω(str9).To(Equal("30"))
})
It("value of str10 should be zk-2", func() {
Ω(str10).To(Equal("zk-2"))
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/zookeeper/v1beta1/zookeepercluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
// DefaultTerminationGracePeriod is the default time given before the
// container is stopped. This gives clients time to disconnect from a
// specific node gracefully.
DefaultTerminationGracePeriod = 180
DefaultTerminationGracePeriod = 30

// DefaultZookeeperCacheVolumeSize is the default volume size for the
// Zookeeper cache volume
Expand Down Expand Up @@ -285,7 +285,7 @@ type PodPolicy struct {

// TerminationGracePeriodSeconds is the amount of time that kubernetes will
// give for a pod instance to shutdown normally.
// The default value is 180.
// The default value is 30.
TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds"`
}

Expand Down

0 comments on commit 0544641

Please sign in to comment.