Skip to content

Commit

Permalink
feat: run containerdebug in the background
Browse files Browse the repository at this point in the history
  • Loading branch information
razvan committed Dec 9, 2024
1 parent 251090d commit abcb231
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

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

### Fixed

Expand All @@ -15,6 +16,7 @@

[#594]: https://github.com/stackabletech/hbase-operator/pull/594
[#598]: https://github.com/stackabletech/hbase-operator/pull/598
[#605]: https://github.com/stackabletech/hbase-operator/pull/605

## [24.11.0] - 2024-11-18

Expand Down
1 change: 1 addition & 0 deletions rust/operator-binary/src/hbase_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ fn build_rolegroup_statefulset(
{COMMON_BASH_TRAP_FUNCTIONS}
{remove_vector_shutdown_file_command}
prepare_signal_handlers
CONTAINERDEBUG_LOG_DIRECTORY={STACKABLE_LOG_DIR}/containerdebug containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &
bin/hbase {hbase_role_name_in_command} start &
wait_for_termination $!
{create_vector_shutdown_file_command}
Expand Down
9 changes: 9 additions & 0 deletions tests/templates/kuttl/smoke/30-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,12 @@ status:
expectedPods: 2
currentHealthy: 2
disruptionsAllowed: 1
---
# This test checks if the containerdebug-state.json file is present and valid
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
timeout: 60
commands:
- script: kubectl exec -n $NAMESPACE --container hbase test-hbase-master-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status
- script: kubectl exec -n $NAMESPACE --container hbase test-hbase-regionserver-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status
- script: kubectl exec -n $NAMESPACE --container hbase test-hbase-restserver-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status

0 comments on commit abcb231

Please sign in to comment.