-
Notifications
You must be signed in to change notification settings - Fork 944
bugfix: make sure SnapshotID not empty when start container #2678
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
bugfix: make sure SnapshotID not empty when start container #2678
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2678 +/- ##
==========================================
+ Coverage 63.03% 69.23% +6.19%
==========================================
Files 276 285 +9
Lines 17356 18959 +1603
==========================================
+ Hits 10941 13126 +2185
+ Misses 5206 4357 -849
- Partials 1209 1476 +267
|
0265ccd to
322f372
Compare
|
@HusterWan the following code is used for old containerd shim right? |
@fuweid No, this |
20e9024 to
c6d767f
Compare
| IO: mgr.IOs.Get(c.ID), | ||
| RootFSProvided: c.RootFSProvided, | ||
| BaseFS: c.BaseFS, | ||
| SnapshotID: c.SnapshotID, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I check that snapshot id is first given to SnapshotID , snapID := id, SnapshotID: snapID, so why this field will be empty , if this happened, do c.SnapshotKey() will also be empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I check that snapshot id is first given to SnapshotID , snapID := id, SnapshotID: snapID, so why this field will be empty
I also cannot figure it out why this happened, maybe some extreme cases
if this happened, do c.SnapshotKey() will also be empty
No, SnapshotKey() will return c.ID if the SnapshotID is empty
|
Look good to me, make the ci pass, @HusterWan |
Signed-off-by: Michael Wan <[email protected]>
c6d767f to
19ff611
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Michael Wan [email protected]
Ⅰ. Describe what this PR did
Found a problem on production environment:
I checked the container's meta.json file and found the
SnapshotIDis empty, though i cannot figure out why this field was empty, but we should make sure theSnapshotIDshould be assigned to proper value.Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews