diff --git a/server/src/main/java/org/opensearch/node/InternalSettingsPreparer.java b/server/src/main/java/org/opensearch/node/InternalSettingsPreparer.java index 828a8e146a2..7d0166cb5c7 100644 --- a/server/src/main/java/org/opensearch/node/InternalSettingsPreparer.java +++ b/server/src/main/java/org/opensearch/node/InternalSettingsPreparer.java @@ -81,14 +81,6 @@ public class InternalSettingsPreparer { initializeSettings(output, input, properties); Environment environment = new Environment(output.build(), configPath); - if (Files.exists(environment.configFile().resolve("opensearch.yaml"))) { - throw new SettingsException("opensearch.yaml was deprecated in 5.5.0 and must be renamed to opensearch.yml"); - } - - if (Files.exists(environment.configFile().resolve("opensearch.json"))) { - throw new SettingsException("opensearch.json was deprecated in 5.5.0 and must be converted to opensearch.yml"); - } - output = Settings.builder(); // start with a fresh output Path path = environment.configFile().resolve("opensearch.yml"); if (Files.exists(path)) { diff --git a/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java b/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java index 6c93a66e3d9..32d18c85014 100644 --- a/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java +++ b/server/src/test/java/org/opensearch/node/InternalSettingsPreparerTests.java @@ -114,28 +114,6 @@ public class InternalSettingsPreparerTests extends OpenSearchTestCase { } } - @AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/358") - public void testYamlNotAllowed() throws IOException { - InputStream yaml = getClass().getResourceAsStream("/config/opensearch.yml"); - Path config = homeDir.resolve("config"); - Files.createDirectory(config); - Files.copy(yaml, config.resolve("opensearch.yaml")); - SettingsException e = expectThrows(SettingsException.class, () -> InternalSettingsPreparer.prepareEnvironment( - Settings.builder().put(baseEnvSettings).build(), emptyMap(), null, DEFAULT_NODE_NAME_SHOULDNT_BE_CALLED)); - assertEquals("opensearch.yaml was deprecated in 5.5.0 and must be renamed to opensearch.yml", e.getMessage()); - } - - @AwaitsFix(bugUrl = "https://github.com/opensearch-project/OpenSearch/issues/358") - public void testJsonNotAllowed() throws IOException { - InputStream yaml = getClass().getResourceAsStream("/config/opensearch.json"); - Path config = homeDir.resolve("config"); - Files.createDirectory(config); - Files.copy(yaml, config.resolve("opensearch.json")); - SettingsException e = expectThrows(SettingsException.class, () -> InternalSettingsPreparer.prepareEnvironment( - Settings.builder().put(baseEnvSettings).build(), emptyMap(), null, DEFAULT_NODE_NAME_SHOULDNT_BE_CALLED)); - assertEquals("opensearch.json was deprecated in 5.5.0 and must be converted to opensearch.yml", e.getMessage()); - } - public void testSecureSettings() { MockSecureSettings secureSettings = new MockSecureSettings(); secureSettings.setString("foo", "secret");