in curator/actions/reindex.py [0:0]
def _post_run_quick_check(self, index_name, task_id):
# Check whether any documents were processed
# if no documents processed, the target index "dest" won't exist
processed_items = self.get_processed_items(task_id)
if processed_items == 0:
msg = (
f'No items were processed. Will not check if target index '
f'"{index_name}" exists'
)
self.loggit.info(msg)
else:
# Verify the destination index is there after the fact
index_exists = self.client.indices.exists(index=index_name)
alias_instead = self.client.indices.exists_alias(name=index_name)
if not index_exists and not alias_instead:
# pylint: disable=logging-fstring-interpolation
self.loggit.error(
f'The index described as "{index_name}" was not found after the '
f'reindex operation. Check Elasticsearch logs for more '
f'information.'
)
if self.remote:
# pylint: disable=logging-fstring-interpolation
self.loggit.error(
f'Did you forget to add "reindex.remote.whitelist: '
f'{self.remote_host}:{self.remote_port}" to the '
f'elasticsearch.yml file on the "dest" node?'
)
raise FailedExecution(
f'Reindex failed. The index or alias identified by "{index_name}" '
f'was not found.'
)