Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file.
- Add `/ready` endpoint to the operator Deployment, which reports the CRD installation status ([#770]).
- Document that the Stackable Hive images restore the `get_table` and `get_table_objects_by_name` Thrift methods removed by HIVE-26537, and assert it in the smoke test ([#766]).
- Add support for Hive `4.2.1` ([#766], [#782]).
- The logs of the `containerdebug` process are now collected by the Vector agent and forwarded to
the Vector aggregator ([#790]).
- The metastore now has a default affinity to the OPA Pods when OPA authorization is configured ([#772]).

### Removed
Expand Down Expand Up @@ -53,6 +55,12 @@ All notable changes to this project will be documented in this file.
- The operator now watches all resources that it creates and early-exits the reconcile action when the
cluster is marked for deletion ([#754]).
- The operator now watches the `S3Connection` referenced by `spec.clusterConfig.s3.reference` ([#765]).
- The `containerdebug` process writes its log file again. The operator set
`CONTAINERDEBUG_LOG_DIRECTORY`, which containerdebug stopped reading in its version 0.2.0 when it
moved to `stackable-telemetry`; the directory is now set via `FILE_LOG_DIRECTORY`. The file is
rotated hourly and at most two files are kept, because rotation is opt-in ([#790]).
- The Vector unit tests run again. [#780] added a `test-config.yaml` argument to `test-vector.sh`
without adding the file, so since then the test run aborted before executing any case ([#790]).

[#726]: https://github.com/stackabletech/hive-operator/pull/726
[#731]: https://github.com/stackabletech/hive-operator/pull/731
Expand All @@ -77,6 +85,7 @@ All notable changes to this project will be documented in this file.
[#782]: https://github.com/stackabletech/hive-operator/pull/782
[#785]: https://github.com/stackabletech/hive-operator/pull/785
[#787]: https://github.com/stackabletech/hive-operator/pull/787
[#790]: https://github.com/stackabletech/hive-operator/pull/790

## [26.7.0] - 2026-07-21

Expand Down
8 changes: 8 additions & 0 deletions docs/modules/hive/pages/usage-guide/logging.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@ spec:
enableVectorAgent: true
----

NOTE: The logs of the xref:concepts:observability/containerdebug.adoc[`containerdebug` process] are collected as well.
They are labelled `container: containerdebug`, although no such Kubernetes container exists.
The process runs in the background of the `hive` container.
The label comes from `/stackable/log/containerdebug`, the directory which the operator sets with the `FILE_LOG_DIRECTORY` environment variable and from which the Vector agent derives the container name.
Overriding `FILE_LOG_DIRECTORY` with `envOverrides` therefore changes how these logs are aggregated.
The agent only collects files one level below `/stackable/log`, so a sibling directory such as `/stackable/log/hive` relabels the events instead of dropping them, while any deeper or shallower path stops the aggregation.
A path outside `/stackable/log` also leaves the size-capped log volume.

Further information on how to configure logging, can be found in xref:concepts:logging.adoc[].
2 changes: 1 addition & 1 deletion rust/operator-binary/src/controller/build/jvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ fn construct_jvm_args(cluster: &ValidatedCluster, rg: &HiveRoleGroupConfig) -> V
),
format!("-Djavax.net.ssl.trustStore={STACKABLE_TRUST_STORE}"),
format!("-Djavax.net.ssl.trustStorePassword={STACKABLE_TRUST_STORE_PASSWORD}"),
format!("-Djavax.net.ssl.trustStoreType=pkcs12"),
"-Djavax.net.ssl.trustStoreType=pkcs12".to_owned(),
];

if cluster.has_kerberos_enabled() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ export VECTOR_DANGEROUSLY_ALLOW_ENV_VAR_INTERPOLATION=true

vector validate --no-environment vector.yaml

vector test test-config.yaml vector.yaml vector-test.yaml
vector test vector.yaml vector-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,285 @@ tests:
"timestamp": t'2025-10-02T09:27:28.582Z'
}

assert_eq!(expected_log_event, .)
- name: Test tracing-rs log
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: '{"timestamp":"2026-11-02T14:49:28.028922Z","level":"INFO","fields":{"message":"found disk","disk.name":"overlay"},"target":"containerdebug::system_information::disk"}'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "containerdebug::system_information::disk",
"message": "found disk\n\ndisk.name=overlay",
"timestamp": t'2026-11-02T14:49:28.028922Z',
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)
- name: Test unparsable tracing-rs log
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: '{ unparsable'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"errors": [
.errors[0]
],
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "",
"message": "{ unparsable",
"timestamp": .timestamp,
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)

# The remainder of the message contains character offsets into
# the VRL source, so only the stable prefix is asserted.
assert!(starts_with!(.errors[0], "JSON not parsable: "))
- name: Test tracing-rs log which is not a JSON object
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: 'false'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"errors": [
"Parsed event is not a JSON object."
],
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "",
"message": "false",
"timestamp": .timestamp,
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)
- name: Test tracing-rs log with invalid fields
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: '{"timestamp":"unparsable","level":"INVALID","fields":"none","target":null}'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"errors": [
.errors[0],
"Logger/target not found.",
"Level \"INVALID\" unknown, using \"INFO\" instead.",
"Fields are not an object."
],
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "",
"message": "{\"timestamp\":\"unparsable\",\"level\":\"INVALID\",\"fields\":\"none\",\"target\":null}",
"timestamp": .timestamp,
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)

# The remainder of the message contains character offsets into
# the VRL source, so only the stable prefix is asserted.
assert!(starts_with!(.errors[0], "Timestamp not parsable, using current time instead: "))
- name: Test tracing-rs log without a timestamp
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: '{"level":"INFO","fields":{"message":"found disk"},"target":"containerdebug::system_information::disk"}'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"errors": [
"Timestamp not found, using current time instead."
],
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "containerdebug::system_information::disk",
"message": "found disk",
"timestamp": .timestamp,
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)

# The current time is used and not the timestamp which the file
# source attached to the event. The latter reaches the transform
# as a string, whereas now() yields a timestamp.
assert!(is_timestamp(.timestamp))
- name: Test tracing-rs log without a message but with other fields
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: '{"timestamp":"2026-11-02T14:49:28.028922Z","level":"INFO","fields":{"disk.name":"overlay"},"target":"containerdebug::system_information::disk"}'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "containerdebug::system_information::disk",
"message": "disk.name=overlay",
"timestamp": t'2026-11-02T14:49:28.028922Z',
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)
- name: Test tracing-rs log with a message which is not a string
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: '{"timestamp":"2026-11-02T14:49:28.028922Z","level":"INFO","fields":{"message":42,"disk.name":"overlay"},"target":"containerdebug::system_information::disk"}'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "containerdebug::system_information::disk",
"message": "disk.name=overlay\nmessage=42",
"timestamp": t'2026-11-02T14:49:28.028922Z',
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)
- name: Test tracing-rs log without any fields
inputs:
- type: log
insert_at: processed_files_tracing_rs
log_fields:
file: /stackable/log/containerdebug/containerdebug.2026-11-02-14.tracing-rs.json
message: '{"timestamp":"2026-11-02T14:49:28.028922Z","level":"INFO","fields":{},"target":"containerdebug::system_information::disk"}'
pod: hive-metastore-default-0
source_type: file
timestamp: 2026-11-02T14:49:29.473487331Z
outputs:
- extract_from: extended_logs
expected_event_count: 1
conditions:
- type: vrl
source: |
expected_log_event = {
"cluster": "hive",
"container": "containerdebug",
"errors": [
"Message not found."
],
"file": "containerdebug.2026-11-02-14.tracing-rs.json",
"level": "INFO",
"logger": "containerdebug::system_information::disk",
"message": "",
"timestamp": t'2026-11-02T14:49:28.028922Z',
"namespace": "default",
"pod": "hive-metastore-default-0",
"role": "metastore",
"roleGroup": "default"
}

assert_eq!(expected_log_event, .)
- name: Test Vector internal logs
inputs:
Expand Down
Loading
Loading