[ 
https://issues.apache.org/jira/browse/FLINK-30361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645766#comment-17645766
 ] 

SwathiChandrashekar commented on FLINK-30361:
---------------------------------------------

This is the case, as in SessionReconciler.java ( flink-kubernetes-operator), we 
are checking if there is any spec change, delete the session cluster, wait for 
it to be terminated and later deploy the new changes
{quote}
    @Override
    protected void reconcileSpecChange(-----)  throws Exception {
        deleteSessionCluster(deployment, observeConfig);

        // We record the target spec into an upgrading state before deploying
        ReconciliationUtils.updateStatusBeforeDeploymentAttempt(deployment, 
deployConfig);
        statusRecorder.patchAndCacheStatus(deployment);

        deploy( deployment,deployment.getSpec(), deployment.getStatus(), ctx, 
deployConfig,Optional.empty( false{quote}

> Flink cluster deleted while updating the replicas
> -------------------------------------------------
>
>                 Key: FLINK-30361
>                 URL: https://issues.apache.org/jira/browse/FLINK-30361
>             Project: Flink
>          Issue Type: Bug
>          Components: Kubernetes Operator
>    Affects Versions: kubernetes-operator-1.2.0
>            Reporter: SwathiChandrashekar
>            Priority: Major
>
> Whenever we try to update the replicas of the task manager for a flink 
> standalone session cluster using the flink CR, any change in CR triggers a 
> redeploy of the flink cluster ( delete + create of all the components - JM 
> and TM ).
> This might not be required for replica update and this should not affect the 
> existing pods and only a new TM pod will added during a scale up and a TM pod 
> should be deleted during a scale down.
> Example tried --> Change the TM replicas from 2 to 3.
> bq. PS C:\Users\cswathi\Documents\flink-OSS-operator> kubectl get pods -w
> bq. 
> bq. NAME                                                              READY   
> STATUS              RESTARTS   AGE
> bq. 
> bq. basic-session-deployment-only-example-5dbbdf5dd8-cq8nb            0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb7vzvd   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbg6vzs   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. flink-kubernetes-operator-676897686f-5fc8r                        2/2     
> Running             0          18m
> bq. 
> bq. basic-session-deployment-only-example-5dbbdf5dd8-cq8nb            1/1     
> Running             0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb7vzvd   1/1     
> Running             0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbg6vzs   1/1     
> Running             0          13s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb7vzvd   1/1     
> Terminating         0          65s
> bq. 
> bq. basic-session-deployment-only-example-5dbbdf5dd8-cq8nb            1/1     
> Terminating         0          65s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbg6vzs   1/1     
> Terminating         0          65s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb7vzvd   1/1     
> Terminating         0          66s
> bq. 
> bq. basic-session-deployment-only-example-5dbbdf5dd8-cq8nb            1/1     
> Terminating         0          66s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbg6vzs   1/1     
> Terminating         0          66s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb7vzvd   0/1     
> Terminating         0          66s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb7vzvd   0/1     
> Terminating         0          66s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb7vzvd   0/1     
> Terminating         0          66s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbg6vzs   0/1     
> Terminating         0          67s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbg6vzs   0/1     
> Terminating         0          67s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbg6vzs   0/1     
> Terminating         0          67s
> bq. 
> bq. basic-session-deployment-only-example-5dbbdf5dd8-cq8nb            0/1     
> Terminating         0          67s
> bq. 
> bq. basic-session-deployment-only-example-5dbbdf5dd8-cq8nb            0/1     
> Terminating         0          67s
> bq. 
> bq. basic-session-deployment-only-example-5dbbdf5dd8-cq8nb            0/1     
> Terminating         0          67s
> bq. 
> bq. basic-session-deployment-only-example-588474bf97-nng85            0/1     
> Pending             0          0s
> bq. 
> bq. basic-session-deployment-only-example-588474bf97-nng85            0/1     
> Pending             0          0s
> bq. 
> bq. basic-session-deployment-only-example-588474bf97-nng85            0/1     
> ContainerCreating   0          0s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb5ddxv   0/1     
> Pending             0          0s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb5ddxv   0/1     
> Pending             0          0s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbrfgvz   0/1     
> Pending             0          0s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb57v4t   0/1     
> Pending             0          0s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbrfgvz   0/1     
> Pending             0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb57v4t   0/1     
> Pending             0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb5ddxv   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbrfgvz   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb57v4t   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-588474bf97-nng85            0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbrfgvz   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb57v4t   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb5ddxv   0/1     
> ContainerCreating   0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbbrfgvz   1/1     
> Running             0          1s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb5ddxv   1/1     
> Running             0          1s
> bq. 
> bq. basic-session-deployment-only-example-588474bf97-nng85            1/1     
> Running             0          2s
> bq. 
> bq. basic-session-deployment-only-example-taskmanager-77854fbb57v4t   1/1     
> Running             0          17s



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to