chore(kuttl): add test for failing spark job - #735
Conversation
razvan
left a comment
There was a problem hiding this comment.
A nit from Claude which I like is that the test should be more appropriately called signal-propagation, but I'll leave it up to you to change it or not.
| selector="spark-role=executor,app.kubernetes.io/instance=graceful-shutdown" | ||
| # A signalled container is gone in 1-2s, an unsignalled one at the grace period (30s). | ||
| budget_seconds=20 |
There was a problem hiding this comment.
Comment from Claude which I believe is true. The weekly Jenkins tests set VECTOR_AGGREGATOR='vector-aggregator.default.svc.cluster.local:6000' which enables Vector log collection so budget_seconds might not be enough.
budget_seconds=20 is not safe when Vector is enabled (graceful-shutdown/11-check-executor-shutdown.yaml). The test waits for containerStatuses[spark].state.terminated — container exit, not JVM exit. When enableVectorAgent is true the operator injects _STACKABLE_POST_HOOK = sleep 10; (build/pod.rs:241-251). So the real budget is ~10s + JVM shutdown against a 20s limit and a 30s grace period — very little headroom, and the inline claim "A signalled container is gone in 1-2s" is wrong in exactly the configuration nightly runs in. You can't raise the budget much, since it must stay under the grace period.
Better: key the wait off the log, which you're already streaming — wait for Shutdown hook called (or Driver commanded a shutdown) to appear. That is the direct signal, subsumes the separate shutdown-hook grep, and is immune to the post hook entirely. Worth confirming whether #1595's new trap handling runs the post hook on SIGTERM at all — the whole timing budget hinges on it.
Description
Adds two kuttl integration test suites: failure-propagation, which verifies that a Spark application failing at runtime is reported with phase Failed and its driver Pod cleaned up, and graceful-shutdown, which verifies that SIGTERM reaches the executor and driver JVMs so that shutdown hooks run and the driver asks its executors to stop.
Tests for stackabletech/docker-images#1595
Definition of Done Checklist
Author
Reviewer
Acceptance
type/deprecationlabel & add to the deprecation scheduletype/experimentallabel & add to the experimental features tracker