orchestrator: Check that service's SpecVersion exists before dereferencing#2233
Merged
nishanttotla merged 1 commit intomoby:masterfrom Jun 9, 2017
Merged
Conversation
…ncing IsTaskDirty assumed that if a task had a SpecVersion, the corresponding service must also have a SpecVersion, since that is where the task's field is copied from. However, there are mixed-version scenarios where a service could get updated by a manager running an older version of swarmkit than the manager that created the task. Add a check to avoid a crash in this case. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This was referenced Jun 9, 2017
Codecov Report
@@ Coverage Diff @@
## master #2233 +/- ##
==========================================
+ Coverage 60.23% 60.72% +0.49%
==========================================
Files 124 124
Lines 20156 20156
==========================================
+ Hits 12141 12240 +99
+ Misses 6658 6543 -115
- Partials 1357 1373 +16 |
cpuguy83
approved these changes
Jun 9, 2017
Member
cpuguy83
left a comment
There was a problem hiding this comment.
LGTM
Cool, I didn't want to just submit a PR to do this since I wasn't sure if the bug is that it sent a nil version or not
👍
3 tasks
silvin-lubecki
pushed a commit
to silvin-lubecki/docker-ce
that referenced
this pull request
Feb 3, 2020
- moby/swarmkit#2218 - moby/swarmkit#2215 - moby/swarmkit#2233 Signed-off-by: Ying <ying.li@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Feb 3, 2020
- moby/swarmkit#2218 - moby/swarmkit#2215 - moby/swarmkit#2233 Signed-off-by: Ying <ying.li@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Mar 10, 2020
- moby/swarmkit#2218 - moby/swarmkit#2215 - moby/swarmkit#2233 Signed-off-by: Ying <ying.li@docker.com>
silvin-lubecki
pushed a commit
to silvin-lubecki/engine-extract
that referenced
this pull request
Mar 23, 2020
- moby/swarmkit#2218 - moby/swarmkit#2215 - moby/swarmkit#2233 Signed-off-by: Ying <ying.li@docker.com>
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.
IsTaskDirtyassumed that if a task had aSpecVersion, the corresponding service must also have aSpecVersion, since that is where the task's field is copied from. However, there are mixed-version scenarios where a service could get updated by a manager running an older version of swarmkit than the manager that created the task. Add a check to avoid a crash in this case.