TQJADE commented on code in PR #909:
URL:
https://github.com/apache/spark-kubernetes-operator/pull/909#discussion_r4160577405
##########
spark-operator/src/main/java/org/apache/spark/k8s/operator/reconciler/reconcilesteps/ClusterInitStep.java:
##########
@@ -68,27 +68,30 @@ public ReconcileProgress reconcile(
return proceed();
}
SparkCluster cluster = context.getResource();
- // A cluster whose master StatefulSet already exists has been requested
before (e.g. the status
- // update to RunningHealthy failed), so let it complete its initialization
even if suspended.
+
+ boolean masterRequested = false;
if (cluster.getSpec().isSuspend()) {
- final boolean masterRequested;
+ // Unlike a first attempt, a cluster resumed from Suspended or queued
again after an eviction
+ // has persisted this Submitted state, which would keep saying that it
is resumed. It goes
+ // back to Suspended instead, where ClusterSuspendStep deletes the
master and worker
+ // StatefulSets by name and releases whatever it holds only after its
pods are gone. That
+ // happens whether or not the master was requested, so it is not looked
up.
+ if (cluster.getStatus().getStateTransitionHistory().lastKey() > 0) {
+ return appendStateAndImmediateRequeue(
+ context, statusRecorder, new ClusterState(Suspended,
CLUSTER_SUSPENDED_MESSAGE));
+ }
Review Comment:
updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]