AE-2325: Snapshot registration fails while importing logs

Review Request #1296 — Created Jan. 9, 2026 and submitted — Latest diff uploaded

apoorva.sn
AMP
amp_3_7_2
AE-2325
mmiriam, ngurunathan, pmurugaiyan, pradeep, shuinvy

Problem

Elastic search was not up and was taking time to come up so snapshot registering was failing with the below error:

Elasticsearch... 2026-01-08 14:24:11 [5/9] Registering snapshot repository... {"error":{"root_cause":[{"type":"process_cluster_event_timeout_exception","reason":"failed to process cluster event (put_repository [amp_restore_repo_20260108_140250]) within 30s"}],"type":"process_cluster_event_timeout_exception","reason":"failed to process cluster event (put_repository [amp_restore_repo_20260108_140250]) within 30s"},"status":503} 2026-01-08 14:24:42 ERROR: Failed to register snapshot repository 2026-01-08 14:24:42 ERROR: Repository registration failed

Solution

For Waiting for Elasticsearch cluster to be ready and the retrying the repository registration (up to 5 attempts).
Also if there is a failure then extracting the message to show it as part of the API.
Corresponding UI changes need to be made

Tested on the setup where the issue was reproducible. The import is happening successsfully

Also the status response includes message when failure happens:

{
status: "Failed",
failed_at: "2026-01-08 23:24:22",
message: "Repository registration failed"
}

    Loading...