22f303e422
When reading through some bug reports, I noticed that the error-message for
unsupported storage drivers is not very informative, as it does not include
the actual storage driver. Some of these errors are used as sentinel errors
internally, so improving the error returned by graphdriver.New() may need
some additional work, but this patch makes a start by including the name
of the graphdriver (if set) in the error-message.
Before this patch:
dockerd --storage-driver=foobar
...
failed to start daemon: error initializing graphdriver: driver not supported
With this patch:
dockerd --storage-driver=foobar
...
failed to start daemon: error initializing graphdriver: driver not supported: foobar
It's worth noting that there may be code "in the wild" that perform string-
matching on this error (e.g. [balena][1]), which is why I included the name as a separate "component"
in the output, to allow matching parts of the error.
[1]:
|
||
---|---|---|
.. | ||
empty.go | ||
empty_test.go | ||
filestore.go | ||
filestore_test.go | ||
layer.go | ||
layer_store.go | ||
layer_store_windows.go | ||
layer_test.go | ||
layer_unix.go | ||
layer_unix_test.go | ||
layer_windows.go | ||
migration.go | ||
migration_test.go | ||
mount_test.go | ||
mounted_layer.go | ||
ro_layer.go | ||
ro_layer_windows.go |