1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/daemon/graphdriver
Sebastiaan van Stijn 3853eb59d1
daemon: require storage-driver to be set if the driver is deprecated
Previously, we only printed a warning if a storage driver was deprecated. The
intent was to continue supporting these drivers, to allow users to migrate
to a different storage driver.

This patch changes the behavior; if the user has no storage driver specified
in the daemon configuration (so if we try to detect the previous storage
driver based on what's present in /var/lib/docker), we now produce an error,
informing the user that the storage driver is deprecated (and to be removed),
as well as instructing them to change the daemon configuration to explicitly
select the storage driver (to allow them to migrate).

This should make the deprecation more visible; this will be disruptive, but
it's better to have the failure happening *now* (while the drivers are still
there), than for users to discover the storage driver is no longer there
(which would require them to *downgrade* the daemon in order to migrate
to a different driver).

With this change, `docker info` includes a link in the warnings that:

    / # docker info
    Client:
    Context:    default
    Debug Mode: false

    Server:
    ...
    Live Restore Enabled: false

    WARNING: The overlay 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/

When starting the daemon without a storage driver configured explicitly, but
previous state was using a deprecated driver, the error is both logged and
printed:

    ...
    ERRO[2022-03-25T14:14:06.032014013Z] [graphdriver] prior storage driver overlay is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/ for more information
    ...
    failed to start daemon: error initializing graphdriver: prior storage driver overlay is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/ for more information

When starting the daemon and explicitly configuring it with a deprecated storage
driver:

    WARN[2022-03-25T14:15:59.042335412Z] [graphdriver] WARNING: the overlay storage-driver is deprecated and will be removed in a future release; visit https://docs.docker.com/go/storage-driver/ for more information

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-25 15:22:06 +01:00
..
aufs Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
btrfs Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
copy Use syscall.Timespec.Unix 2022-01-03 16:51:02 +01:00
devmapper Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
fuse-overlayfs Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
graphtest refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
overlay Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
overlay2 Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
overlayutils refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
register Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
vfs Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
windows Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
zfs Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
counter.go graphdriver: Fix RefCounter memory leak 2018-02-09 10:26:06 +08:00
driver.go daemon: require storage-driver to be set if the driver is deprecated 2022-03-25 15:22:06 +01:00
driver_freebsd.go Add canonical import comment 2018-02-05 16:51:57 -05:00
driver_linux.go storage-driver: promote overlay2, make Btrfs and ZFS opt-in 2021-07-21 14:53:56 +02:00
driver_test.go refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
driver_unsupported.go Update to Go 1.17.0, and gofmt with Go 1.17 2021-08-24 23:33:27 +02:00
driver_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
errors.go Add canonical import comment 2018-02-05 16:51:57 -05:00
fsdiff.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
plugin.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
proxy.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00
proxy_test.go Finish refactor of UID/GID usage to a new struct 2022-03-14 16:28:57 -04:00