Adapt nodes recovery per node source (#3088)
* Specify nodes recovery per node source - add nodesRecoverable attribute of the node source, persisted in database - duplicate the REST endpoint createNodeSource, add boolean nodesRecoverable at the end of parameters - check this attribute along with the global nodes recovery property, but the global property is considered in priority - when task runs, check whether task runs on recoverable node, if not, do not let it rebind to a new task terminate notification - when the scheduler is started, reset to pending the tasks that are running on nodes that cannot be recovered - remove specific cases for the default DefaultInfrastructureManagaer created and for the default LocalInfrastrucure * Update createns CLI command - add optional String parameter to specify if the node source nodes are recoverable upon scheduler crash. User should now pass any case sensitive falvours of 'true' to have recoverable nodes, or any other string to disable nodes recoverability of the new node source. - add new test class for CLI createns * Apply node source recovery when nodes recovery is disabled - when nodes recovery is disabled, node source recovery should still be applied, to enable the nodes of the node source to be recreated. Before this commit the nodes recovery property was checked before recovering node sources, hence node sources could not be recovered. - add four test that consider whether nodes recovery is globally activated + whether nodes recovery per node source is activated. The nodes must not be recreated during recovery only in the case where the global nodes recovery and the nodes recovery of the node source are both activated (assuming that the nodes are still alive). The other combination should lead to a recreation of the nodes. - revert SchedulerTasksStateRecoverIntegrationTest and TestLoadSchedulerClientState to the verification they did before the task recovery was introduced, because the nodes recovery is now disabled for the node source used in standard tests. - apply sonar fixes
parent
026499bb
Please register or sign in to comment