mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
api: client: info: print a warning if dm is using a loopback file
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
ff0e33824a
commit
a2c4c0cd3a
1 changed files with 6 additions and 0 deletions
|
@ -30,7 +30,13 @@ func (cli *DockerCli) CmdInfo(args ...string) error {
|
||||||
if info.DriverStatus != nil {
|
if info.DriverStatus != nil {
|
||||||
for _, pair := range info.DriverStatus {
|
for _, pair := range info.DriverStatus {
|
||||||
fmt.Fprintf(cli.out, " %s: %s\n", pair[0], pair[1])
|
fmt.Fprintf(cli.out, " %s: %s\n", pair[0], pair[1])
|
||||||
|
|
||||||
|
// print a warning if devicemapper is using a loopback file
|
||||||
|
if pair[0] == "Data loop file" {
|
||||||
|
fmt.Fprintf(cli.err, " WARNING: Usage of loopback devices is strongly discouraged for production use. Either use `--storage-opt dm.thinpooldev` or use `--storage-opt dm.no_warn_on_loop_devices=true` to suppress this warning.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ioutils.FprintfIfNotEmpty(cli.out, "Execution Driver: %s\n", info.ExecutionDriver)
|
ioutils.FprintfIfNotEmpty(cli.out, "Execution Driver: %s\n", info.ExecutionDriver)
|
||||||
ioutils.FprintfIfNotEmpty(cli.out, "Logging Driver: %s\n", info.LoggingDriver)
|
ioutils.FprintfIfNotEmpty(cli.out, "Logging Driver: %s\n", info.LoggingDriver)
|
||||||
|
|
Loading…
Reference in a new issue