Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new condition JobReconcileFinished to fix performance issue #1097

Closed
wants to merge 1 commit into from

Conversation

zionwu
Copy link
Contributor

@zionwu zionwu commented Oct 31, 2019

Fix issue #965.


This change is Reviewable

@k8s-ci-robot
Copy link

Hi @zionwu. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign gaocegege
You can assign the PR to them by writing /assign @gaocegege in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@zionwu
Copy link
Contributor Author

zionwu commented Oct 31, 2019

@gaocegege @johnugeorge Can you help to review this PR? Thanks.

// JobReconcileFinished means this job reached JobSucceeded or JobFailed
// and its sub-resources have been cleaned according to CleanPodPolicy,
// No more reconciliation is needed for this job.
JobReconcileFinished JobConditionType = "ReconcileFinished"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name ReconcileFinished here is confusing to me. BTW, does 12h or 24h reconcile period works for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a suggestion for the name of the status?
I never try using 12h or 24h reconcile period because in my environment I implemented another fix for #956, which requires reconcile period to be short.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Do you have any suggestion @johnugeorge

And I think we should add it into kubeflow/common if we decide to merge it.

/cc @richardsliu @hougangliu

@coveralls
Copy link

Coverage Status

Coverage remained the same at 96.512% when pulling 3e03d01 on zionwu:completed-condition into de4847c on kubeflow:master.

@TravisBuddy
Copy link

Hey @zionwu,
Your changes look good to me!

View build log

TravisBuddy Request Identifier: 60ff2940-fbb8-11e9-9ef7-03a460f81868

@@ -429,6 +436,14 @@ func (tc *TFController) reconcileTFJobs(tfjob *tfv1.TFJob) error {
tfjob.Status.ReplicaStatuses[rtype].Active = 0
}
}

//If the job is terminated and its sub-resources are deleted, it no longer need reconciliation,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is correct
Because even a job is failed or succeeded,
there is a cleanupTFJob and it might haven't pass the TTL, so the tfjob haven't been deleted and need to wait until future reconcile.
If we mark it as finish reconcile here, then there will be no reconcile in the future
the cleanupTFJob will never be triggered

@stale
Copy link

stale bot commented Jul 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale label Jul 9, 2020
@stale stale bot closed this Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants