Fix FibreChannel volume plugin corrupting filesystem on detach

FibreChannel volume plugin misses one important step when removing a
device: "multipath -f". It flushes all multipath buffers to its individual
paths. Without it, a filesystem on the device may get corrupted.
This commit is contained in:
Jan Safranek
2020-12-02 11:03:11 +01:00
parent c98f6bf308
commit 6f8bdb7cc1
4 changed files with 30 additions and 7 deletions

View File

@@ -190,7 +190,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
fakeManager2 := newFakeDiskManager()
defer fakeManager2.Cleanup()
unmounter, err := plug.(*fcPlugin).newUnmounterInternal("vol1", types.UID("poduid"), fakeManager2, fakeMounter)
unmounter, err := plug.(*fcPlugin).newUnmounterInternal("vol1", types.UID("poduid"), fakeManager2, fakeMounter, fakeExec)
if err != nil {
t.Errorf("Failed to make a new Unmounter: %v", err)
}