:wave: How does the Flink Kubernetes Operator dete...
# troubleshooting
k
馃憢 How does the Flink Kubernetes Operator determine if a job is healthy? From the docs:
* When HA is enabled the
savepoint
upgrade mode may fall back to the
last-state
behaviour in cases where the job is in an unhealthy state.
I'm wondering about the unhealthy state because I'm observing an issue where the operator won't take a new savepoint when
savepointTriggerNonce
is updated, or when a FlinkDeployment spec is changed and the
upgradeMode
is set to
savepoint
. Any help is appreciated!
This is using Flink 1.16 with Flink Operator 1.3.1
It also seems like the FlinkDeployment is stuck in a RECONCILING state and not transitioning to RUNNING. However, I see that the job is running in the UI fine
and making checkpoints
g
It would be good to first understand why the job doesn't go into running state . Is there anything in the log to hint at the problem? Connectivity issue or something?
What is the status of the deployment ?
k
I'm getting the same result (job stuck in RECONCILING) for the basic-example too. When I upgrade the spec with
upgradeMode: savepoint
and
kubernetes.operator.job.upgrade.last-state-fallback.enabled: false
there are these logs in the operator:
Copy code
2023-02-28 18:46:42,779 o.a.f.k.o.r.d.AbstractFlinkResourceReconciler [INFO ][redacted] UPGRADE change(s) detected (FlinkDeploymentSpec[job.upgradeMode=SAVEPOINT,flinkConfiguration.web.timeout=1800000] differs from FlinkDeploymentSpec[job.upgradeMode=STATELESS,flinkConfiguration.web.timeout=1800001]), starting reconciliation.
2023-02-28 18:46:42,793 o.a.f.k.o.l.AuditUtils         [INFO ][redacted] >>> Event  | Info    | SPECCHANGED     | UPGRADE change(s) detected (FlinkDeploymentSpec[job.upgradeMode=SAVEPOINT,flinkConfiguration.web.timeout=1800000] differs from FlinkDeploymentSpec[job.upgradeMode=STATELESS,flinkConfiguration.web.timeout=1800001]), starting reconciliation.
2023-02-28 18:46:42,793 o.a.f.k.o.r.d.AbstractJobReconciler [INFO ][redacted] Upgrading/Restarting running job, suspending first...
2023-02-28 18:46:42,794 o.a.f.k.o.r.d.ApplicationReconciler [INFO ][redacted] Job is not running and HA metadata is not available or usable for executing the upgrade, waiting for upgradeable state
How does the operator make the FlinkDeployment transition to Running state?
What is the status of the deployment ?
Status of FlinkDeployment is RECONCILING (job status) and DEPLOYED (reconciliation status)
Also, webhooks are disabled in the operator installation
g
really seems like there is some connectivity issue between the operator and the submitted flink jobs, is that possible?
k
Yeah that is definitely what it seems like, it's possible. I'm looking into it. When I follow the Quick Start using minikube, this issue isn't present. There may be some kind of networkpolicy or other that is deployed in the environment where the issue exists. Our flink operator is deployed such that it manages all namespaces (cluster-scoped), any ideas on potential sources of connectivity issues?
Yeah, I found the culprit network policy. It was blocking certain cross-namespace traffic. I have enough to follow-up on. Thanks for your help Gyula, appreciate it!
g
you probably need to use the podTemplate feature to add the required labales etc. This is very common in prod envs
馃憤 1