Repository: moby/moby
File: daemon/info_unix.go (Go)

Code before:
				v.Warnings = append(v.Warnings, "WARNING: No io.max (wbps) support")
			} else {
				v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_bps_device support")
			}
		}
		if !sysInfo.BlkioReadIOpsDevice {
			if v.CgroupVersion == "2" {
				v.Warnings = append(v.Warnings, "WARNING: No io.max (riops) support")
			} else {
				v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_iops_device support")
			}
		}
		if !sysInfo.BlkioWriteIOpsDevice {
			if v.CgroupVersion == "2" {
				v.Warnings = append(v.Warnings, "WARNING: No io.max (wiops) support")
			} else {
				v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_iops_device support")
			}
		}
	}
	if !v.IPv4Forwarding {
		v.Warnings = append(v.Warnings, "WARNING: IPv4 forwarding is disabled")
	}
	// Env-var belonging to the bridge driver, disables use of the iptables "raw" table.
	if os.Getenv("DOCKER_INSECURE_NO_IPTABLES_RAW") == "1" {
		v.Warnings = append(v.Warnings, "WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW=1")
	}
	return nil
}

func (daemon *Daemon) fillPlatformVersion(ctx context.Context, v *types.Version, cfg *configStore) error {
	if err := daemon.populateContainerdVersion(ctx, v); err != nil {
		return err
	}

	if err := populateRuncVersion(cfg, v); err != nil {
		log.G(ctx).WithError(err).Warn("Failed to retrieve default runtime version")
	}

	if err := populateInitVersion(ctx, cfg, v); err != nil {
		return err
	}

	if err := daemon.fillRootlessVersion(ctx, v); err != nil {
		if errdefs.IsContext(err) {
			return err
		}
		log.G(ctx).WithError(err).Warn("Failed to fill rootless version")
	}
	return nil
}

Review comment (suggestion):
If we _do_ want to add some words around it, perhaps something like;


```suggestion
		v.Warnings = append(v.Warnings, "WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW is set")
```

```suggestion
		v.Warnings = append(v.Warnings, "WARNING: raw iptables rules are skipped because DOCKER_INSECURE_NO_IPTABLES_RAW is set")
```


The  'DOCKER_INSECURE_NO_IPTABLES_RAW  is set` may be slightly nicer to indicate what's the case, but not sure about the "raw iptable rules are skipped", not sure if that's providing much context on its own.

Code after:
				v.Warnings = append(v.Warnings, "WARNING: No io.max (wbps) support")
			} else {
				v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_bps_device support")
			}
		}
		if !sysInfo.BlkioReadIOpsDevice {
			if v.CgroupVersion == "2" {
				v.Warnings = append(v.Warnings, "WARNING: No io.max (riops) support")
			} else {
				v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.read_iops_device support")
			}
		}
		if !sysInfo.BlkioWriteIOpsDevice {
			if v.CgroupVersion == "2" {
				v.Warnings = append(v.Warnings, "WARNING: No io.max (wiops) support")
			} else {
				v.Warnings = append(v.Warnings, "WARNING: No blkio throttle.write_iops_device support")
			}
		}
	}
	if !v.IPv4Forwarding {
		v.Warnings = append(v.Warnings, "WARNING: IPv4 forwarding is disabled")
	}
	// Env-var belonging to the bridge driver, disables use of the iptables "raw" table.
	if os.Getenv("DOCKER_INSECURE_NO_IPTABLES_RAW") == "1" {
		v.Warnings = append(v.Warnings, "WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW is set")
	}
	return nil
}

func (daemon *Daemon) fillPlatformVersion(ctx context.Context, v *types.Version, cfg *configStore) error {
	if err := daemon.populateContainerdVersion(ctx, v); err != nil {
		return err
	}

	if err := populateRuncVersion(cfg, v); err != nil {
		log.G(ctx).WithError(err).Warn("Failed to retrieve default runtime version")
	}

	if err := populateInitVersion(ctx, cfg, v); err != nil {
		return err
	}

	if err := daemon.fillRootlessVersion(ctx, v); err != nil {
		if errdefs.IsContext(err) {
			return err
		}
		log.G(ctx).WithError(err).Warn("Failed to fill rootless version")
	}
	return nil
}