-
Notifications
You must be signed in to change notification settings - Fork 950
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: restore config after update fail #1513
bugfix: restore config after update fail #1513
Conversation
if pouch update a container get error, restore container config, aviod container record error config. Fixes: #1512 Signed-off-by: Ace-Tang <aceapril@126.com>
Codecov Report
@@ Coverage Diff @@
## master #1513 +/- ##
==========================================
- Coverage 40.56% 40.48% -0.09%
==========================================
Files 254 254
Lines 16535 16547 +12
==========================================
- Hits 6708 6699 -9
- Misses 8965 8980 +15
- Partials 862 868 +6
|
I think this issue is quite severe, and we need to fix this ASAP. |
since this problem is severe, i will first merge it. LGTM |
@@ -752,6 +752,18 @@ func (mgr *ContainerManager) Update(ctx context.Context, name string, config *ty | |||
return err | |||
} | |||
|
|||
restore := false |
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 am wondering if we need the new variable restore
. Could we just decide whether to rollback via the nullable of err? @Ace-Tang @HusterWan
if pouch update a container get error, restore container
config, aviod container record error config.
Fixes: #1512
Signed-off-by: Ace-Tang aceapril@126.com
Ⅰ. Describe what this PR did
Ⅱ. Does this pull request fix one issue?
Fixes: #1512
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews