diff --git a/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java b/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java index 5bebff07b7a..7dd392a1b16 100644 --- a/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java +++ b/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java @@ -464,7 +464,7 @@ public class XPackLicenseState { /** * Determine if Upgrade API should be enabled. *

- * Upgrade API is not available in for all license types except {@link OperationMode#TRIAL} + * Upgrade API is not available in for all license types except {@link OperationMode#MISSING} * * @return {@code true} as long as the license is valid. Otherwise * {@code false}. @@ -472,13 +472,7 @@ public class XPackLicenseState { public boolean isUpgradeAllowed() { // status is volatile Status localStatus = status; - OperationMode operationMode = localStatus.mode; - - boolean licensed = operationMode == OperationMode.BASIC || operationMode == OperationMode.STANDARD || - operationMode == OperationMode.GOLD || operationMode == OperationMode.PLATINUM; - - return licensed && localStatus.active; - + // Should work on all active licenses + return localStatus.active; } - } diff --git a/plugin/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java b/plugin/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java index db6dfbe0fce..709f9efee48 100644 --- a/plugin/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java +++ b/plugin/src/main/java/org/elasticsearch/xpack/upgrade/Upgrade.java @@ -46,7 +46,7 @@ import java.util.function.Supplier; public class Upgrade implements ActionPlugin { - public static final Version UPGRADE_INTRODUCED = Version.V_5_5_0_UNRELEASED; // TODO: Probably will need to change this to 5.6.0 + public static final Version UPGRADE_INTRODUCED = Version.V_5_5_0; // TODO: Probably will need to change this to 5.6.0 private final Settings settings; private final List> upgradeCheckFactories; diff --git a/plugin/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java b/plugin/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java index fa9c2739cd2..98053e257d5 100644 --- a/plugin/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java +++ b/plugin/src/test/java/org/elasticsearch/xpack/upgrade/IndexUpgradeIntegTestCase.java @@ -60,11 +60,11 @@ public abstract class IndexUpgradeIntegTestCase extends AbstractLicensesIntegrat return nodePlugins(); } private static String randomValidLicenseType() { - return randomFrom("platinum", "gold", "standard", "basic"); + return randomFrom("trial", "platinum", "gold", "standard", "basic"); } private static String randomInvalidLicenseType() { - return randomFrom("missing", "trial"); + return "missing"; } public void disableLicensing() throws Exception {