daemon: info: fillDriverInfo() get driver-name from ImageService

Make the ImageService the source of truth for the storage-driver
that's used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-08-09 11:04:47 +02:00
parent 8dd14509d7
commit c6eab4077a
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 5 additions and 5 deletions

View File

@ -120,18 +120,18 @@ func (daemon *Daemon) SystemVersion() types.Version {
}
func (daemon *Daemon) fillDriverInfo(v *types.Info) {
v.Driver = daemon.imageService.StorageDriver()
v.DriverStatus = daemon.imageService.LayerStoreStatus()
const warnMsg = `
WARNING: The %s storage-driver is deprecated, and will be removed in a future release.
Refer to the documentation for more information: https://docs.docker.com/go/storage-driver/`
switch daemon.graphDriver {
switch v.Driver {
case "aufs", "devicemapper", "overlay":
v.Warnings = append(v.Warnings, fmt.Sprintf(warnMsg, daemon.graphDriver))
v.Warnings = append(v.Warnings, fmt.Sprintf(warnMsg, v.Driver))
}
v.Driver = daemon.graphDriver
v.DriverStatus = daemon.imageService.LayerStoreStatus()
fillDriverWarnings(v)
}