Hey all. I’ve recently started encountering an iss...
# troubleshooting
r
Hey all. I’ve recently started encountering an issue where subsequent deployments of a Flink Job running on the Official Operator (1.6) with both autoscaling and high-availability enabled ends up in a state that seems problematic/unrecoverable. It looks like it gets into a continual reconcilating state but never starts and eventually spits out the following message from the Job Manager:
Copy code
{
  "timestamp": "2024-05-09T00:32:23.636Z",
  "severity": "WARNING",
  "message": "Ignoring JobGraph submission 'my-job-here' (93adc4ebde39a17486133f0c3ef3f508) because the job already reached a globally-terminal state (i.e. FAILED, CANCELED, FINISHED) in a previous execution.",
  "logging.googleapis.com/sourceLocation": {
    "function": "org.apache.flink.runtime.dispatcher.Dispatcher.submitJob"
  },
  "logging.googleapis.com/insertId": "485",
  "_exception": {
    "stackTrace": ""
  },
  "_thread": "flink-pekko.actor.default-dispatcher-18",
  "_logger": "org.apache.flink.runtime.dispatcher.StandaloneDispatcher"
}
The high-availability for the job is present and stored in the appropriate location in GCS and the job itself uses the following high-availability configuration:
Copy code
high-availability: org.apache.flink.kubernetes.highavailability.KubernetesHaServicesFactory                                                                                                                                     high-availability.storageDir: gs://.../my-job-here/ha
I’ve attempted to cycle the deployments (directly in Kubernetes via a scale down/up), adjusted the restartNonce, etc. But I’m stuck with a deployment with no running task managers and job manager that doesn’t seem to do anything. Any recommendations would be extremely appreciated as this is not the first job this has occurred with and it’s starting to become a serious concern. I’m happy to provide any additional details and configuration that I can.
I see another section in the actual operator logs themselves which may be related:
Copy code
2024-05-09 00:37:52,277 o.a.f.k.o.o.d.ApplicationObserver [DEBUG][.../my-job-name] ClusterInfo: {flink-revision=a8c8b1c @ 2023-12-19T22:17:36+01:00, flink-version=1.18.1, total-cpu=2.0, total-memory=1 │
073741824}                                                                                                                                                                                                                          

2024-05-09 00:37:52,278 o.a.f.c.Configuration          [WARN ][.../my-job-name] Config uses deprecated configuration key 'high-availability' instead of proper key 'high-availability.type'              │
2024-05-09 00:37:52,278 o.a.f.k.o.u.StatusRecorder     [DEBUG][.../my-job-name] No status change.                                                                                                        

2024-05-09 00:37:52,278 o.a.f.k.o.r.d.AbstractFlinkResourceReconciler [DEBUG][.../my-job-name] Applying autoscaler parallelism overrides: {d49e9b7f00b05cb00a01c51c5d7f79e1=1, a20e853a486b5763e131e118c 73c68a0=1, fd0abd98de49fa3355b8188bcc660c4f=1, 2a1e9d4092202c302bd3f7650c97c13c=1, 1a4d1133f786d8eeb97f0dd952729182=1, 5502c4bc746c508abfc6102df8861644=1, e51028ebe8e2f0985c337047ea7e74e2=1, acde9c45c71a6ce5dcbc9698e36d37b8=1, 1ad2930efd9e5999d8516b78938aa0c6=1, 8423c94737d0e0db49aa6dbc6e8ac97c=1, b4a84b2af311d5ba37661f52e3db3e54=1, 4ddeb6c1ff33cf6393e864c028d46686=1, 5bfdc5506b012401b162c591dfddfbfe=1, 58c84ce0c1f402b960ee935e00887996=1, 08dc86eebb8 
bf2119f1dc0ab04ca9071=1, 830579541ca2574e3ac8d4cdaadbf217=1, 1b5610e7f3020f22a752f931bfdfb831=1, bdd5d1a39b7ad7aaea5da20da8eadbe6=1, 0863bc46f5e47a88999f827c903d5b28=1}                                                            

2024-05-09 00:37:52,284 o.a.f.k.o.r.d.AbstractJobReconciler [INFO ][.../my-job-name] Upgrading/Restarting running job, suspending first...                                                               

2024-05-09 00:37:52,284 o.a.f.c.Configuration          [WARN ][.../my-job-name] Config uses deprecated configuration key 'high-availability' instead of proper key 'high-availability.type'              

2024-05-09 00:37:52,284 o.a.f.c.Configuration          [WARN ][.../my-job-name] Config uses deprecated configuration key 'high-availability' instead of proper key 'high-availability.type'              

2024-05-09 00:37:52,284 o.a.f.c.Configuration          [WARN ][.../my-job-name] Config uses deprecated configuration key 'high-availability' instead of proper key 'high-availability.type'              

2024-05-09 00:37:52,306 o.a.f.k.o.r.d.ApplicationReconciler [INFO ][.../my-job-name] Job is not running and HA metadata is not available or usable for executing the upgrade, waiting for upgradeable state                                                                                                                                                                                                                                 

2024-05-09 00:37:52,307 o.a.f.k.o.r.d.AbstractFlinkResourceReconciler [DEBUG][.../my-job-name] Checking whether jobmanager deployment needs recovery                                                     

2024-05-09 00:37:52,307 o.a.f.k.o.a.JobAutoScalerImpl  [INFO ][.../my-job-name] Job autoscaler is waiting for RUNNING job state                                                                          

2024-05-09 00:37:52,307 o.a.f.k.o.r.d.AbstractFlinkResourceReconciler [INFO ][.../my-job-name] Resource fully reconciled, nothing to do...
                                                               
2024-05-09 00:37:52,307 o.a.f.k.o.c.FlinkDeploymentController [DEBUG][.../my-job-name] End of reconciliation
n
This looks like a problem(?):
Config uses deprecated configuration key 'high-availability' instead of proper key 'high-availability.type'
Have you tried setting
high-availability.type: kubernetes
? https://nightlies.apache.org/flink/flink-docs-master/docs/deployment/ha/kubernetes_ha/#configuration
r
Hi @Nicholas Erasmus, I had seen that previously but I thought since we got that message that it was still being recognized. From what I’m seeing, it almost looks like the HA is being lost potentially around autoscaling events, but not 100% certain of that.
It’s worth noting that once these jobs get into these states, the following is all true: • Only a single Job Manager pod • Adjustments to the FlinkDeployment seem to have no effect (don’t force a reconcilation/recycling of the pods) I assumed the above HA.type was simply a warning that the configuration was deprecated but that it was still being applied properly.
n
Adjustments to the FlinkDeployment seem to have no effect (don’t force a reconcilation/recycling of the pods)
oh boy this is the kind of thing that gets my stomach into knots If you figure it out please share. I'm kind of championing Flink in our org, so these kinds of phenomena are important for me to understand as far as possible.
r
Yeah, I’ve been in the same boat (re: championing Flink). I’ve been using it for several years now, but just started migrating existing jobs over to the operator. I suspect this particular issue is related to HA being lost which was an issue that I saw pop up on the version of the operator we’re currently using (1.6). Planning on trying out the 1.8 version which is supposed to have fixed the issue, so crossing my fingers on that front.
n
So I'm in the middle of migrating our existing jobs to a new session cluster. Believe it or not, but the CICD problems I had to solve had me tearing my hair out at times. It really exposed how over engineered CICD can be in the modern day. In any case, do you perhaps have any resources to share about supporting and monitoring a session cluster? I don't know if I'm just on the wrong internet, but I've not been able to find much specifically about this. The success of the Flink session cluster project is crucial as some of our engineers are very lukewarm about Flink. And the only thing apart from the Delta connector being pretty disappointing is a bit of a lack of confidence in managing the cluster. Hence why your problem makes me a bit queezy.
m
@Rion Williams did you manage do upgrade operator to 1.8? Is
HA metadata is not available
issue fixed for you? iI hope that this ticket fixesI hope it was resolved in https://issues.apache.org/jira/browse/FLINK-33522 We’re still on operator version 1.6 and we’re looking forward to upgrade thanks!
r
@Michał Fijołek I haven’t seen this much since swapping over to 1.8 that I can recall, so I think the upgrade did address at least one of the issues that I was experiencing related to this.
m
nice, thanks! 🙏