mirror of
https://github.com/opencontainers/runc.git
synced 2026-11-06 05:17:05 +00:00
libct/specconv: rm duplicate relative mount destination warning
Commits1f1e91b1and2192670a(PR 2917) added a check that a mount destination is absolute (as the runtime spec required back then) to both libcontainer/specconv and libcontainer/configs/validate. This broke Moby, which used relative destinations for swarm configs (issue 2928), so commitb31a9340(PR 3004) turned both errors into warnings, with TODOs to make them errors again in a future release. As a result, runc prints two warnings for the same relative mount destination, for example: level=warning msg="mount destination tmp/bind is not absolute. Support for non-absolute mount destinations will be removed in a future release." level=warning msg=configuration error="mount &{... Destination:tmp/bind ...}: relative destination path is **deprecated**, using it as relative to /" Later, the runtime spec was amended to allow relative mount destinations on Linux, treating them as relative to "/" (see opencontainers/runtime-spec PR 1225), and commitb17c6f23(PR 4013) updated the validator accordingly, removing the TODO and changing the warning text. The specconv part was left as is, still having the stale TODO and the "will be removed" text. Remove the warning from specconv altogether, as the one from the validator is sufficient (and is also seen by libcontainer users who do not use specconv). Fixes:b31a9340f9("libcontainer: relax validation for absolute paths") Fixes:b17c6f237d("validator: Relax warning for not abs mount dst path") Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
1 parent
976d95abc4
commit
3012c97273
1 file changed
-6
@@ -639,12 +639,6 @@ func toConfigIDMap(specMaps []specs.LinuxIDMapping) []configs.IDMap {
|
||||
}
|
||||
|
||||
func createLibcontainerMount(cwd string, m specs.Mount) (*configs.Mount, error) {
|
||||
if !filepath.IsAbs(m.Destination) {
|
||||
// Relax validation for backward compatibility
|
||||
// TODO (runc v1.x.x): change warning to an error
|
||||
// return nil, fmt.Errorf("mount destination %s is not absolute", m.Destination)
|
||||
logrus.Warnf("mount destination %s is not absolute. Support for non-absolute mount destinations will be removed in a future release.", m.Destination)
|
||||
}
|
||||
mnt := parseMountOptions(m.Options)
|
||||
|
||||
mnt.Destination = m.Destination
|
||||
|
||||
Reference in new issue
Block a user