Skip to content

Commit 0e9e37e

Browse files
committed
update shutdown test and run it successfuly
1 parent f42ab05 commit 0e9e37e

File tree

6 files changed

+21
-6
lines changed

6 files changed

+21
-6
lines changed

tests/templates/kuttl/shutdown/10-install-zookeeper.yaml.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ spec:
1414
{% endif %}
1515
servers:
1616
config:
17+
gracefulShutdownTimeout: 1m
1718
logging:
1819
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
1920
roleGroups:

tests/templates/kuttl/shutdown/20-install-hdfs.yaml.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ spec:
1414
{% endif %}
1515
nameNodes:
1616
config:
17+
gracefulShutdownTimeout: 1m
1718
listenerClass: "cluster-internal"
1819
logging:
1920
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
@@ -22,6 +23,7 @@ spec:
2223
replicas: 2
2324
dataNodes:
2425
config:
26+
gracefulShutdownTimeout: 1m
2527
listenerClass: "cluster-internal"
2628
logging:
2729
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
@@ -30,6 +32,7 @@ spec:
3032
replicas: 1
3133
journalNodes:
3234
config:
35+
gracefulShutdownTimeout: 1m
3336
logging:
3437
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
3538
roleGroups:

tests/templates/kuttl/shutdown/30-assert.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ metadata:
1212
spec:
1313
template:
1414
spec:
15-
terminationGracePeriodSeconds: 1200
15+
terminationGracePeriodSeconds: 60
1616
status:
1717
readyReplicas: 2
1818
replicas: 2
@@ -24,7 +24,7 @@ metadata:
2424
spec:
2525
template:
2626
spec:
27-
terminationGracePeriodSeconds: 3600
27+
terminationGracePeriodSeconds: 120
2828
status:
2929
readyReplicas: 2
3030
replicas: 2
@@ -36,7 +36,7 @@ metadata:
3636
spec:
3737
template:
3838
spec:
39-
terminationGracePeriodSeconds: 300
39+
terminationGracePeriodSeconds: 60
4040
status:
4141
readyReplicas: 2
4242
replicas: 2

tests/templates/kuttl/shutdown/30-install-hbase.yaml.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ spec:
2121
{% endif %}
2222
masters:
2323
config:
24+
gracefulShutdownTimeout: 1m
2425
logging:
2526
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
2627
roleGroups:
@@ -32,6 +33,7 @@ spec:
3233
replicas: 2
3334
regionServers:
3435
config:
36+
gracefulShutdownTimeout: 2m # one minute for the region mover
3537
logging:
3638
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
3739
regionMover:
@@ -47,6 +49,7 @@ spec:
4749
replicas: 2
4850
restServers:
4951
config:
52+
gracefulShutdownTimeout: 1m
5053
logging:
5154
enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }}
5255
roleGroups:

tests/templates/kuttl/shutdown/50-assert.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
---
2+
# This test works as follows:
3+
# - given
4+
# - an HBase cluster with two region servers (0 and 1)
5+
# - create a table + column familiy with 15 regions
6+
# - where region server 0 has some regions assigned to it
7+
# - restart server 0 (the region mover is triggerred by the shutdown)
8+
# - assert that server 1 now hosts all 15 regions
29
apiVersion: kuttl.dev/v1beta1
310
kind: TestAssert
411
metadata:

tests/test-definition.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
dimensions:
33
- name: hbase
44
values:
5-
#- 2.6.0
6-
#- 2.4.18
5+
# - 2.6.0
6+
# - 2.4.18
77
# To use a custom image, add a comma and the full name after the product version
8-
- 2.6.0,razvan:hbase-2.6.0
8+
- 2.6.0,docker.stackable.tech/razvan/hbase-2.6.0
9+
- 2.4.18,docker.stackable.tech/razvan/hbase-2.4.18
910
# - 2.4.18,docker.stackable.tech/sandbox/hbase:2.4.18-stackable0.0.0-dev
1011
- name: hbase-opa
1112
values:

0 commit comments

Comments
 (0)