Skip to content

Hide ILM & SLM history aliases #53564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ static void ensureHistoryIndex(Client client, ClusterState state, ActionListener
client.admin().indices().prepareCreate(initialHistoryIndexName)
.setWaitForActiveShards(1)
.addAlias(new Alias(SLM_HISTORY_ALIAS)
.writeIndex(true))
.writeIndex(true)
.isHidden(true))
.execute(new ActionListener<>() {
@Override
public void onResponse(CreateIndexResponse response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ public class SnapshotLifecycleTemplateRegistry extends IndexTemplateRegistry {

public static final String SLM_POLICY_NAME = "slm-history-ilm-policy";

@Override
protected boolean requiresMasterNode() {
return true;
}

public static final IndexTemplateConfig TEMPLATE_SLM_HISTORY = new IndexTemplateConfig(
SLM_TEMPLATE_NAME,
"/slm-history.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static void ensureHistoryIndex(Client client, ClusterState state, ActionListener
.setSettings((Map<String, ?>) templateAsMap.get("settings"))
.setMapping((Map<String, Object>) templateAsMap.get("mappings"))
.setWaitForActiveShards(1)
.addAlias(new Alias(ILM_HISTORY_ALIAS).writeIndex(true))
.addAlias(new Alias(ILM_HISTORY_ALIAS).writeIndex(true).isHidden(true))
.execute(new ActionListener<>() {
@Override
public void onResponse(CreateIndexResponse response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public class ILMHistoryTemplateRegistry extends IndexTemplateRegistry {

public static final String ILM_POLICY_NAME = "ilm-history-ilm-policy";

@Override
protected boolean requiresMasterNode() {
return true;
}

public static final IndexTemplateConfig TEMPLATE_ILM_HISTORY = new IndexTemplateConfig(
ILM_TEMPLATE_NAME,
"/ilm-history.json",
Expand Down