Dashboards 等待另一次迁移

症状

OpenSearch Dashboards Pod 始终无法就绪,其日志会反复出现类似以下消息:

Another OpenSearch Dashboards instance appears to be migrating the index. Waiting for that migration to complete.
If no other OpenSearch Dashboards instance is attempting migrations, you can get past this message by deleting index .kibana_1 and restarting OpenSearch Dashboards.

原因

首次启动时,Dashboards 会在集群上创建其 saved-objects 索引(例如 .kibana_1)。如果此步骤被中断,例如 Pod 停止,或在 OpenSearch 响应前与集群的连接断开,该索引就会处于未完成状态并遗留下来。之后每次启动都会发现该索引,并等待一个没有其他实例在执行的迁移。

E1 仅在集群形成且临时 bootstrap Pod 已退出后才启动 Dashboards,并为 Dashboards 留出足够的启动时间来完成此步骤,因此新集群通常不会遇到此问题。

解决方法

  1. 确认同一集群中没有其他 Dashboards Pod 仍在启动。

  2. 删除消息中指定的索引。将 <password> 替换为 <cluster-name>-admin-password Secret 中的管理员密码,并针对集群的 REST 端口运行命令,例如通过 kubectl port-forward:

    curl -k -u 'admin:<password>' -X DELETE https://localhost:9200/.kibana_1
  3. 重启 Dashboards:

    kubectl -n my-namespace rollout restart deployment my-cluster-dashboards
WARNING

仅删除消息中指定的索引。删除该索引会移除其中存储的 saved objects,因此仅应在从未成功启动过的 Dashboards 实例上执行此操作。


OpenSearch® 是 LF Projects, LLC 的注册商标。