-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Closed
Labels
Feature:Index ManagementIndex and index templates UIIndex and index templates UITeam:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experience
Description
In order to build the table of indices in Index Management, we make 2 requests to Elasticsearch
GET _cat/indices
GET _cat/aliases
But there is a bug in ES (elastic/elasticsearch#46856) that requires the manage privilege on all indices ("*") in order to execute the _cat/aliases. Otherwise it throws the following error
{
"error" : {
"root_cause" : [
{
"type" : "index_not_found_exception",
"reason" : "no such index",
"index_uuid" : "_na_",
"index" : "_all"
}
],
"type" : "index_not_found_exception",
"reason" : "no such index",
"index_uuid" : "_na_",
"index" : "_all"
},
"status" : 404
}
This means that, if a user does not have that privilege, the table does not render any indices and the following toast message is displayed
As displaying the aliases information is an enrichment of the index data, we should make our UI resilient to the fact that aliases haven't been fetched.
// x-pack/plugins/index_management/server/lib/fetch_indices.js
export const fetchIndices = async (callWithRequest, isEsError, indexNames) => {
try {
// We should **not** throw if this fetchAliases call fails
const aliases = await fetchAliases(callWithRequest);
const hits = await fetchIndicesCall(callWithRequest, indexNames);And then update the UI accordingly to display or not the aliases information.
cjcenizal
Metadata
Metadata
Assignees
Labels
Feature:Index ManagementIndex and index templates UIIndex and index templates UITeam:Kibana ManagementDev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more t//bugFixes for quality problems that affect the customer experienceFixes for quality problems that affect the customer experience
