Remove Job also from .status.active for Replace strategy#35420
Merged
Conversation
janetkuo
reviewed
Oct 25, 2016
| // ... and the job itself | ||
| // ... the job itself... | ||
| if err := jc.DeleteJob(job.Namespace, job.Name); err != nil { | ||
| recorder.Eventf(&sj, api.EventTypeWarning, "FailedDelete", "Deleted job: %v", err) |
Member
There was a problem hiding this comment.
should we glog.Errorfthis failure?
| expectedEvents += 1 | ||
| expectedEvents++ | ||
| expectUpdates++ | ||
|
|
6ae20d1 to
dc364b8
Compare
Contributor
Author
|
Comments addressed, ptal. |
|
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
|
Automatic merge from submit-queue |
Contributor
Author
This was referenced Nov 2, 2016
Contributor
|
cherry-picked in #36510 |
|
Commit found in the "release-1.4" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
shyamjvs
pushed a commit
to shyamjvs/kubernetes
that referenced
this pull request
Dec 1, 2016
…ck-of-#34375-kubernetes#35285-kubernetes#35420-kubernetes#35608-kubernetes#35919-kubernetes#36161-origin-release-1.4 Automated cherry pick of kubernetes#34375 kubernetes#35285 kubernetes#35420 kubernetes#35608 kubernetes#35919 kubernetes#36161
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When iterating over list of Jobs we're removing each of them when strategy is replace. Unfortunately, the job reference was not removed from
.status.activewhich cause the controller trying to remove it once again during next run and failed removing what was already removed during previous run. This was cause by not removing the reference previously. This PR fixes that and cleans logs a bit, in that controller.@erictune fyi
@janetkuo ptal
This change is