-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add d_type warning to docker info, and optimize output #31290
Conversation
The overlay(2) drivers were moved up in the list of storage drivers, and are known to have problems if the backing filesystem does not support d_type. Commit 2e20e63 added a warning, which is logged in the daemon logs, however, many users do not check those logs, and may overlook this warning. This patch adds the same warning to the output of `docker info` so that the warning is more easily found. In addition, the output of warnings printed by `docker info` is optimized, by; - moving all warnings to the _end_ of the output, instead of mixing them with the regular output - wrapping the storage-driver warnings, so that they are more easily readable Example output with this patch applied ============================================ devicemapper using loopback devices: ... Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device. WARNING: bridge-nf-call-iptables is disabled WARNING: bridge-nf-call-ip6tables is disabled overlay2 on xfs without d_type support; ... Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false WARNING: overlay2: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior. Reformat the filesystem with ftype=1 to enable d_type support. Running without d_type support will not be supported in future releases. WARNING: bridge-nf-call-iptables is disabled Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
fmt.Fprintln(dockerCli.Err(), "WARNING: bridge-nf-call-iptables is disabled") | ||
} | ||
if !info.BridgeNfIP6tables { | ||
fmt.Fprintln(dockerCli.Err(), "WARNING: bridge-nf-call-ip6tables is disabled") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I'm thinking of moving generating these warnings on the daemon side, and return them through the API. Doing so allows API clients to make use of these warnings, and also have each platform (windows, linux) to return platform-specific warnings, without requiring the client to have this knowledge.
The current code would still be needed for backward-compatibility of course, so it may introduce some duplication
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🐸
@thaJeztah why the cherry-pick here ? it's already in 17.04.0-rc1 |
@vieux yes, looks like it was to consider it for 17.03.1 |
add d_type warning to docker info, and optimize output
- What I did
The overlay(2) drivers were moved up in the list of storage drivers, and are known to have problems if the backing filesystem does not support d_type.
Commit 2e20e63 added a warning, which is logged in the daemon logs, however, many users do not check those logs, and may overlook this warning.
This patch adds the same warning to the output of
docker info
so that the warning is more easily found.In addition, the output of warnings printed by
docker info
is optimized, by;Example output with this patch applied
devicemapper using loopback devices:
overlay2 on xfs without d_type support;
- Description for the changelog
Add warning to
docker info
if the overlay(2) storage driver is used , and the backing filesystem does not supportd_type
.- A picture of a cute animal (not mandatory but encouraged)