Skip to content

Commit 93787d2

Browse files
committed
rebase
1 parent a4197ac commit 93787d2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

curator/actions.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -2309,11 +2309,13 @@ def do_action(self):
23092309
self.loggit.info('Shrinking index "{0}" to "{1}" with settings: {2}, wait_for_active_shards={3}'.format(idx, target, self.body, self.wait_for_active_shards))
23102310
try:
23112311

2312+
23122313
self.client.indices.shrink(index=idx, params=self.shrink_copy_settings, target=target, body=self.body, wait_for_active_shards=self.wait_for_active_shards)
2313-
self.loggit.debug('unblocking writes on {0}'.format(target))
2314-
self._unblock_writes(target)
2315-
self.loggit.debug('undoing route reqs for {0}'.format(target))
2316-
self.route_index(target, 'require', '_name', '')
2314+
if utils.get_version(self.client) >= (6,4,3):
2315+
self.loggit.debug('unblocking writes on {0}'.format(target))
2316+
self._unblock_writes(target)
2317+
self.loggit.debug('undoing route reqs for {0}'.format(target))
2318+
self.route_index(target, 'require', '_name', '')
23172319
# Wait for it to complete
23182320
if self.wfc:
23192321
self.loggit.debug('Wait for shards to complete allocation for index: {0}'.format(target))

0 commit comments

Comments
 (0)