Skip to content

Commit 4025aa7

Browse files
committed
fix containerdebug log dir
1 parent e006ea4 commit 4025aa7

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

rust/crd/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ impl SparkApplication {
675675
submit_cmd.extend(self.spec.args.clone());
676676

677677
Ok(vec![
678-
format!("CONTAINERDEBUG_LOG_DIRECTORY={VOLUME_MOUNT_PATH_LOG}/containerdebug containerdebug --output={VOLUME_MOUNT_PATH_LOG}/containerdebug-state.json --loop &"),
678+
format!("containerdebug --output={VOLUME_MOUNT_PATH_LOG}/containerdebug/containerdebug-state.json --loop &"),
679679
submit_cmd.join(" "),
680680
])
681681
}

rust/operator-binary/src/history/history_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ fn command_args(logdir: &ResolvedLogDir) -> Vec<String> {
757757
}
758758

759759
command.extend(vec![
760-
format!("CONTAINERDEBUG_LOG_DIRECTORY={VOLUME_MOUNT_PATH_LOG}/containerdebug containerdebug --output={VOLUME_MOUNT_PATH_LOG}/containerdebug-state.json --loop &"),
760+
format!("containerdebug --output={VOLUME_MOUNT_PATH_LOG}/containerdebug/containerdebug-state.json --loop &"),
761761
format!("/stackable/spark/sbin/start-history-server.sh --properties-file {VOLUME_MOUNT_PATH_CONFIG}/{SPARK_DEFAULTS_FILE_NAME}"),
762762
]);
763763
vec![command.join("\n")]

rust/operator-binary/src/spark_k8s_controller.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ fn pod_template(
614614

615615
cb.add_env_var(
616616
"_STACKABLE_PRE_HOOK",
617-
format!("CONTAINERDEBUG_LOG_DIRECTORY={VOLUME_MOUNT_PATH_LOG}/containerdebug containerdebug --output={VOLUME_MOUNT_PATH_LOG}/containerdebug-state.json --loop &"),
617+
format!("containerdebug --output={VOLUME_MOUNT_PATH_LOG}/containerdebug/containerdebug-state.json --loop &"),
618618
);
619619

620620
if config.logging.enable_vector_agent {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ apiVersion: kuttl.dev/v1beta1
1515
kind: TestAssert
1616
timeout: 60
1717
commands:
18-
- script: kubectl exec -n $NAMESPACE --container spark-history spark-history-node-default-0 -- cat /stackable/log/containerdebug-state.json | jq --exit-status
18+
- script: kubectl exec -n $NAMESPACE --container spark-history spark-history-node-default-0 -- cat /stackable/log/containerdebug/containerdebug-state.json | jq --exit-status

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#
44
# It needs to run as soon as the spark application has been submitted because
55
# once it is completed the pods are terminated.
6+
#
67
# Unfortunately it's impossible to test the driver and the executor pods in a
78
# reliable way.
89
#
@@ -11,10 +12,4 @@ kind: TestAssert
1112
commands:
1213
- script: |
1314
SPARK_SUBMIT_POD=$(kubectl get -n $NAMESPACE pods --field-selector=status.phase=Running --selector batch.kubernetes.io/job-name=spark-pi-s3-1 -o jsonpath='{.items[0].metadata.name}')
14-
kubectl exec -n $NAMESPACE --container spark-submit $SPARK_SUBMIT_POD -- cat /stackable/log/containerdebug-state.json | jq --exit-status
15-
#- script: |
16-
# SPARK_DRIVER_POD=$(kubectl get -n $NAMESPACE pod --field-selector=status.phase=Running --selector=spark-role=driver,spark-app-name=spark-pi -o jsonpath='{.items[0].metadata.name}')
17-
# kubectl exec -n $NAMESPACE --container spark-submit $SPARK_DRIVER_POD -- cat /stackable/log/containerdebug-state.json | jq --exit-status
18-
#- script: |
19-
# SPARK_EXECUTOR_POD=$(kubectl get -n $NAMESPACE pods --field-selector=status.phase=Running --selector spark-role=executor,spark-app-name=spark-pi -o jsonpath='{.items[0].metadata.name}')
20-
# kubectl exec -n $NAMESPACE --container spark-submit $SPARK_EXECUTOR_POD -- cat /stackable/log/containerdebug-state.json | jq --exit-status
15+
kubectl exec -n $NAMESPACE --container spark-submit $SPARK_SUBMIT_POD -- cat /stackable/log/containerdebug/containerdebug-state.json | jq --exit-status

0 commit comments

Comments
 (0)