[
https://issues.apache.org/jira/browse/FLINK-30361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645766#comment-17645766
]
SwathiChandrashekar edited comment on FLINK-30361 at 12/11/22 12:36 PM:
------------------------------------------------------------------------
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}
The ask is, we can remove the deletion of session cluster whenever there is any
update, as the kubernetes deployment will handle any kind of update [ i.e if
there is a replica change, no change to the existing pods - only added/deletion
of diff , there is a config change, depending on the rolling strategy, the
update is passed to the corresponding pods by the kubernetes ].
was (Author: swathi chandrashekar):
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.
> {quote}PS C:\Users\cswathi\Documents\flink-OSS-operator> kubectl get pods -w
> NAME READY
> STATUS RESTARTS AGE
> basic-session-deployment-only-example-5dbbdf5dd8-cq8nb 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb7vzvd 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbbg6vzs 0/1
> ContainerCreating 0 1s
> flink-kubernetes-operator-676897686f-5fc8r 2/2
> Running 0 18m
> basic-session-deployment-only-example-5dbbdf5dd8-cq8nb 1/1
> Running 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb7vzvd 1/1
> Running 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbbg6vzs 1/1
> Running 0 13s
> basic-session-deployment-only-example-taskmanager-77854fbb7vzvd 1/1
> Terminating 0 65s
> *basic-session-deployment-only-example-5dbbdf5dd8-cq8nb 1/1
> Terminating 0 65s
> basic-session-deployment-only-example-taskmanager-77854fbbg6vzs 1/1
> Terminating 0 65s
> basic-session-deployment-only-example-taskmanager-77854fbb7vzvd 1/1
> Terminating 0 66s
> basic-session-deployment-only-example-5dbbdf5dd8-cq8nb 1/1
> Terminating 0 66s*
> basic-session-deployment-only-example-taskmanager-77854fbbg6vzs 1/1
> Terminating 0 66s
> basic-session-deployment-only-example-taskmanager-77854fbb7vzvd 0/1
> Terminating 0 66s
> basic-session-deployment-only-example-taskmanager-77854fbb7vzvd 0/1
> Terminating 0 66s
> basic-session-deployment-only-example-taskmanager-77854fbb7vzvd 0/1
> Terminating 0 66s
> basic-session-deployment-only-example-taskmanager-77854fbbg6vzs 0/1
> Terminating 0 67s
> basic-session-deployment-only-example-taskmanager-77854fbbg6vzs 0/1
> Terminating 0 67s
> basic-session-deployment-only-example-taskmanager-77854fbbg6vzs 0/1
> Terminating 0 67s
> basic-session-deployment-only-example-5dbbdf5dd8-cq8nb 0/1
> Terminating 0 67s
> basic-session-deployment-only-example-5dbbdf5dd8-cq8nb 0/1
> Terminating 0 67s
> basic-session-deployment-only-example-5dbbdf5dd8-cq8nb 0/1
> Terminating 0 67s
> basic-session-deployment-only-example-588474bf97-nng85 0/1
> Pending 0 0s
> basic-session-deployment-only-example-588474bf97-nng85 0/1
> Pending 0 0s
> basic-session-deployment-only-example-588474bf97-nng85 0/1
> ContainerCreating 0 0s
> basic-session-deployment-only-example-taskmanager-77854fbb5ddxv 0/1
> Pending 0 0s
> basic-session-deployment-only-example-taskmanager-77854fbb5ddxv 0/1
> Pending 0 0s
> basic-session-deployment-only-example-taskmanager-77854fbbrfgvz 0/1
> Pending 0 0s
> basic-session-deployment-only-example-taskmanager-77854fbb57v4t 0/1
> Pending 0 0s
> basic-session-deployment-only-example-taskmanager-77854fbbrfgvz 0/1
> Pending 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb57v4t 0/1
> Pending 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb5ddxv 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbbrfgvz 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb57v4t 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-588474bf97-nng85 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbbrfgvz 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb57v4t 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb5ddxv 0/1
> ContainerCreating 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbbrfgvz 1/1
> Running 0 1s
> basic-session-deployment-only-example-taskmanager-77854fbb5ddxv 1/1
> Running 0 1s
> basic-session-deployment-only-example-588474bf97-nng85 1/1
> Running 0 2s
> basic-session-deployment-only-example-taskmanager-77854fbb57v4t 1/1
> Running 0 17s{quote}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)