overlay: warn if overlay backing fs doesn't support d_type#27433
overlay: warn if overlay backing fs doesn't support d_type#27433vieux merged 1 commit intomoby:masterfrom
Conversation
|
CC @rhvgoyal |
20b0064 to
616033d
Compare
|
If this is just a warning, then kernel is already emitting a warning. How does it help doing another one. |
This was prompted by the issue here #27358. The warning should have been shown in the kernel but not is not somewhere users will look before filing an issue. However I am not convinced that adding a warning to the Docker logs will make this situation much better. @AkihiroSuda what if instead we added a key mentioning d_type status to the the status output so when issues are filed it is easier to see the problem in the |
|
@dmcgowan I guess we should decide how serious the situation is if someone runs docker without this. If it's a serious issue, then the |
4d3a043 to
1610de6
Compare
|
Updated PR
@dmcgowan @thaJeztah |
If we are ok with doing that, we should add that in the warning ("running without t_type=0 will no longer be supported in 1.15" for example (needs a better sentence)) |
1610de6 to
32f163f
Compare
|
If this should be considered as a "feature deprecation", the warning should remain in v1.13, v1.14. and v.1.15. So the warning will be "running without t_type=0 will no longer be supported in 1.16" in such a case.
IMO this is not a "feature deprecation", because "supporting overlay without d_type" is a bug rather than a feature. |
|
We discussed this, and suggest to:
This allows users that currently run without this being supported to migrate/address the issue |
pkg/fsutils/fsutils.h
Outdated
There was a problem hiding this comment.
It should be possible to do this without c. https://golang.org/pkg/syscall/#Dirent is exposed in go.
32f163f to
0b5b59f
Compare
|
@thaJeztah thank you for making the discussion. Updated PR and now the warning message is like this: |
0b5b59f to
707ea30
Compare
|
Trying to see if we can make this more consistent with the devmapper dev-sync message; Perhaps (wrapped for readability): @mstanleyjones perhaps you have suggestions? |
|
How about: According to the man page for mkfs.xfs, it is |
707ea30 to
59731ee
Compare
|
Updated PR according to the suggestion from @mstanleyjones |
|
ping @justincormack @tonistiigi PTAL |
pkg/fsutils/fsutils_linux.go
Outdated
There was a problem hiding this comment.
What is the reasoning behind checking multiple files? Is there a case where there can be a mix of unknown type and known types?
There was a problem hiding this comment.
I agree that checking a single file is enough in practice.
But I wonder theoretically there can be a mix of unknown type and known types in some filesystem, so I wrote the code to check multiple files here. ( it should be very lightweight operation)
Please let me know if I should fix this.
pkg/fsutils/fsutils_linux.go
Outdated
There was a problem hiding this comment.
self-nit: walk maybe misleading because it is not recursive.
I'll try to change the terminology
69bf27f to
8a8d73c
Compare
|
rebased to master |
pkg/fsutils/fsutils_linux_test.go
Outdated
There was a problem hiding this comment.
I'd remove these helper functions as there is only one caller and they don't seem to have a repeatable use-case. Just makes the flow harder to follow.
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
8a8d73c to
2e20e63
Compare
|
LGTM |
1 similar comment
|
LGTM |
cherry-pick from moby#27433 Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp> Signed-off-by: Lei Jitang <leijitang@huawei.com>
- What I did
Print a warning if the backing fs for overlay/overlay2 doesn't support
d_type.Close #27358
Considering the discussion at #22937, the warning is not treated as an error.
However, I still think it is useful to treat it as an error in some future version (1.14? 1.15?).
Note that recent kernel prints a similar message: torvalds/linux@e7c0b59
However I think there are advantages to print the message as well in Docker:
It also shows information in
docker info.- How I did it
Please refer to the source of
pkg/fsutils.SupportsDType.- How to verify it
For example, XFS with ftype=0 prints this warning.
The warning should not be shown if ftype=1.
docker infoshowsf_type Supportedinformation:- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
TODO
Signed-off-by: Akihiro Suda suda.akihiro@lab.ntt.co.jp