Jelajahi Sumber

Remove data_frozen node role (tier) and frozen ILM phase (#62403)

With the differentiation between searchable snapshots on the cold phase and searchable snapshots on
the frozen phase not implemented, there is no need to have a separate phase/tier for now. This
commit removes the frozen phase and tier, which can be added back at a later time.

(this tier was never in a released version, so this is not a breaking change)

Relates to #60983
Relates to #60994
Relates to #60848
Lee Hinman 5 tahun lalu
induk
melakukan
5263ca01d4

+ 1 - 1
docs/reference/ilm/actions/ilm-allocate.asciidoc

@@ -2,7 +2,7 @@
 [[ilm-allocate]]
 [[ilm-allocate]]
 === Allocate
 === Allocate
 
 
-Phases allowed: warm, cold, frozen.
+Phases allowed: warm, cold.
 
 
 Updates the index settings to change which nodes are allowed to host the index shards
 Updates the index settings to change which nodes are allowed to host the index shards
 and change the number of replicas.
 and change the number of replicas.

+ 1 - 1
docs/reference/ilm/actions/ilm-freeze.asciidoc

@@ -2,7 +2,7 @@
 [[ilm-freeze]]
 [[ilm-freeze]]
 === Freeze
 === Freeze
 
 
-Phases allowed: cold, frozen.
+Phases allowed: cold.
 
 
 <<frozen-indices, Freezes>> an index to minimize its memory footprint.
 <<frozen-indices, Freezes>> an index to minimize its memory footprint.
 
 

+ 1 - 1
docs/reference/ilm/actions/ilm-searchable-snapshot.asciidoc

@@ -2,7 +2,7 @@
 [[ilm-searchable-snapshot]]
 [[ilm-searchable-snapshot]]
 === Searchable snapshot
 === Searchable snapshot
 
 
-Phases allowed: cold, frozen.
+Phases allowed: cold.
 
 
 Takes a snapshot of the managed index in the configured repository
 Takes a snapshot of the managed index in the configured repository
 and mounts it as a searchable snapshot.
 and mounts it as a searchable snapshot.

+ 1 - 1
docs/reference/ilm/actions/ilm-set-priority.asciidoc

@@ -2,7 +2,7 @@
 [[ilm-set-priority]]
 [[ilm-set-priority]]
 === Set priority
 === Set priority
 
 
-Phases allowed: hot, warm, cold, frozen.
+Phases allowed: hot, warm, cold.
 
 
 Sets the <<recovery-prioritization, priority>> of the index as
 Sets the <<recovery-prioritization, priority>> of the index as
 soon as the policy enters the hot, warm, or cold phase. 
 soon as the policy enters the hot, warm, or cold phase. 

+ 1 - 1
docs/reference/ilm/actions/ilm-unfollow.asciidoc

@@ -2,7 +2,7 @@
 [[ilm-unfollow]]
 [[ilm-unfollow]]
 === Unfollow
 === Unfollow
 
 
-Phases allowed: hot, warm, cold, frozen.
+Phases allowed: hot, warm, cold.
 
 
 Converts a {ref}/ccr-apis.html[{ccr-init}] follower index into a regular index. 
 Converts a {ref}/ccr-apis.html[{ccr-init}] follower index into a regular index. 
 This enables the shrink, rollover, and searchable snapshot actions
 This enables the shrink, rollover, and searchable snapshot actions

+ 1 - 12
docs/reference/ilm/ilm-index-lifecycle.asciidoc

@@ -6,16 +6,13 @@
 <titleabbrev>Index lifecycle</titleabbrev>
 <titleabbrev>Index lifecycle</titleabbrev>
 ++++
 ++++
 
 
-{ilm-init} defines five index lifecycle _phases_:
+{ilm-init} defines four index lifecycle _phases_:
 
 
 * **Hot**: The index is actively being updated and queried.
 * **Hot**: The index is actively being updated and queried.
 * **Warm**: The index is no longer being updated but is still being queried.
 * **Warm**: The index is no longer being updated but is still being queried.
 * **Cold**: The index is no longer being updated and is seldom queried. The
 * **Cold**: The index is no longer being updated and is seldom queried. The
 information still needs to be searchable, but it's okay if those queries are
 information still needs to be searchable, but it's okay if those queries are
 slower.
 slower.
-* **Frozen**: The index is no longer being updated and is seldom queried. The
-queries are performing longer-term analyses for which a slower response is
-acceptable.
 * **Delete**: The index is no longer needed and can safely be removed.
 * **Delete**: The index is no longer needed and can safely be removed.
 
 
 An index's _lifecycle policy_ specifies which phases 
 An index's _lifecycle policy_ specifies which phases 
@@ -97,14 +94,6 @@ the rollover criteria, it could be 20 minutes before the rollover is complete.
 ifdef::permanently-unreleased-branch[]
 ifdef::permanently-unreleased-branch[]
   - <<ilm-searchable-snapshot, Searchable Snapshot>>
   - <<ilm-searchable-snapshot, Searchable Snapshot>>
 endif::[]
 endif::[]
-* Frozen
-  - <<ilm-set-priority-action,Set Priority>>
-  - <<ilm-unfollow-action,Unfollow>>
-  - <<ilm-allocate,Allocate>>
-  - <<ilm-freeze,Freeze>>
-ifdef::permanently-unreleased-branch[]
-  - <<ilm-searchable-snapshot, Searchable Snapshot>>
-endif::[]
 * Delete
 * Delete
   - <<ilm-wait-for-snapshot-action,Wait For Snapshot>>
   - <<ilm-wait-for-snapshot-action,Wait For Snapshot>>
   - <<ilm-delete,Delete>>
   - <<ilm-delete,Delete>>

+ 2 - 25
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/DataTier.java

@@ -20,7 +20,7 @@ import java.util.Set;
 
 
 /**
 /**
  * The {@code DataTier} class encapsulates the formalization of the "content",
  * The {@code DataTier} class encapsulates the formalization of the "content",
- * "hot", "warm", "cold", and "frozen" tiers as node roles. In contains the
+ * "hot", "warm", and "cold" tiers as node roles. In contains the
  * roles themselves as well as helpers for validation and determining if a node
  * roles themselves as well as helpers for validation and determining if a node
  * has a tier configured.
  * has a tier configured.
  *
  *
@@ -33,7 +33,6 @@ public class DataTier {
     public static final String DATA_HOT = "data_hot";
     public static final String DATA_HOT = "data_hot";
     public static final String DATA_WARM = "data_warm";
     public static final String DATA_WARM = "data_warm";
     public static final String DATA_COLD = "data_cold";
     public static final String DATA_COLD = "data_cold";
-    public static final String DATA_FROZEN = "data_frozen";
 
 
     /**
     /**
      * Returns true if the given tier name is a valid tier
      * Returns true if the given tier name is a valid tier
@@ -42,8 +41,7 @@ public class DataTier {
         return DATA_CONTENT.equals(tierName) ||
         return DATA_CONTENT.equals(tierName) ||
             DATA_HOT.equals(tierName) ||
             DATA_HOT.equals(tierName) ||
             DATA_WARM.equals(tierName) ||
             DATA_WARM.equals(tierName) ||
-            DATA_COLD.equals(tierName) ||
-            DATA_FROZEN.equals(tierName);
+            DATA_COLD.equals(tierName);
     }
     }
 
 
     /**
     /**
@@ -131,23 +129,6 @@ public class DataTier {
         }
         }
     };
     };
 
 
-    public static DiscoveryNodeRole DATA_FROZEN_NODE_ROLE = new DiscoveryNodeRole("data_frozen", "f") {
-        @Override
-        public boolean isEnabledByDefault(final Settings settings) {
-            return false;
-        }
-
-        @Override
-        public Setting<Boolean> legacySetting() {
-            return null;
-        }
-
-        @Override
-        public boolean canContainData() {
-            return true;
-        }
-    };
-
     public static boolean isContentNode(DiscoveryNode discoveryNode) {
     public static boolean isContentNode(DiscoveryNode discoveryNode) {
         return discoveryNode.getRoles().contains(DATA_CONTENT_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
         return discoveryNode.getRoles().contains(DATA_CONTENT_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
     }
     }
@@ -164,10 +145,6 @@ public class DataTier {
         return discoveryNode.getRoles().contains(DATA_COLD_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
         return discoveryNode.getRoles().contains(DATA_COLD_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
     }
     }
 
 
-    public static boolean isFrozenNode(DiscoveryNode discoveryNode) {
-        return discoveryNode.getRoles().contains(DATA_FROZEN_NODE_ROLE) || discoveryNode.getRoles().contains(DiscoveryNodeRole.DATA_ROLE);
-    }
-
     /**
     /**
      * This setting provider injects the setting allocating all newly created indices with
      * This setting provider injects the setting allocating all newly created indices with
      * {@code index.routing.allocation.include._tier: "data_hot"} unless the user overrides the
      * {@code index.routing.allocation.include._tier: "data_hot"} unless the user overrides the

+ 1 - 2
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/XPackPlugin.java

@@ -382,8 +382,7 @@ public class XPackPlugin extends XPackClientPlugin implements ExtensiblePlugin,
             DataTier.DATA_CONTENT_NODE_ROLE,
             DataTier.DATA_CONTENT_NODE_ROLE,
             DataTier.DATA_HOT_NODE_ROLE,
             DataTier.DATA_HOT_NODE_ROLE,
             DataTier.DATA_WARM_NODE_ROLE,
             DataTier.DATA_WARM_NODE_ROLE,
-            DataTier.DATA_COLD_NODE_ROLE,
-            DataTier.DATA_FROZEN_NODE_ROLE));
+            DataTier.DATA_COLD_NODE_ROLE));
     }
     }
 
 
     @Override
     @Override

+ 1 - 12
x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/TimeseriesLifecycleType.java

@@ -34,22 +34,18 @@ public class TimeseriesLifecycleType implements LifecycleType {
     static final String HOT_PHASE = "hot";
     static final String HOT_PHASE = "hot";
     static final String WARM_PHASE = "warm";
     static final String WARM_PHASE = "warm";
     static final String COLD_PHASE = "cold";
     static final String COLD_PHASE = "cold";
-    static final String FROZEN_PHASE = "frozen";
     static final String DELETE_PHASE = "delete";
     static final String DELETE_PHASE = "delete";
-    static final List<String> VALID_PHASES = Arrays.asList(HOT_PHASE, WARM_PHASE, COLD_PHASE, FROZEN_PHASE, DELETE_PHASE);
+    static final List<String> VALID_PHASES = Arrays.asList(HOT_PHASE, WARM_PHASE, COLD_PHASE, DELETE_PHASE);
     static final List<String> ORDERED_VALID_HOT_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, RolloverAction.NAME,
     static final List<String> ORDERED_VALID_HOT_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, RolloverAction.NAME,
         ForceMergeAction.NAME);
         ForceMergeAction.NAME);
     static final List<String> ORDERED_VALID_WARM_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, ReadOnlyAction.NAME,
     static final List<String> ORDERED_VALID_WARM_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, ReadOnlyAction.NAME,
         AllocateAction.NAME, ShrinkAction.NAME, ForceMergeAction.NAME);
         AllocateAction.NAME, ShrinkAction.NAME, ForceMergeAction.NAME);
     static final List<String> ORDERED_VALID_COLD_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, AllocateAction.NAME,
     static final List<String> ORDERED_VALID_COLD_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, AllocateAction.NAME,
         FreezeAction.NAME, SearchableSnapshotAction.NAME);
         FreezeAction.NAME, SearchableSnapshotAction.NAME);
-    static final List<String> ORDERED_VALID_FROZEN_ACTIONS = Arrays.asList(SetPriorityAction.NAME, UnfollowAction.NAME, AllocateAction.NAME,
-        FreezeAction.NAME, SearchableSnapshotAction.NAME);
     static final List<String> ORDERED_VALID_DELETE_ACTIONS = Arrays.asList(WaitForSnapshotAction.NAME, DeleteAction.NAME);
     static final List<String> ORDERED_VALID_DELETE_ACTIONS = Arrays.asList(WaitForSnapshotAction.NAME, DeleteAction.NAME);
     static final Set<String> VALID_HOT_ACTIONS = Sets.newHashSet(ORDERED_VALID_HOT_ACTIONS);
     static final Set<String> VALID_HOT_ACTIONS = Sets.newHashSet(ORDERED_VALID_HOT_ACTIONS);
     static final Set<String> VALID_WARM_ACTIONS = Sets.newHashSet(ORDERED_VALID_WARM_ACTIONS);
     static final Set<String> VALID_WARM_ACTIONS = Sets.newHashSet(ORDERED_VALID_WARM_ACTIONS);
     static final Set<String> VALID_COLD_ACTIONS = Sets.newHashSet(ORDERED_VALID_COLD_ACTIONS);
     static final Set<String> VALID_COLD_ACTIONS = Sets.newHashSet(ORDERED_VALID_COLD_ACTIONS);
-    static final Set<String> VALID_FROZEN_ACTIONS = Sets.newHashSet(ORDERED_VALID_FROZEN_ACTIONS);
     static final Set<String> VALID_DELETE_ACTIONS = Sets.newHashSet(ORDERED_VALID_DELETE_ACTIONS);
     static final Set<String> VALID_DELETE_ACTIONS = Sets.newHashSet(ORDERED_VALID_DELETE_ACTIONS);
     private static Map<String, Set<String>> ALLOWED_ACTIONS = new HashMap<>();
     private static Map<String, Set<String>> ALLOWED_ACTIONS = new HashMap<>();
 
 
@@ -57,7 +53,6 @@ public class TimeseriesLifecycleType implements LifecycleType {
         ALLOWED_ACTIONS.put(HOT_PHASE, VALID_HOT_ACTIONS);
         ALLOWED_ACTIONS.put(HOT_PHASE, VALID_HOT_ACTIONS);
         ALLOWED_ACTIONS.put(WARM_PHASE, VALID_WARM_ACTIONS);
         ALLOWED_ACTIONS.put(WARM_PHASE, VALID_WARM_ACTIONS);
         ALLOWED_ACTIONS.put(COLD_PHASE, VALID_COLD_ACTIONS);
         ALLOWED_ACTIONS.put(COLD_PHASE, VALID_COLD_ACTIONS);
-        ALLOWED_ACTIONS.put(FROZEN_PHASE, VALID_FROZEN_ACTIONS);
         ALLOWED_ACTIONS.put(DELETE_PHASE, VALID_DELETE_ACTIONS);
         ALLOWED_ACTIONS.put(DELETE_PHASE, VALID_DELETE_ACTIONS);
     }
     }
 
 
@@ -146,9 +141,6 @@ public class TimeseriesLifecycleType implements LifecycleType {
             case COLD_PHASE:
             case COLD_PHASE:
                 return ORDERED_VALID_COLD_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
                 return ORDERED_VALID_COLD_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
                     .filter(Objects::nonNull).collect(Collectors.toList());
                     .filter(Objects::nonNull).collect(Collectors.toList());
-            case FROZEN_PHASE:
-                return ORDERED_VALID_FROZEN_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
-                    .filter(Objects::nonNull).collect(Collectors.toList());
             case DELETE_PHASE:
             case DELETE_PHASE:
                 return ORDERED_VALID_DELETE_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
                 return ORDERED_VALID_DELETE_ACTIONS.stream().map(a -> actions.getOrDefault(a, null))
                     .filter(Objects::nonNull).collect(Collectors.toList());
                     .filter(Objects::nonNull).collect(Collectors.toList());
@@ -170,9 +162,6 @@ public class TimeseriesLifecycleType implements LifecycleType {
         case COLD_PHASE:
         case COLD_PHASE:
             orderedActionNames = ORDERED_VALID_COLD_ACTIONS;
             orderedActionNames = ORDERED_VALID_COLD_ACTIONS;
             break;
             break;
-        case FROZEN_PHASE:
-            orderedActionNames = ORDERED_VALID_FROZEN_ACTIONS;
-            break;
         case DELETE_PHASE:
         case DELETE_PHASE:
             orderedActionNames = ORDERED_VALID_DELETE_ACTIONS;
             orderedActionNames = ORDERED_VALID_DELETE_ACTIONS;
             break;
             break;

+ 29 - 31
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/cluster/routing/allocation/DataTierAllocationDeciderTests.java

@@ -47,7 +47,6 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
     private static final DiscoveryNode HOT_NODE = newNode("node-hot", Collections.singleton(DataTier.DATA_HOT_NODE_ROLE));
     private static final DiscoveryNode HOT_NODE = newNode("node-hot", Collections.singleton(DataTier.DATA_HOT_NODE_ROLE));
     private static final DiscoveryNode WARM_NODE = newNode("node-warm", Collections.singleton(DataTier.DATA_WARM_NODE_ROLE));
     private static final DiscoveryNode WARM_NODE = newNode("node-warm", Collections.singleton(DataTier.DATA_WARM_NODE_ROLE));
     private static final DiscoveryNode COLD_NODE = newNode("node-cold", Collections.singleton(DataTier.DATA_COLD_NODE_ROLE));
     private static final DiscoveryNode COLD_NODE = newNode("node-cold", Collections.singleton(DataTier.DATA_COLD_NODE_ROLE));
-    private static final DiscoveryNode FROZEN_NODE = newNode("node-frozen", Collections.singleton(DataTier.DATA_FROZEN_NODE_ROLE));
     private static final DiscoveryNode DATA_NODE = newNode("node-data", Collections.singleton(DiscoveryNodeRole.DATA_ROLE));
     private static final DiscoveryNode DATA_NODE = newNode("node-data", Collections.singleton(DiscoveryNodeRole.DATA_ROLE));
 
 
     private final ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, ALL_SETTINGS);
     private final ClusterSettings clusterSettings = new ClusterSettings(Settings.EMPTY, ALL_SETTINGS);
@@ -89,7 +88,7 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
             assertThat(d.type(), equalTo(Decision.Type.YES));
             assertThat(d.type(), equalTo(Decision.Type.YES));
         }
         }
 
 
-        for (DiscoveryNode n : Arrays.asList(WARM_NODE, COLD_NODE, FROZEN_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(WARM_NODE, COLD_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
@@ -110,12 +109,12 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
             null, 0);
             null, 0);
         allocation.debugDecision(true);
         allocation.debugDecision(true);
         clusterSettings.applySettings(Settings.builder()
         clusterSettings.applySettings(Settings.builder()
-            .put(DataTierAllocationDecider.CLUSTER_ROUTING_INCLUDE, "data_warm,data_frozen")
+            .put(DataTierAllocationDecider.CLUSTER_ROUTING_INCLUDE, "data_warm,data_cold")
             .build());
             .build());
         Decision d;
         Decision d;
         RoutingNode node;
         RoutingNode node;
 
 
-        for (DiscoveryNode n : Arrays.asList(WARM_NODE, FROZEN_NODE, DATA_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(WARM_NODE, DATA_NODE, COLD_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.YES));
             assertThat(d.type(), equalTo(Decision.Type.YES));
@@ -123,18 +122,18 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
             assertThat(d.type(), equalTo(Decision.Type.YES));
             assertThat(d.type(), equalTo(Decision.Type.YES));
         }
         }
 
 
-        for (DiscoveryNode n : Arrays.asList(HOT_NODE, COLD_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(HOT_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node does not match any cluster setting [cluster.routing.allocation.include._tier] " +
                 containsString("node does not match any cluster setting [cluster.routing.allocation.include._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
             d = decider.canRemain(shard, node, allocation);
             d = decider.canRemain(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node does not match any cluster setting [cluster.routing.allocation.include._tier] " +
                 containsString("node does not match any cluster setting [cluster.routing.allocation.include._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
         }
         }
     }
     }
 
 
@@ -145,23 +144,23 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
             null, 0);
             null, 0);
         allocation.debugDecision(true);
         allocation.debugDecision(true);
         clusterSettings.applySettings(Settings.builder()
         clusterSettings.applySettings(Settings.builder()
-            .put(DataTierAllocationDecider.CLUSTER_ROUTING_EXCLUDE, "data_warm,data_frozen")
+            .put(DataTierAllocationDecider.CLUSTER_ROUTING_EXCLUDE, "data_warm")
             .build());
             .build());
         Decision d;
         Decision d;
         RoutingNode node;
         RoutingNode node;
 
 
-        for (DiscoveryNode n : Arrays.asList(WARM_NODE, FROZEN_NODE, DATA_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(WARM_NODE, DATA_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] " +
                 containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm]"));
             d = decider.canRemain(shard, node, allocation);
             d = decider.canRemain(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] " +
                 containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm]"));
 
 
         }
         }
 
 
@@ -193,7 +192,7 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
             assertThat(d.type(), equalTo(Decision.Type.YES));
             assertThat(d.type(), equalTo(Decision.Type.YES));
         }
         }
 
 
-        for (DiscoveryNode n : Arrays.asList(WARM_NODE, COLD_NODE, FROZEN_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(WARM_NODE, COLD_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
@@ -209,7 +208,7 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
     public void testIndexIncludes() {
     public void testIndexIncludes() {
         ClusterState state = prepareState(service.reroute(ClusterState.EMPTY_STATE, "initial state"),
         ClusterState state = prepareState(service.reroute(ClusterState.EMPTY_STATE, "initial state"),
             Settings.builder()
             Settings.builder()
-                .put(DataTierAllocationDecider.INDEX_ROUTING_INCLUDE, "data_warm,data_frozen")
+                .put(DataTierAllocationDecider.INDEX_ROUTING_INCLUDE, "data_warm,data_cold")
                 .build());
                 .build());
         RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state,
         RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state,
             null, 0);
             null, 0);
@@ -217,7 +216,7 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
         Decision d;
         Decision d;
         RoutingNode node;
         RoutingNode node;
 
 
-        for (DiscoveryNode n : Arrays.asList(WARM_NODE, FROZEN_NODE, DATA_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(WARM_NODE, DATA_NODE, COLD_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.YES));
             assertThat(d.type(), equalTo(Decision.Type.YES));
@@ -225,25 +224,25 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
             assertThat(d.type(), equalTo(Decision.Type.YES));
             assertThat(d.type(), equalTo(Decision.Type.YES));
         }
         }
 
 
-        for (DiscoveryNode n : Arrays.asList(HOT_NODE, COLD_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(HOT_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
             d = decider.canRemain(shard, node, allocation);
             d = decider.canRemain(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
         }
         }
     }
     }
 
 
     public void testIndexExcludes() {
     public void testIndexExcludes() {
         ClusterState state = prepareState(service.reroute(ClusterState.EMPTY_STATE, "initial state"),
         ClusterState state = prepareState(service.reroute(ClusterState.EMPTY_STATE, "initial state"),
             Settings.builder()
             Settings.builder()
-                .put(DataTierAllocationDecider.INDEX_ROUTING_EXCLUDE, "data_warm,data_frozen")
+                .put(DataTierAllocationDecider.INDEX_ROUTING_EXCLUDE, "data_warm,data_cold")
                 .build());
                 .build());
         RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state,
         RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state,
             null, 0);
             null, 0);
@@ -251,22 +250,22 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
         Decision d;
         Decision d;
         RoutingNode node;
         RoutingNode node;
 
 
-        for (DiscoveryNode n : Arrays.asList(WARM_NODE, FROZEN_NODE, DATA_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(WARM_NODE, DATA_NODE, COLD_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node matches any index setting [index.routing.allocation.exclude._tier] " +
                 containsString("node matches any index setting [index.routing.allocation.exclude._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
             d = decider.canRemain(shard, node, allocation);
             d = decider.canRemain(shard, node, allocation);
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
                 containsString("node matches any index setting [index.routing.allocation.exclude._tier] " +
                 containsString("node matches any index setting [index.routing.allocation.exclude._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
 
 
         }
         }
 
 
-        for (DiscoveryNode n : Arrays.asList(HOT_NODE, COLD_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(HOT_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(n.toString(), d.type(), equalTo(Decision.Type.YES));
             assertThat(n.toString(), d.type(), equalTo(Decision.Type.YES));
@@ -278,41 +277,41 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
     public void testClusterAndIndex() {
     public void testClusterAndIndex() {
         ClusterState state = prepareState(service.reroute(ClusterState.EMPTY_STATE, "initial state"),
         ClusterState state = prepareState(service.reroute(ClusterState.EMPTY_STATE, "initial state"),
             Settings.builder()
             Settings.builder()
-                .put(DataTierAllocationDecider.INDEX_ROUTING_INCLUDE, "data_warm,data_frozen")
+                .put(DataTierAllocationDecider.INDEX_ROUTING_INCLUDE, "data_warm,data_cold")
                 .build());
                 .build());
         RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state,
         RoutingAllocation allocation = new RoutingAllocation(allocationDeciders, state.getRoutingNodes(), state,
             null, 0);
             null, 0);
         clusterSettings.applySettings(Settings.builder()
         clusterSettings.applySettings(Settings.builder()
-            .put(DataTierAllocationDecider.CLUSTER_ROUTING_EXCLUDE, "data_frozen")
+            .put(DataTierAllocationDecider.CLUSTER_ROUTING_EXCLUDE, "data_cold")
             .build());
             .build());
         allocation.debugDecision(true);
         allocation.debugDecision(true);
         Decision d;
         Decision d;
         RoutingNode node;
         RoutingNode node;
 
 
-        for (DiscoveryNode n : Arrays.asList(HOT_NODE, COLD_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(HOT_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(node.toString(), d.getExplanation(),
             assertThat(node.toString(), d.getExplanation(),
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
             d = decider.canRemain(shard, node, allocation);
             d = decider.canRemain(shard, node, allocation);
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(node.toString(), d.getExplanation(),
             assertThat(node.toString(), d.getExplanation(),
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
                 containsString("node does not match any index setting [index.routing.allocation.include._tier] " +
-                    "tier filters [data_warm,data_frozen]"));
+                    "tier filters [data_warm,data_cold]"));
         }
         }
 
 
-        for (DiscoveryNode n : Arrays.asList(FROZEN_NODE, DATA_NODE)) {
+        for (DiscoveryNode n : Arrays.asList(DATA_NODE)) {
             node = new RoutingNode(n.getId(), n, shard);
             node = new RoutingNode(n.getId(), n, shard);
             d = decider.canAllocate(shard, node, allocation);
             d = decider.canAllocate(shard, node, allocation);
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
-                containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] tier filters [data_frozen]"));
+                containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] tier filters [data_cold]"));
             d = decider.canRemain(shard, node, allocation);
             d = decider.canRemain(shard, node, allocation);
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(node.toString(), d.type(), equalTo(Decision.Type.NO));
             assertThat(d.getExplanation(),
             assertThat(d.getExplanation(),
-                containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] tier filters [data_frozen]"));
+                containsString("node matches any cluster setting [cluster.routing.allocation.exclude._tier] tier filters [data_cold]"));
         }
         }
 
 
         for (DiscoveryNode n : Arrays.asList(WARM_NODE)) {
         for (DiscoveryNode n : Arrays.asList(WARM_NODE)) {
@@ -334,7 +333,6 @@ public class DataTierAllocationDeciderTests extends ESAllocationTestCase {
                 .add(HOT_NODE)
                 .add(HOT_NODE)
                 .add(WARM_NODE)
                 .add(WARM_NODE)
                 .add(COLD_NODE)
                 .add(COLD_NODE)
-                .add(FROZEN_NODE)
                 .add(DATA_NODE)
                 .add(DATA_NODE)
                 .build())
                 .build())
             .metadata(Metadata.builder()
             .metadata(Metadata.builder()

+ 0 - 10
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/DataTierTests.java

@@ -68,24 +68,15 @@ public class DataTierTests extends ESTestCase {
                 .map(DiscoveryNode::getId)
                 .map(DiscoveryNode::getId)
                 .toArray(String[]::new);
                 .toArray(String[]::new);
 
 
-        final String[] frozenNodes =
-            StreamSupport.stream(discoveryNodes.getNodes().values().spliterator(), false)
-                .map(n -> n.value)
-                .filter(DataTier::isFrozenNode)
-                .map(DiscoveryNode::getId)
-                .toArray(String[]::new);
-
         assertThat(discoveryNodes.resolveNodes("data:true"), arrayContainingInAnyOrder(dataNodes));
         assertThat(discoveryNodes.resolveNodes("data:true"), arrayContainingInAnyOrder(dataNodes));
         assertThat(discoveryNodes.resolveNodes("data_content:true"), arrayContainingInAnyOrder(contentNodes));
         assertThat(discoveryNodes.resolveNodes("data_content:true"), arrayContainingInAnyOrder(contentNodes));
         assertThat(discoveryNodes.resolveNodes("data_hot:true"), arrayContainingInAnyOrder(hotNodes));
         assertThat(discoveryNodes.resolveNodes("data_hot:true"), arrayContainingInAnyOrder(hotNodes));
         assertThat(discoveryNodes.resolveNodes("data_warm:true"), arrayContainingInAnyOrder(warmNodes));
         assertThat(discoveryNodes.resolveNodes("data_warm:true"), arrayContainingInAnyOrder(warmNodes));
         assertThat(discoveryNodes.resolveNodes("data_cold:true"), arrayContainingInAnyOrder(coldNodes));
         assertThat(discoveryNodes.resolveNodes("data_cold:true"), arrayContainingInAnyOrder(coldNodes));
-        assertThat(discoveryNodes.resolveNodes("data_frozen:true"), arrayContainingInAnyOrder(frozenNodes));
         Set<String> allTiers = new HashSet<>(Arrays.asList(contentNodes));
         Set<String> allTiers = new HashSet<>(Arrays.asList(contentNodes));
         allTiers.addAll(Arrays.asList(hotNodes));
         allTiers.addAll(Arrays.asList(hotNodes));
         allTiers.addAll(Arrays.asList(warmNodes));
         allTiers.addAll(Arrays.asList(warmNodes));
         allTiers.addAll(Arrays.asList(coldNodes));
         allTiers.addAll(Arrays.asList(coldNodes));
-        allTiers.addAll(Arrays.asList(frozenNodes));
         assertThat(discoveryNodes.resolveNodes("data:true"), arrayContainingInAnyOrder(allTiers.toArray(Strings.EMPTY_ARRAY)));
         assertThat(discoveryNodes.resolveNodes("data:true"), arrayContainingInAnyOrder(allTiers.toArray(Strings.EMPTY_ARRAY)));
     }
     }
 
 
@@ -113,7 +104,6 @@ public class DataTierTests extends ESTestCase {
         allRoles.add(DataTier.DATA_HOT_NODE_ROLE);
         allRoles.add(DataTier.DATA_HOT_NODE_ROLE);
         allRoles.add(DataTier.DATA_WARM_NODE_ROLE);
         allRoles.add(DataTier.DATA_WARM_NODE_ROLE);
         allRoles.add(DataTier.DATA_COLD_NODE_ROLE);
         allRoles.add(DataTier.DATA_COLD_NODE_ROLE);
-        allRoles.add(DataTier.DATA_FROZEN_NODE_ROLE);
         List<DiscoveryNode> nodesList = new ArrayList<>();
         List<DiscoveryNode> nodesList = new ArrayList<>();
         for (int i = 0; i < numNodes; i++) {
         for (int i = 0; i < numNodes; i++) {
             Map<String, String> attributes = new HashMap<>();
             Map<String, String> attributes = new HashMap<>();

+ 0 - 4
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/LifecyclePolicyTests.java

@@ -105,8 +105,6 @@ public class LifecyclePolicyTests extends AbstractSerializingTestCase<LifecycleP
                     return TimeseriesLifecycleType.VALID_WARM_ACTIONS;
                     return TimeseriesLifecycleType.VALID_WARM_ACTIONS;
                 case "cold":
                 case "cold":
                     return TimeseriesLifecycleType.VALID_COLD_ACTIONS;
                     return TimeseriesLifecycleType.VALID_COLD_ACTIONS;
-                case "frozen":
-                    return TimeseriesLifecycleType.VALID_FROZEN_ACTIONS;
                 case "delete":
                 case "delete":
                     return TimeseriesLifecycleType.VALID_DELETE_ACTIONS;
                     return TimeseriesLifecycleType.VALID_DELETE_ACTIONS;
                 default:
                 default:
@@ -163,8 +161,6 @@ public class LifecyclePolicyTests extends AbstractSerializingTestCase<LifecycleP
                     return TimeseriesLifecycleType.VALID_WARM_ACTIONS;
                     return TimeseriesLifecycleType.VALID_WARM_ACTIONS;
                 case "cold":
                 case "cold":
                     return TimeseriesLifecycleType.VALID_COLD_ACTIONS;
                     return TimeseriesLifecycleType.VALID_COLD_ACTIONS;
-                case "frozen":
-                    return TimeseriesLifecycleType.VALID_FROZEN_ACTIONS;
                 case "delete":
                 case "delete":
                     return TimeseriesLifecycleType.VALID_DELETE_ACTIONS;
                     return TimeseriesLifecycleType.VALID_DELETE_ACTIONS;
                 default:
                 default:

+ 5 - 105
x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/ilm/TimeseriesLifecycleTypeTests.java

@@ -22,12 +22,10 @@ import java.util.stream.Collectors;
 
 
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_COLD_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_COLD_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_DELETE_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_DELETE_ACTIONS;
-import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_FROZEN_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_HOT_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_HOT_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_WARM_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.ORDERED_VALID_WARM_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_COLD_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_COLD_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_DELETE_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_DELETE_ACTIONS;
-import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_FROZEN_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_HOT_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_HOT_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_PHASES;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_PHASES;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_WARM_ACTIONS;
 import static org.elasticsearch.xpack.core.ilm.TimeseriesLifecycleType.VALID_WARM_ACTIONS;
@@ -51,7 +49,7 @@ public class TimeseriesLifecycleTypeTests extends ESTestCase {
 
 
     public void testValidatePhases() {
     public void testValidatePhases() {
         boolean invalid = randomBoolean();
         boolean invalid = randomBoolean();
-        String phaseName = randomFrom("hot", "warm", "cold", "frozen", "delete");
+        String phaseName = randomFrom("hot", "warm", "cold", "delete");
         if (invalid) {
         if (invalid) {
             phaseName += randomAlphaOfLength(5);
             phaseName += randomAlphaOfLength(5);
         }
         }
@@ -144,27 +142,6 @@ public class TimeseriesLifecycleTypeTests extends ESTestCase {
         }
         }
     }
     }
 
 
-    public void testValidateFrozenPhase() {
-        LifecycleAction invalidAction = null;
-        Map<String, LifecycleAction> actions = randomSubsetOf(VALID_FROZEN_ACTIONS)
-            .stream().map(this::getTestAction).collect(Collectors.toMap(LifecycleAction::getWriteableName, Function.identity()));
-        if (randomBoolean()) {
-            invalidAction = getTestAction(randomFrom("rollover", "delete", "forcemerge", "shrink"));
-            actions.put(invalidAction.getWriteableName(), invalidAction);
-        }
-        Map<String, Phase> frozenPhase = Collections.singletonMap("frozen",
-            new Phase("frozen", TimeValue.ZERO, actions));
-
-        if (invalidAction != null) {
-            Exception e = expectThrows(IllegalArgumentException.class,
-                () -> TimeseriesLifecycleType.INSTANCE.validate(frozenPhase.values()));
-            assertThat(e.getMessage(),
-                equalTo("invalid action [" + invalidAction.getWriteableName() + "] defined in phase [frozen]"));
-        } else {
-            TimeseriesLifecycleType.INSTANCE.validate(frozenPhase.values());
-        }
-    }
-
     public void testValidateDeletePhase() {
     public void testValidateDeletePhase() {
         LifecycleAction invalidAction = null;
         LifecycleAction invalidAction = null;
         Map<String, LifecycleAction> actions = VALID_DELETE_ACTIONS
         Map<String, LifecycleAction> actions = VALID_DELETE_ACTIONS
@@ -256,15 +233,6 @@ public class TimeseriesLifecycleTypeTests extends ESTestCase {
         assertThat(orderedActions.indexOf(TEST_PRIORITY_ACTION), equalTo(0));
         assertThat(orderedActions.indexOf(TEST_PRIORITY_ACTION), equalTo(0));
     }
     }
 
 
-    public void testGetOrderedActionsFrozen() {
-        Map<String, LifecycleAction> actions = VALID_FROZEN_ACTIONS
-            .stream().map(this::getTestAction).collect(Collectors.toMap(LifecycleAction::getWriteableName, Function.identity()));
-        Phase frozenPhase = new Phase("frozen", TimeValue.ZERO, actions);
-        List<LifecycleAction> orderedActions = TimeseriesLifecycleType.INSTANCE.getOrderedActions(frozenPhase);
-        assertTrue(isSorted(orderedActions, LifecycleAction::getWriteableName, ORDERED_VALID_FROZEN_ACTIONS));
-        assertThat(orderedActions.indexOf(TEST_PRIORITY_ACTION), equalTo(0));
-    }
-
     public void testGetOrderedActionsDelete() {
     public void testGetOrderedActionsDelete() {
         Map<String, LifecycleAction> actions = VALID_DELETE_ACTIONS
         Map<String, LifecycleAction> actions = VALID_DELETE_ACTIONS
             .stream().map(this::getTestAction).collect(Collectors.toMap(LifecycleAction::getWriteableName, Function.identity()));
             .stream().map(this::getTestAction).collect(Collectors.toMap(LifecycleAction::getWriteableName, Function.identity()));
@@ -276,25 +244,21 @@ public class TimeseriesLifecycleTypeTests extends ESTestCase {
     public void testGetNextPhaseName() {
     public void testGetNextPhaseName() {
         assertNextPhaseName("hot", "warm", new String[] { "hot", "warm" });
         assertNextPhaseName("hot", "warm", new String[] { "hot", "warm" });
         assertNextPhaseName("hot", "warm", new String[] { "hot", "warm", "cold" });
         assertNextPhaseName("hot", "warm", new String[] { "hot", "warm", "cold" });
-        assertNextPhaseName("hot", "warm", new String[] { "hot", "warm", "cold", "frozen"});
-        assertNextPhaseName("hot", "warm", new String[] { "hot", "warm", "cold", "frozen", "delete" });
+        assertNextPhaseName("hot", "warm", new String[] { "hot", "warm", "cold", "delete"});
         assertNextPhaseName("hot", "warm", new String[] { "warm", "cold", "delete" });
         assertNextPhaseName("hot", "warm", new String[] { "warm", "cold", "delete" });
         assertNextPhaseName("hot", "warm", new String[] { "warm", "cold", "delete" });
         assertNextPhaseName("hot", "warm", new String[] { "warm", "cold", "delete" });
         assertNextPhaseName("hot", "warm", new String[] { "warm", "delete" });
         assertNextPhaseName("hot", "warm", new String[] { "warm", "delete" });
         assertNextPhaseName("hot", "cold", new String[] { "cold", "delete" });
         assertNextPhaseName("hot", "cold", new String[] { "cold", "delete" });
         assertNextPhaseName("hot", "cold", new String[] { "cold" });
         assertNextPhaseName("hot", "cold", new String[] { "cold" });
-        assertNextPhaseName("hot", "frozen", new String[] { "hot", "frozen" });
-        assertNextPhaseName("hot", "frozen", new String[] { "frozen" });
         assertNextPhaseName("hot", "delete", new String[] { "hot", "delete" });
         assertNextPhaseName("hot", "delete", new String[] { "hot", "delete" });
         assertNextPhaseName("hot", "delete", new String[] { "delete" });
         assertNextPhaseName("hot", "delete", new String[] { "delete" });
         assertNextPhaseName("hot", null, new String[] { "hot" });
         assertNextPhaseName("hot", null, new String[] { "hot" });
         assertNextPhaseName("hot", null, new String[] {});
         assertNextPhaseName("hot", null, new String[] {});
 
 
-        assertNextPhaseName("warm", "cold", new String[] { "hot", "warm", "cold", "frozen", "delete" });
+        assertNextPhaseName("warm", "cold", new String[] { "hot", "warm", "cold", "delete" });
         assertNextPhaseName("warm", "cold", new String[] { "warm", "cold", "delete" });
         assertNextPhaseName("warm", "cold", new String[] { "warm", "cold", "delete" });
         assertNextPhaseName("warm", "cold", new String[] { "cold", "delete" });
         assertNextPhaseName("warm", "cold", new String[] { "cold", "delete" });
         assertNextPhaseName("warm", "cold", new String[] { "cold" });
         assertNextPhaseName("warm", "cold", new String[] { "cold" });
-        assertNextPhaseName("warm", "frozen", new String[] { "hot", "warm", "frozen", "delete" });
         assertNextPhaseName("warm", "delete", new String[] { "hot", "warm", "delete" });
         assertNextPhaseName("warm", "delete", new String[] { "hot", "warm", "delete" });
         assertNextPhaseName("warm", null, new String[] { "hot", "warm" });
         assertNextPhaseName("warm", null, new String[] { "hot", "warm" });
         assertNextPhaseName("warm", null, new String[] { "warm" });
         assertNextPhaseName("warm", null, new String[] { "warm" });
@@ -306,34 +270,18 @@ public class TimeseriesLifecycleTypeTests extends ESTestCase {
         assertNextPhaseName("cold", "delete", new String[] { "cold", "delete" });
         assertNextPhaseName("cold", "delete", new String[] { "cold", "delete" });
         assertNextPhaseName("cold", "delete", new String[] { "delete" });
         assertNextPhaseName("cold", "delete", new String[] { "delete" });
         assertNextPhaseName("cold", "delete", new String[] { "hot", "warm", "delete" });
         assertNextPhaseName("cold", "delete", new String[] { "hot", "warm", "delete" });
-        assertNextPhaseName("cold", "frozen", new String[] { "cold", "frozen", "delete" });
-        assertNextPhaseName("cold", "frozen", new String[] { "hot", "warm", "frozen", "delete" });
         assertNextPhaseName("cold", null, new String[] { "hot", "warm", "cold" });
         assertNextPhaseName("cold", null, new String[] { "hot", "warm", "cold" });
         assertNextPhaseName("cold", null, new String[] { "hot", "warm" });
         assertNextPhaseName("cold", null, new String[] { "hot", "warm" });
         assertNextPhaseName("cold", null, new String[] { "cold" });
         assertNextPhaseName("cold", null, new String[] { "cold" });
         assertNextPhaseName("cold", null, new String[] { "hot" });
         assertNextPhaseName("cold", null, new String[] { "hot" });
         assertNextPhaseName("cold", null, new String[] {});
         assertNextPhaseName("cold", null, new String[] {});
 
 
-        assertNextPhaseName("frozen", "delete", new String[] { "hot", "warm", "cold", "delete" });
-        assertNextPhaseName("frozen", "delete", new String[] { "warm", "cold", "delete" });
-        assertNextPhaseName("frozen", "delete", new String[] { "cold", "delete" });
-        assertNextPhaseName("frozen", "delete", new String[] { "delete" });
-        assertNextPhaseName("frozen", "delete", new String[] { "frozen", "delete" });
-        assertNextPhaseName("frozen", "delete", new String[] { "hot", "warm", "delete" });
-        assertNextPhaseName("frozen", null, new String[] { "hot", "warm", "cold" });
-        assertNextPhaseName("frozen", null, new String[] { "hot", "warm" });
-        assertNextPhaseName("frozen", null, new String[] { "cold" });
-        assertNextPhaseName("frozen", null, new String[] { "hot" });
-        assertNextPhaseName("frozen", null, new String[] { "frozen" });
-        assertNextPhaseName("frozen", null, new String[] {});
-
-        assertNextPhaseName("delete", null, new String[] { "hot", "warm", "cold", "frozen" });
+        assertNextPhaseName("delete", null, new String[] { "hot", "warm", "cold" });
         assertNextPhaseName("delete", null, new String[] { "hot", "warm" });
         assertNextPhaseName("delete", null, new String[] { "hot", "warm" });
         assertNextPhaseName("delete", null, new String[] { "cold" });
         assertNextPhaseName("delete", null, new String[] { "cold" });
         assertNextPhaseName("delete", null, new String[] { "hot" });
         assertNextPhaseName("delete", null, new String[] { "hot" });
-        assertNextPhaseName("delete", null, new String[] { "frozen" });
         assertNextPhaseName("delete", null, new String[] {});
         assertNextPhaseName("delete", null, new String[] {});
-        assertNextPhaseName("delete", null, new String[] { "hot", "warm", "cold", "frozen", "delete" });
+        assertNextPhaseName("delete", null, new String[] { "hot", "warm", "cold", "delete" });
         assertNextPhaseName("delete", null, new String[] { "hot", "warm", "delete" });
         assertNextPhaseName("delete", null, new String[] { "hot", "warm", "delete" });
         assertNextPhaseName("delete", null, new String[] { "cold", "delete" });
         assertNextPhaseName("delete", null, new String[] { "cold", "delete" });
         assertNextPhaseName("delete", null, new String[] { "delete" });
         assertNextPhaseName("delete", null, new String[] { "delete" });
@@ -382,30 +330,14 @@ public class TimeseriesLifecycleTypeTests extends ESTestCase {
         assertPreviousPhaseName("cold", "warm", new String[] { "warm" });
         assertPreviousPhaseName("cold", "warm", new String[] { "warm" });
         assertPreviousPhaseName("cold", null, new String[] {});
         assertPreviousPhaseName("cold", null, new String[] {});
 
 
-        assertPreviousPhaseName("frozen", "warm", new String[] { "hot", "warm", "frozen", "delete" });
-        assertPreviousPhaseName("frozen", "hot", new String[] { "hot", "frozen", "delete" });
-        assertPreviousPhaseName("frozen", "warm", new String[] { "warm", "frozen", "delete" });
-        assertPreviousPhaseName("frozen", "cold", new String[] { "cold", "frozen", "delete" });
-        assertPreviousPhaseName("frozen", null, new String[] { "frozen", "delete" });
-        assertPreviousPhaseName("frozen", "warm", new String[] { "hot", "warm", "delete" });
-        assertPreviousPhaseName("frozen", "hot", new String[] { "hot", "delete" });
-        assertPreviousPhaseName("frozen", "warm", new String[] { "warm", "delete" });
-        assertPreviousPhaseName("frozen", null, new String[] { "delete" });
-        assertPreviousPhaseName("frozen", "warm", new String[] { "hot", "warm" });
-        assertPreviousPhaseName("frozen", "hot", new String[] { "hot" });
-        assertPreviousPhaseName("frozen", "warm", new String[] { "warm" });
-        assertPreviousPhaseName("frozen", null, new String[] {});
-
         assertPreviousPhaseName("delete", "cold", new String[] { "hot", "warm", "cold", "delete" });
         assertPreviousPhaseName("delete", "cold", new String[] { "hot", "warm", "cold", "delete" });
         assertPreviousPhaseName("delete", "cold", new String[] { "warm", "cold", "delete" });
         assertPreviousPhaseName("delete", "cold", new String[] { "warm", "cold", "delete" });
         assertPreviousPhaseName("delete", "warm", new String[] { "hot", "warm", "delete" });
         assertPreviousPhaseName("delete", "warm", new String[] { "hot", "warm", "delete" });
         assertPreviousPhaseName("delete", "hot", new String[] { "hot", "delete" });
         assertPreviousPhaseName("delete", "hot", new String[] { "hot", "delete" });
         assertPreviousPhaseName("delete", "cold", new String[] { "cold", "delete" });
         assertPreviousPhaseName("delete", "cold", new String[] { "cold", "delete" });
-        assertPreviousPhaseName("delete", "frozen", new String[] { "frozen", "delete" });
         assertPreviousPhaseName("delete", null, new String[] { "delete" });
         assertPreviousPhaseName("delete", null, new String[] { "delete" });
         assertPreviousPhaseName("delete", "cold", new String[] { "hot", "warm", "cold" });
         assertPreviousPhaseName("delete", "cold", new String[] { "hot", "warm", "cold" });
         assertPreviousPhaseName("delete", "cold", new String[] { "warm", "cold" });
         assertPreviousPhaseName("delete", "cold", new String[] { "warm", "cold" });
-        assertPreviousPhaseName("delete", "frozen", new String[] { "warm", "frozen" });
         assertPreviousPhaseName("delete", "warm", new String[] { "hot", "warm" });
         assertPreviousPhaseName("delete", "warm", new String[] { "hot", "warm" });
         assertPreviousPhaseName("delete", "hot", new String[] { "hot" });
         assertPreviousPhaseName("delete", "hot", new String[] { "hot" });
         assertPreviousPhaseName("delete", "cold", new String[] { "cold" });
         assertPreviousPhaseName("delete", "cold", new String[] { "cold" });
@@ -537,38 +469,6 @@ public class TimeseriesLifecycleTypeTests extends ESTestCase {
         assertInvalidAction("cold", RolloverAction.NAME, new String[] { AllocateAction.NAME });
         assertInvalidAction("cold", RolloverAction.NAME, new String[] { AllocateAction.NAME });
         assertInvalidAction("cold", ShrinkAction.NAME, new String[] { AllocateAction.NAME });
         assertInvalidAction("cold", ShrinkAction.NAME, new String[] { AllocateAction.NAME });
 
 
-        // Frozen Phase
-        assertNextActionName("frozen", SetPriorityAction.NAME, UnfollowAction.NAME,
-            new String[]{UnfollowAction.NAME, SetPriorityAction.NAME, FreezeAction.NAME});
-        assertNextActionName("frozen", SetPriorityAction.NAME, FreezeAction.NAME,
-            new String[]{SetPriorityAction.NAME, FreezeAction.NAME});
-        assertNextActionName("frozen", SetPriorityAction.NAME, AllocateAction.NAME,
-            new String[]{SetPriorityAction.NAME, AllocateAction.NAME});
-        assertNextActionName("frozen", SetPriorityAction.NAME, null, new String[] { SetPriorityAction.NAME });
-        assertNextActionName("frozen", SetPriorityAction.NAME, null, new String[] {});
-
-        assertNextActionName("frozen", UnfollowAction.NAME, AllocateAction.NAME,
-            new String[] {SetPriorityAction.NAME, AllocateAction.NAME, FreezeAction.NAME});
-        assertNextActionName("frozen", UnfollowAction.NAME, AllocateAction.NAME,
-            new String[] {AllocateAction.NAME, FreezeAction.NAME});
-        assertNextActionName("frozen", UnfollowAction.NAME, FreezeAction.NAME, new String[] {FreezeAction.NAME});
-        assertNextActionName("frozen", UnfollowAction.NAME, null, new String[] {});
-
-        assertNextActionName("frozen", AllocateAction.NAME, null, new String[] { AllocateAction.NAME });
-        assertNextActionName("frozen", AllocateAction.NAME, null, new String[] {});
-        assertNextActionName("frozen", AllocateAction.NAME, null, new String[] {});
-        assertNextActionName("frozen", AllocateAction.NAME, FreezeAction.NAME, FreezeAction.NAME);
-
-        assertNextActionName("frozen", FreezeAction.NAME, null);
-        assertNextActionName("frozen", FreezeAction.NAME, null, AllocateAction.NAME);
-
-        assertInvalidAction("frozen", "foo", new String[] { AllocateAction.NAME });
-        assertInvalidAction("frozen", DeleteAction.NAME, new String[] { AllocateAction.NAME });
-        assertInvalidAction("frozen", ForceMergeAction.NAME, new String[] { AllocateAction.NAME });
-        assertInvalidAction("frozen", ReadOnlyAction.NAME, new String[] { AllocateAction.NAME });
-        assertInvalidAction("frozen", RolloverAction.NAME, new String[] { AllocateAction.NAME });
-        assertInvalidAction("frozen", ShrinkAction.NAME, new String[] { AllocateAction.NAME });
-
         // Delete Phase
         // Delete Phase
         assertNextActionName("delete", DeleteAction.NAME, null, new String[] {});
         assertNextActionName("delete", DeleteAction.NAME, null, new String[] {});
         assertNextActionName("delete", DeleteAction.NAME, null, new String[] { DeleteAction.NAME });
         assertNextActionName("delete", DeleteAction.NAME, null, new String[] { DeleteAction.NAME });

+ 1 - 4
x-pack/plugin/ilm/qa/multi-node/src/javaRestTest/java/org/elasticsearch/xpack/TimeSeriesRestDriver.java

@@ -159,15 +159,12 @@ public final class TimeSeriesRestDriver {
         warmActions.put(AllocateAction.NAME, new AllocateAction(1, singletonMap("_name", "javaRestTest-1,javaRestTest-2"), null, null));
         warmActions.put(AllocateAction.NAME, new AllocateAction(1, singletonMap("_name", "javaRestTest-1,javaRestTest-2"), null, null));
         warmActions.put(ShrinkAction.NAME, new ShrinkAction(1));
         warmActions.put(ShrinkAction.NAME, new ShrinkAction(1));
         Map<String, LifecycleAction> coldActions = new HashMap<>();
         Map<String, LifecycleAction> coldActions = new HashMap<>();
-        coldActions.put(SetPriorityAction.NAME, new SetPriorityAction(25));
+        coldActions.put(SetPriorityAction.NAME, new SetPriorityAction(0));
         coldActions.put(AllocateAction.NAME, new AllocateAction(0, singletonMap("_name", "javaRestTest-3"), null, null));
         coldActions.put(AllocateAction.NAME, new AllocateAction(0, singletonMap("_name", "javaRestTest-3"), null, null));
-        Map<String, LifecycleAction> frozenActions = new HashMap<>();
-        frozenActions.put(SetPriorityAction.NAME, new SetPriorityAction(0));
         Map<String, Phase> phases = new HashMap<>();
         Map<String, Phase> phases = new HashMap<>();
         phases.put("hot", new Phase("hot", hotTime, hotActions));
         phases.put("hot", new Phase("hot", hotTime, hotActions));
         phases.put("warm", new Phase("warm", TimeValue.ZERO, warmActions));
         phases.put("warm", new Phase("warm", TimeValue.ZERO, warmActions));
         phases.put("cold", new Phase("cold", TimeValue.ZERO, coldActions));
         phases.put("cold", new Phase("cold", TimeValue.ZERO, coldActions));
-        phases.put("frozen", new Phase("frozen", TimeValue.ZERO, frozenActions));
         phases.put("delete", new Phase("delete", TimeValue.ZERO, singletonMap(DeleteAction.NAME, new DeleteAction())));
         phases.put("delete", new Phase("delete", TimeValue.ZERO, singletonMap(DeleteAction.NAME, new DeleteAction())));
         LifecyclePolicy lifecyclePolicy = new LifecyclePolicy(policyName, phases);
         LifecyclePolicy lifecyclePolicy = new LifecyclePolicy(policyName, phases);
         // PUT policy
         // PUT policy