From 9bca402ec3f651fb9017c20dc27601a548cc79e1 Mon Sep 17 00:00:00 2001 From: Petr Malik Date: Wed, 26 Oct 2016 18:01:41 -0400 Subject: Add configuration support for clusters Implement configuration attach and detach API for clusters. Implement rolling strategy for applying configuration changes (both attach and detach follow the same pattern). 1. Persist the changes on all nodes (leaving nodes in RESTART_REQUIRED state). 2. Update Trove records. 3. Apply changes dynamically via one or all node(s) if possible (and remove RESTART_REQUIRED flag from all nodes). Notes: The single instance implementation has been restructured (similar to above) such that it always leaves the instance in one of the three states: a) Unchanged b) Changes persisted but not applied (Instance has configuration attached but requires restart. It is safe restart manually or detach the group to avoid any changes) c) Changes persisted and applied (if possible) This implemenation should always leave the cluster (and each instance) in a consistent state. Runtime configuration will not be changed until it is first persisted on all nodes. If there is a failure during step 1) the cluster is still running the old configuration. Some instances may have new configuration persisted, but not applied. The cluster will not have configuration attached unless it can be applied to all nodes. The individual nodes will have configuration attached as soon as it is persisted on the guest. It is safe to retry, reapplying the same configuration on a node is noop. It is safe to detach. Removing configuration from nodes without one is a noop. It is safe to detach the configuration from individual nodes via single-instance API. It is safe to attach the configuration to remaining nodes via single-instance API and rerun cluster attach to update Trove records. If 3) fails for whatewer reason the instances are left in RESTART_REQUIRED state. It is safe to retry or detach configuration or restart the instances manually. Also fixed various minor cluster issues. Implements: blueprint cluster-configuration-groups Change-Id: I7c0a22c6a0287128d0c37e100589c78173fd9c1a --- tools/trove-pylint.config | 40 ++++++++++++++-------------------------- 1 file changed, 14 insertions(+), 26 deletions(-) (limited to 'tools') diff --git a/tools/trove-pylint.config b/tools/trove-pylint.config index fad15049..35207196 100644 --- a/tools/trove-pylint.config +++ b/tools/trove-pylint.config @@ -480,13 +480,13 @@ [ "trove/configuration/service.py", "E1101", - "Instance of 'BuiltInstance' has no 'update_overrides' member", + "Instance of 'BuiltInstance' has no 'update_configuration' member", "ConfigurationsController._refresh_on_all_instances" ], [ "trove/configuration/service.py", "no-member", - "Instance of 'BuiltInstance' has no 'update_overrides' member", + "Instance of 'BuiltInstance' has no 'update_configuration' member", "ConfigurationsController._refresh_on_all_instances" ], [ @@ -741,6 +741,18 @@ "Instance of 'Table' has no 'create_column' member", "upgrade" ], + [ + "trove/db/sqlalchemy/migrate_repo/versions/042_add_cluster_configuration_id.py", + "E1101", + "Instance of 'Table' has no 'create_column' member", + "upgrade" + ], + [ + "trove/db/sqlalchemy/migrate_repo/versions/042_add_cluster_configuration_id.py", + "no-member", + "Instance of 'Table' has no 'create_column' member", + "upgrade" + ], [ "trove/db/sqlalchemy/migration.py", "E0611", @@ -1287,18 +1299,6 @@ "Instance of 'BuiltInstance' has no 'restart' member", "Manager.restart" ], - [ - "trove/taskmanager/manager.py", - "E1101", - "Instance of 'BuiltInstance' has no 'unassign_configuration' member", - "Manager.unassign_configuration" - ], - [ - "trove/taskmanager/manager.py", - "E1101", - "Instance of 'BuiltInstance' has no 'update_overrides' member", - "Manager.update_overrides" - ], [ "trove/taskmanager/manager.py", "E1101", @@ -1371,18 +1371,6 @@ "Instance of 'BuiltInstance' has no 'restart' member", "Manager.restart" ], - [ - "trove/taskmanager/manager.py", - "no-member", - "Instance of 'BuiltInstance' has no 'unassign_configuration' member", - "Manager.unassign_configuration" - ], - [ - "trove/taskmanager/manager.py", - "no-member", - "Instance of 'BuiltInstance' has no 'update_overrides' member", - "Manager.update_overrides" - ], [ "trove/taskmanager/manager.py", "no-member", -- cgit v1.2.1