OpenSearch/x-pack/plugin
Armin Braun 25cc8e3663
Fix RepoCleanup not Removed on Master-Failover (#49217) (#49239)
The logic for `cleanupInProgress()` was backwards everywhere (method itself and
all but one user). Also, we weren't checking it when removing a repository.

This lead to a bug (in the one spot that didn't use the method backwards) that prevented
the cleanup cluster state entry from ever being removed from the cluster state if master
failed over during the cleanup process.

This change corrects the backwards logic, adds a test that makes sure the cleanup
is always removed and adds a check that prevents repository removal during cleanup
to the repositories service.

Also, the failure handling logic in the cleanup action was broken. Repeated invocation would lead to the cleanup being removed from the cluster state even if it was in progress. Fixed by adding a flag that indicates whether or not any removal of the cleanup task from the cluster state must be executed. Sorry for mixing this in here, but I had to fix it in the same PR, as the first test (for master-failover) otherwise would often just delete the blocked cleanup action as a result of a transport master action retry.
2019-11-18 16:44:09 +01:00
..
analytics [7.x] Implement stats aggregation for string terms (#49097) 2019-11-15 14:36:21 +02:00
ccr AutoFollowIT should not rely on assertBusy but should use latches instead (#49141) 2019-11-18 09:40:56 +01:00
core Lower minimum model memory limit value from 1MB to 1kB. (#49227) (#49242) 2019-11-18 14:58:20 +01:00
deprecation Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
enrich Reuse collected cluster state in EnrichPolicyRunner (#48488) (#49100) 2019-11-14 14:14:39 -05:00
frozen-indices Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
graph Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
ilm Fix RepoCleanup not Removed on Master-Failover (#49217) (#49239) 2019-11-18 16:44:09 +01:00
logstash Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
mapper-flattened Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
ml Lower minimum model memory limit value from 1MB to 1kB. (#49227) (#49242) 2019-11-18 14:58:20 +01:00
monitoring [7.x] Validate monitoring password at parse time (#49083) 2019-11-14 09:39:28 -06:00
rollup Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
search-business-rules Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
security Audit log filter and marker (#49145) 2019-11-15 08:44:09 -05:00
spatial Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
sql Clean up static web server in sql-client tests (#49187) (#49197) 2019-11-15 13:02:21 -07:00
src/test Throw an exception when memory usage estimation endpoint encounters empty data frame. (#49143) (#49164) 2019-11-18 07:52:57 +01:00
transform [Transform] improve error handling of script errors (#48887) 2019-11-18 10:24:39 +01:00
vectors Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
voting-only-node Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
watcher Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00
build.gradle Apply 2-space indent to all gradle scripts (#49071) 2019-11-14 11:01:23 +00:00