lyft / flinkk8soperator

Kubernetes operator that provides control plane for managing Apache Flink applications
Apache License 2.0
569 stars 159 forks source link

Deletion and recreation of FlinkApplication with the same name tries to continue the old job #166

Open anekdoti opened 4 years ago

anekdoti commented 4 years ago

I observed the following behaviour during deletion and recreation of a FlinkApplication custom resource:

  1. I create a FlinkApplication with name x. The Flink job cluster is correctly created and running.
  2. I delete the FlinkApplication x. The Flink job cluster is correctly removed.
  3. I create a new FlinkApplication with the same name x. The Flink job cluster is created correctly, but the job is not started. The job manager log contains the error message
    Exception occurred in REST handler: Job 2cb963c30af93d419aa54d562145fe55 not found

    Here, 2cb963c30af93d419aa54d562145fe55 is the id of the job running in the Flink job cluster created in step 1. I would have expected that the Flink job cluster only tries to continue the old job when an update to the FlinkApplication was done.

The deleteMode of the FlinkApplication x is None. I'm running the flink-operator in version 0.4.0.

I would like to know which FlinkApplication configuration would be required so that deleting and recreating a FlinkApplication custom resource works as expected.

anandswaminathan commented 4 years ago

@anekdoti Can you try with deleteMode:None parameter. I believe the flink cluster was not removed in Step 2 when you tried.