runc
runc copied to clipboard
libcontainer: the fstype argument is ignored for bind mount
"bind" is confusing as a fstype argument.
unix.Mount(node.Path, dest, "bind", unix.MS_BIND, "")
And the fstype argument is ignored for bind mount.
func Mount(source string, target string, fstype string, flags uintptr, data string) (err error)
need to merge https://github.com/opencontainers/runc/pull/2775
It is already "" in some places -- and I agree we should convert the test.
Nit: typo in commit subject: s/amount/mount/
@Iceber can you please rebase to fix CI?
@kolyshkin use grep unix.Mount . -r | grep bind to find and modify other files
This one gives me pause. I think we had some edge cases in the past where this was needed maybe for mount propagation or remounts.
I don't think so @mrunalp -- fstype has always been ignored for all of the key flags (MS_BIND, MS_MOVE, MS_REMOUNT ...). The issue we had in the past was that internally libcontainer requires you to specify bind or rbind as types (in other words, the bind option didn't actually do anything if you didn't also specify the type). (Though this has since been mostly(?) fixed now.)
I'm fine with dropping it, though I don't personally think it's confusing to have it -- it makes strace(1) output slightly nicer to read.
Better to move to v1.1.0 milestone?
I think it's trivial enough it doesn't need to be blocked on 1.0, but I don't really mind (it's a no-op change anyway).
Agree we can do it post 1.0