-
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: miss mount point mode when volume from other container #2576
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2576 +/- ##
=========================================
Coverage ? 69.23%
=========================================
Files ? 278
Lines ? 18689
Branches ? 0
=========================================
Hits ? 12939
Misses ? 4276
Partials ? 1474
|
@rudyfly FILE: ./docs/features/pouch_with_dragonfly.md ERROR: dead links found! BTW, #2580 |
// run bak container | ||
command.PouchRun("run", "-d", "--name", cNameBak, | ||
"-v", vName+":/var:dr", | ||
"-v", vName+":/data", busyboxImage, "top").Assert(c, icmd.Success) |
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.
defer command.PouchRun("rm", "-vf", cNameBak)
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 have removed cNameBak
at this line: https://github.com/alibaba/pouch/pull/2576/files#diff-4074e755222ffc100dce9ee490e6eb24R450
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.
If command.PouchRun("stop", cNameBak).Assert(c, icmd.Success) fails to execute, command.PouchRun("rm", "-vf", cNameBak).Assert(c, icmd.Success) would be not executed.
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.
OK,you are right, but my test steps are run bak container
-> stop bak container
-> run test container
-> remove bak container
, I want to check whether the step remove bak container
is successful.
Let me see how to write the steps.
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.
@sunyuan3 I have modified the test case, PTAL. 🍺
When the mountpoints of container are come from other container, use `volumes-from` to set mountpoints, if the old mountpoint has set volume mode, new container must keep the volume mode. Signed-off-by: Rudy Zhang <rudyflyzhang@gmail.com>
LGTM |
LGTM |
Ⅰ. Describe what this PR did
When the mountpoints of container are come from other container,
use
volumes-from
to set mountpoints, if the old mountpoint has setvolume mode, new container must keep the volume mode.
Ⅱ. Does this pull request fix one issue?
NONE
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
add test
TestRunVolumesFromWithDR
Ⅳ. Describe how to verify it
run test
Ⅴ. Special notes for reviews
Signed-off-by: Rudy Zhang rudyflyzhang@gmail.com