Skip to content

Commit abcb231

Browse files
committed
feat: run containerdebug in the background
1 parent 251090d commit abcb231

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- The lifetime of auto generated TLS certificates is now configurable with the role and roleGroup
88
config property `requestedSecretLifetime`. This helps reducing frequent Pod restarts ([#598]).
9+
- Run a `containerdebug` process in the background of each HBase container to collect debugging information ([#605]).
910

1011
### Fixed
1112

@@ -15,6 +16,7 @@
1516

1617
[#594]: https://github.com/stackabletech/hbase-operator/pull/594
1718
[#598]: https://github.com/stackabletech/hbase-operator/pull/598
19+
[#605]: https://github.com/stackabletech/hbase-operator/pull/605
1820

1921
## [24.11.0] - 2024-11-18
2022

rust/operator-binary/src/hbase_controller.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,7 @@ fn build_rolegroup_statefulset(
881881
{COMMON_BASH_TRAP_FUNCTIONS}
882882
{remove_vector_shutdown_file_command}
883883
prepare_signal_handlers
884+
CONTAINERDEBUG_LOG_DIRECTORY={STACKABLE_LOG_DIR}/containerdebug containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &
884885
bin/hbase {hbase_role_name_in_command} start &
885886
wait_for_termination $!
886887
{create_vector_shutdown_file_command}

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,12 @@ status:
6767
expectedPods: 2
6868
currentHealthy: 2
6969
disruptionsAllowed: 1
70+
---
71+
# This test checks if the containerdebug-state.json file is present and valid
72+
apiVersion: kuttl.dev/v1beta1
73+
kind: TestAssert
74+
timeout: 60
75+
commands:
76+
- script: kubectl exec -n $NAMESPACE --container hbase test-hbase-master-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status
77+
- script: kubectl exec -n $NAMESPACE --container hbase test-hbase-regionserver-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status
78+
- script: kubectl exec -n $NAMESPACE --container hbase test-hbase-restserver-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status

0 commit comments

Comments
 (0)