mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 14:38:45 +00:00
bug4811: brought StartMongoDBServer prodecure to a working state; see also the updates to the launch-mongo-replica infrastructure
This commit is contained in:
+1
@@ -91,6 +91,7 @@ public class TestProcedures {
|
||||
assertEquals(AwsLandscape.MONGO_DEFAULT_REPLICA_SET_NAME, inRs.getReplicaSet().getName());
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Exception while trying to create a MongoDB replica", e);
|
||||
throw e;
|
||||
} finally {
|
||||
if (startMongoDBServerProcedure.getHost() != null) {
|
||||
startMongoDBServerProcedure.getHost().terminate();
|
||||
|
||||
+4
@@ -246,6 +246,10 @@ extends StartHost<ShardingKey, MetricsT, MasterProcessT, ReplicaProcessT, HostT>
|
||||
protected Iterable<SecurityGroup> getSecurityGroups() {
|
||||
return securityGroups == null ? Collections.singleton(getLandscape().getDefaultSecurityGroupForApplicationHosts(getRegion())) : securityGroups;
|
||||
}
|
||||
|
||||
protected boolean isSecurityGroupsSet() {
|
||||
return securityGroups != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder<T, ShardingKey, MetricsT, MasterProcessT, ReplicaProcessT, HostT> setSecurityGroups(
|
||||
|
||||
+1
-1
@@ -213,7 +213,7 @@ extends StartAwsHost<ShardingKey, MetricsT, MasterProcessT, ReplicaProcessT, Aws
|
||||
@Override
|
||||
public StartMongoDBServer<ShardingKey, MetricsT, MasterProcessT, ReplicaProcessT> build() throws URISyntaxException, JSchException, IOException, InterruptedException {
|
||||
setTags(Optional.of(getLandscape().getTagForMongoProcess(getTags().orElse(Tags.empty()), getReplicaSetName(), MongoProcess.DEFAULT_PORT)));
|
||||
if (getSecurityGroups() == null) {
|
||||
if (!isSecurityGroupsSet()) {
|
||||
setSecurityGroups(Collections.singleton(getLandscape().getDefaultSecurityGroupForMongoDBHosts(getRegion())));
|
||||
}
|
||||
return new StartMongoDBServer<>(this);
|
||||
|
||||
Reference in New Issue
Block a user