moby/registry
Cory Snider 742ac6e275 daemon: make config reloading more transactional
Config reloading has interleaved validations and other fallible
operations with mutating the live daemon configuration. The daemon
configuration could be left in a partially-reloaded state if any of the
operations returns an error. Mutating a copy of the configuration and
atomically swapping the config struct on success is not currently an
option as config values are not copyable due to the presence of
sync.Mutex fields. Introduce a two-phase commit protocol to defer any
mutations of the daemon state until after all fallible operations have
succeeded.

Reload transactions are not yet entirely hermetic. The platform
reloading logic for custom runtimes on *nix could still leave the
directory of generated runtime wrapper scripts in an indeterminate state
if an error is encountered.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-06-01 14:45:24 -04:00
..
resumable refactor: move from io/ioutil to io and os package 2021-08-27 14:56:57 +08:00
auth.go registry: use types/registry.AuthConfig 2022-07-29 23:05:20 +02:00
auth_test.go registry: use types/registry.AuthConfig 2022-07-29 23:05:20 +02:00
config.go registry: remove dependency on rootlesskit, add SetCertsDir() 2022-03-25 16:21:45 +01:00
config_test.go runconfig, oci, image, layer, distribution: fix empty-lines (revive) 2022-09-28 01:58:52 +02:00
config_unix.go remove pre-go1.17 build-tags 2023-05-19 20:38:51 +02:00
config_windows.go all: replace strings.Replace with strings.ReplaceAll 2022-05-09 19:45:40 +08:00
endpoint_test.go registry/search: pass User-Agent through headers 2023-03-21 14:41:29 +01:00
endpoint_v1.go registry/search: pass User-Agent through headers 2023-03-21 14:41:29 +01:00
errors.go registry: return "errdefs" compatible error types 2022-03-17 17:12:13 +01:00
registry.go registry: defaultService: use sync.RWMutex 2022-03-17 17:12:23 +01:00
registry_mock_test.go registry: use http.NewServeMux for tests instead of gorilla/mux 2022-12-19 13:25:43 +01:00
registry_test.go registry/search: pass User-Agent through headers 2023-03-21 14:41:29 +01:00
search.go registry/search: pass User-Agent through headers 2023-03-21 14:41:29 +01:00
search_test.go Move filtered registry search out of image service 2023-03-10 18:36:33 -05:00
service.go daemon: make config reloading more transactional 2023-06-01 14:45:24 -04:00
service_v2.go registry: return concrete service type 2023-03-10 18:38:08 -05:00
session.go Move filtered registry search out of image service 2023-03-10 18:36:33 -05:00
types.go registry: remove unneeded alias for api/types/registry import 2022-03-17 17:12:19 +01:00