@@ -460,10 +460,7 @@ func printServerWarnings(stdErr io.Writer, info *dockerInfo) {
460460 }
461461 if len (info .Warnings ) > 0 {
462462 fprintln (stdErr , strings .Join (info .Warnings , "\n " ))
463- return
464463 }
465- // daemon didn't return warnings. Fallback to old behavior
466- printServerWarningsLegacy (stdErr , * info .Info )
467464}
468465
469466// printSecurityOptionsWarnings prints warnings based on the security options
@@ -490,48 +487,6 @@ func printSecurityOptionsWarnings(stdErr io.Writer, info system.Info) {
490487 }
491488}
492489
493- // printServerWarningsLegacy generates warnings based on information returned by the daemon.
494- //
495- // Deprecated: warnings are now generated by the daemon, and returned in
496- // info.Warnings. This function is used to provide backward compatibility with
497- // daemons that do not provide these warnings. No new warnings should be added
498- // here.
499- func printServerWarningsLegacy (stdErr io.Writer , info system.Info ) {
500- if info .OSType == "windows" {
501- return
502- }
503- if ! info .MemoryLimit {
504- fprintln (stdErr , "WARNING: No memory limit support" )
505- }
506- if ! info .SwapLimit {
507- fprintln (stdErr , "WARNING: No swap limit support" )
508- }
509- if ! info .OomKillDisable && info .CgroupVersion != "2" {
510- fprintln (stdErr , "WARNING: No oom kill disable support" )
511- }
512- if ! info .CPUCfsQuota {
513- fprintln (stdErr , "WARNING: No cpu cfs quota support" )
514- }
515- if ! info .CPUCfsPeriod {
516- fprintln (stdErr , "WARNING: No cpu cfs period support" )
517- }
518- if ! info .CPUShares {
519- fprintln (stdErr , "WARNING: No cpu shares support" )
520- }
521- if ! info .CPUSet {
522- fprintln (stdErr , "WARNING: No cpuset support" )
523- }
524- if ! info .IPv4Forwarding {
525- fprintln (stdErr , "WARNING: IPv4 forwarding is disabled" )
526- }
527- if ! info .BridgeNfIptables {
528- fprintln (stdErr , "WARNING: bridge-nf-call-iptables is disabled" )
529- }
530- if ! info .BridgeNfIP6tables {
531- fprintln (stdErr , "WARNING: bridge-nf-call-ip6tables is disabled" )
532- }
533- }
534-
535490func formatInfo (output io.Writer , info dockerInfo , format string ) error {
536491 if format == formatter .JSONFormatKey {
537492 format = formatter .JSONFormat
0 commit comments