java/com.sap.sailing.landscape/src/com/sap/sailing/landscape/LandscapeService.java
... ...
@@ -519,4 +519,7 @@ public interface LandscapeService {
519 519
throws MailException;
520 520
521 521
SailingServerFactory getSailingServerFactory();
522
+
523
+ void makeCandidateArchiveServerGoLive(String regionId, String optionalKeyName,
524
+ byte[] privateKeyEncryptionPassphrase, String optionalDomainName) throws Exception;
522 525
}
java/com.sap.sailing.landscape/src/com/sap/sailing/landscape/impl/LandscapeServiceImpl.java
... ...
@@ -126,7 +126,6 @@ import software.amazon.awssdk.services.ec2.model.LaunchTemplate;
126 126
import software.amazon.awssdk.services.ec2.model.LaunchTemplateVersion;
127 127
import software.amazon.awssdk.services.elasticloadbalancingv2.model.Listener;
128 128
import software.amazon.awssdk.services.elasticloadbalancingv2.model.Rule;
129
-import software.amazon.awssdk.services.elasticloadbalancingv2.model.TagDescription;
130 129
import software.amazon.awssdk.services.elasticloadbalancingv2.model.TargetHealthDescription;
131 130
import software.amazon.awssdk.services.route53.model.RRType;
132 131
import software.amazon.awssdk.services.route53.model.ResourceRecordSet;
... ...
@@ -310,16 +309,15 @@ public class LandscapeServiceImpl implements LandscapeService {
310 309
Landscape.WAIT_FOR_PROCESS_TIMEOUT.map(Duration::asMillis).orElse(null),
311 310
optionalKeyName, privateKeyEncryptionPassphrase);
312 311
if (archiveReplicaSet == null) {
313
- throw new IllegalArgumentException("Couldn't find candidate replica set with name "+replicaSetName+" in region "+regionId);
312
+ throw new IllegalArgumentException("Couldn't find candidate replica set with name "+SharedLandscapeConstants.ARCHIVE_SERVER_APPLICATION_REPLICA_SET_NAME+" in region "+regionId);
314 313
}
314
+ // TODO bug6203: update 000-macros.conf so that internal IP of candidate becomes ARCHIVE_IP, and ARCHIVE_IP becomes ARCHIVE_FAILOVER_IP, and maybe a backup copy of ARCHIVE_FAILOVER_COPY is kept as a comment
315
+ // TODO bug6203: then refresh the configuration...
316
+ int TODO;
315 317
final ReverseProxy<String, SailingAnalyticsMetrics, SailingAnalyticsProcess<String>, RotatingFileBasedLog> reverseProxyCluster =
316 318
getLandscape().getCentralReverseProxy(region);
317
- final String candidateHostname = archiveReplicaSet.getHostname();
318 319
logger.info("Removing reverse proxy rule for archive candidate with hostname "+ candidateHostname);
319
- reverseProxyCluster.removePlainRedirect(candidateHostname);
320
- final String archiveHostname = getHostname(SharedLandscapeConstants.ARCHIVE_SUBDOMAIN, Optional.empty());
321
- logger.info("Adding reverse proxy rule for new archive server with hostname "+ archiveHostname);
322
- reverseProxyCluster.setPlainRedirect(archiveHostname, archiveReplicaSet.getMaster(), Optional.ofNullable(optionalKeyName), privateKeyEncryptionPassphrase);
320
+ reverseProxyCluster.removeRedirect(candidateHostname, Optional.ofNullable(optionalKeyName), privateKeyEncryptionPassphrase);
323 321
}
324 322
325 323
@Override
java/com.sap.sse.landscape.aws/src/com/sap/sse/landscape/aws/impl/ApacheReverseProxy.java
... ...
@@ -264,7 +264,6 @@ implements com.sap.sse.landscape.Process<RotatingFileBasedLog, MetricsT> {
264 264
removeRedirect(configFileName, hostname, optionalKeyName, privateKeyEncryptionPassphrase);
265 265
}
266 266
267
-
268 267
/**
269 268
* @param configFileName The name of the file to remove.
270 269
* @param hostname The hostname which was removed.