-
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
refactor: move functions from pre-start hook to pouchd #2064
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2064 +/- ##
==========================================
- Coverage 63.86% 63.84% -0.02%
==========================================
Files 205 206 +1
Lines 15759 15762 +3
==========================================
- Hits 10064 10063 -1
- Misses 4441 4444 +3
- Partials 1254 1255 +1
|
daemon/mgr/container.go
Outdated
@@ -2224,6 +2236,104 @@ func (mgr *ContainerManager) populateVolumes(ctx context.Context, c *Container) | |||
return nil | |||
} | |||
|
|||
func (mgr *ContainerManager) setMountTab(ctx context.Context, c *Container) error { |
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.
mgr/container.go
are too big, some functions are worked for container object, maybe we can put the code into container_type.go
, WDYT???
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 add a new file container_storage.go
to manager the operation of container storage module.
move the functions: `set rootfs quota` and `set mtab` from pre-start hook in runc to pouchd container's create. Pouchd mounts the rootfs and do these functions, if it is successful, and then umount the rootfs. Signed-off-by: Rudy Zhang <rudyflyzhang@gmail.com>
@rudyfly , get the ci passed, then LGTM, except a question: would mount in pouchd meet the |
Ⅰ. Describe what this PR did
move the functions:
set rootfs quota
andset mtab
from pre-starthook in runc to pouchd container's create. Pouchd mounts the rootfs and
do these functions, if it is successful, and then umount the rootfs.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how you did it
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews
Signed-off-by: Rudy Zhang rudyflyzhang@gmail.com