nri icon indicating copy to clipboard operation
nri copied to clipboard

fix nri removeMount does not work bug

Open liangjingtao11 opened this issue 1 year ago • 4 comments

nri needs to pass the del mount info to containerd, so that containerd can handle the mount records that need to be deleted correctly

fix: https://github.com/containerd/nri/issues/80

liangjingtao11 avatar May 29 '24 08:05 liangjingtao11

/retest

liangjingtao11 avatar May 29 '24 09:05 liangjingtao11

https://github.com/containerd/nri/blob/main/pkg/api/adjustment.go#L20-L32 for consideration...

mikebrow avatar May 29 '24 15:05 mikebrow

Additional consideration.. the removeMount test, linked below, only does the removeMount when the adjustment is set to "overwrite"= true..

If we are to support removal of a mount that is not an overwrite we should probably have another test for it.. https://github.com/containerd/nri/blob/main/pkg/adaptation/adaptation_suite_test.go#L453-L456

mikebrow avatar May 29 '24 15:05 mikebrow

@liangjingtao11 It would be nice to have a test case for this.

klihub avatar Jun 07 '24 13:06 klihub

@liangjingtao11 do you have time to finish this PR?

mikebrow avatar Aug 08 '24 19:08 mikebrow

@liangjingtao11 This fix is not sufficient in it's current form as it breaks replacing a mount with another one to the same destination. I think we'd need a bit of additional code to prevent that from happening. Maybe something like this, where 8f509e7d0f2e4e9af7f7acb77e9c18f2e882efaf is an updated version of your commit, and 7ea0a47f00f853b4e970b980b1a24b082c0930f0 adds a new test case for mount removal.

klihub avatar Aug 19 '24 11:08 klihub

@liangjingtao11 Ping. Do you have time to address the remaining issues ?

klihub avatar Aug 23 '24 17:08 klihub

Closing in favor of updated PR #107.

klihub avatar Sep 06 '24 15:09 klihub