742ac6e275
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> |
||
---|---|---|
.. | ||
resumable | ||
auth.go | ||
auth_test.go | ||
config.go | ||
config_test.go | ||
config_unix.go | ||
config_windows.go | ||
endpoint_test.go | ||
endpoint_v1.go | ||
errors.go | ||
registry.go | ||
registry_mock_test.go | ||
registry_test.go | ||
search.go | ||
search_test.go | ||
service.go | ||
service_v2.go | ||
session.go | ||
types.go |