ARTEMIS-2715 master broker created w/--replicated should use vote-on-replication-failure=true

This commit is contained in:
Justin Bertram 2020-04-15 14:33:37 -05:00 committed by Clebert Suconic
parent 71987dbd16
commit 35e0ab63cd
4 changed files with 14 additions and 5 deletions

View File

@ -91,7 +91,8 @@ public class Create extends InputAbstract {
private static final String ETC_LOGIN_CONFIG = "login.config";
private static final String ETC_LOGIN_CONFIG_WITH_GUEST = "etc/login-with-guest.config";
private static final String ETC_LOGIN_CONFIG_WITHOUT_GUEST = "etc/login-without-guest.config";
public static final String ETC_REPLICATED_SETTINGS_TXT = "etc/replicated-settings.txt";
public static final String ETC_REPLICATED_MASTER_SETTINGS_TXT = "etc/replicated-master-settings.txt";
public static final String ETC_REPLICATED_SLAVE_SETTINGS_TXT = "etc/replicated-slave-settings.txt";
public static final String ETC_SHARED_STORE_SETTINGS_TXT = "etc/shared-store-settings.txt";
public static final String ETC_CLUSTER_SECURITY_SETTINGS_TXT = "etc/cluster-security-settings.txt";
public static final String ETC_CLUSTER_SETTINGS_TXT = "etc/cluster-settings.txt";
@ -590,7 +591,7 @@ public class Create extends InputAbstract {
if (replicated) {
clustered = true;
filters.put("${replicated.settings}", readTextFile(ETC_REPLICATED_SETTINGS_TXT, filters));
filters.put("${replicated.settings}", readTextFile(isSlave() ? ETC_REPLICATED_SLAVE_SETTINGS_TXT : ETC_REPLICATED_MASTER_SETTINGS_TXT, filters));
} else {
filters.put("${replicated.settings}", "");
}

View File

@ -0,0 +1,8 @@
<ha-policy>
<replication>
<master>
<vote-on-replication-failure>true</vote-on-replication-failure>
</master>
</replication>
</ha-policy>

View File

@ -44,8 +44,8 @@ public class StreamClassPathTest {
testStream(Create.class, "etc/" + Create.ETC_BROKER_XML);
testStream(Create.class, "etc/" + Create.ETC_ARTEMIS_ROLES_PROPERTIES);
testStream(Create.class, "etc/" + Create.ETC_ARTEMIS_USERS_PROPERTIES);
testStream(Create.class, Create.ETC_REPLICATED_SETTINGS_TXT);
testStream(Create.class, Create.ETC_REPLICATED_SETTINGS_TXT);
testStream(Create.class, Create.ETC_REPLICATED_MASTER_SETTINGS_TXT);
testStream(Create.class, Create.ETC_REPLICATED_SLAVE_SETTINGS_TXT);
testStream(Create.class, Create.ETC_SHARED_STORE_SETTINGS_TXT);
testStream(Create.class, Create.ETC_CLUSTER_SECURITY_SETTINGS_TXT);
testStream(Create.class, Create.ETC_CLUSTER_SETTINGS_TXT);