b7a676a7059109f9c65a4b01152f101c89b193f0
java/com.sap.sailing.landscape.ui/src/com/sap/sailing/landscape/ui/client/LandscapeManagementPanel.java
| ... | ... | @@ -1527,13 +1527,13 @@ public class LandscapeManagementPanel extends SimplePanel { |
| 1527 | 1527 | new AsyncCallback<Void>() { |
| 1528 | 1528 | @Override |
| 1529 | 1529 | public void onFailure(Throwable caught) { |
| 1530 | - applicationReplicaSetsBusy.setBusy(true); |
|
| 1530 | + applicationReplicaSetsBusy.setBusy(false); |
|
| 1531 | 1531 | errorReporter.reportError(caught.getMessage()); |
| 1532 | 1532 | } |
| 1533 | 1533 | |
| 1534 | 1534 | @Override |
| 1535 | 1535 | public void onSuccess(Void result) { |
| 1536 | - applicationReplicaSetsBusy.setBusy(true); |
|
| 1536 | + applicationReplicaSetsBusy.setBusy(false); |
|
| 1537 | 1537 | Notification.notify(stringMessages.successfullySwitchedToNewArchiveCandidate(archiveReplicaSetToUpgrade.getName()), NotificationType.SUCCESS); |
| 1538 | 1538 | } |
| 1539 | 1539 | }); |
java/com.sap.sailing.landscape/src/com/sap/sailing/landscape/SailingReleaseRepository.java
| ... | ... | @@ -1,15 +1,11 @@ |
| 1 | 1 | package com.sap.sailing.landscape; |
| 2 | 2 | |
| 3 | 3 | import com.sap.sse.landscape.ReleaseRepository; |
| 4 | -import com.sap.sse.landscape.impl.FolderBasedReleaseRepositoryImpl; |
|
| 4 | +import com.sap.sse.landscape.impl.GithubReleasesRepository; |
|
| 5 | 5 | |
| 6 | 6 | public interface SailingReleaseRepository extends ReleaseRepository { |
| 7 | - // TODO bug6203: avoid rate limits by temporarily using the old folder-based releases repo again: |
|
| 8 | - ReleaseRepository INSTANCE = new FolderBasedReleaseRepositoryImpl("https://releases.sapsailing.com", /* master release name prefix */ "main"); |
|
| 9 | - |
|
| 10 | - default void m() { int TODO_UseGithubReleasesRepositoryAgain; } |
|
| 11 | -// ReleaseRepository INSTANCE = new GithubReleasesRepository( |
|
| 12 | -// "SAP", // owner |
|
| 13 | -// "sailing-analytics", // repo name |
|
| 14 | -// "main"); // main release name prefix |
|
| 7 | + ReleaseRepository INSTANCE = new GithubReleasesRepository( |
|
| 8 | + "SAP", // owner |
|
| 9 | + "sailing-analytics", // repo name |
|
| 10 | + "main"); // main release name prefix |
|
| 15 | 11 | } |
java/com.sap.sailing.landscape/src/com/sap/sailing/landscape/impl/ArchiveCandidateMonitoringBackgroundTask.java
| ... | ... | @@ -151,11 +151,11 @@ public class ArchiveCandidateMonitoringBackgroundTask implements Runnable { |
| 151 | 151 | public void run() { |
| 152 | 152 | try { |
| 153 | 153 | if (currentCheck.runCheck()) { |
| 154 | - logger.info("Check "+currentCheck+" passed."); |
|
| 154 | + logger.info("Check \""+currentCheck+"\" passed."); |
|
| 155 | 155 | // the check passed; proceed to next check, if any |
| 156 | 156 | currentCheck = checksIterator.hasNext() ? checksIterator.next() : null; |
| 157 | 157 | if (currentCheck != null) { |
| 158 | - logger.info("More checks to do; re-scheduling to run next check "+currentCheck); |
|
| 158 | + logger.info("More checks to do; re-scheduling to run next check \""+currentCheck+"\""); |
|
| 159 | 159 | // re-schedule this task to run next check immediately |
| 160 | 160 | executor.submit(this); |
| 161 | 161 | } else { |
| ... | ... | @@ -167,8 +167,13 @@ public class ArchiveCandidateMonitoringBackgroundTask implements Runnable { |
| 167 | 167 | rescheduleCurrentCheckAfterFailureOrTimeout(); |
| 168 | 168 | } |
| 169 | 169 | } catch (Exception e) { |
| 170 | - logger.warning("Exception while running check " + currentCheck + " for candidate " + replicaSet.getMaster().getHost().getHostname() + ": " + e.getMessage()); |
|
| 170 | + logger.warning("Exception while running check \"" + currentCheck + "\" for candidate " + replicaSet.getMaster().getHost().getHostname() + ": " + e.getMessage()); |
|
| 171 | 171 | currentCheck.setLastFailureMessage(e.getMessage()); |
| 172 | + try { |
|
| 173 | + rescheduleCurrentCheckAfterFailureOrTimeout(); |
|
| 174 | + } catch (MailException e1) { |
|
| 175 | + logger.severe("Issue while trying to send mail: "+e.getMessage()+"; user may not know what to do next!"); |
|
| 176 | + } |
|
| 172 | 177 | } |
| 173 | 178 | } |
| 174 | 179 |
java/com.sap.sailing.landscape/src/com/sap/sailing/landscape/impl/LandscapeServiceImpl.java
| ... | ... | @@ -359,8 +359,12 @@ public class LandscapeServiceImpl implements LandscapeService { |
| 359 | 359 | + archiveAndFailoverIPs.getA() + ". Turning production into failover and candidate into production."); |
| 360 | 360 | reverseProxyCluster.setArchiveAndFailoverIPs(candidate.getHost().getPrivateAddress().getHostAddress(), |
| 361 | 361 | archiveAndFailoverIPs.getA(), Optional.ofNullable(optionalKeyName), privateKeyEncryptionPassphrase); |
| 362 | - final SailingAnalyticsHost<String> oldProductionArchive = getLandscape().getHostByPrivateDnsNameOrIpAddress(region, archiveAndFailoverIPs.getA(), new SailingAnalyticsHostSupplier<>()); |
|
| 363 | - getLandscape().setInstanceName(oldProductionArchive, SharedLandscapeConstants.ARCHIVE_SERVER_FAILOVER_INSTANCE_NAME); |
|
| 362 | + try { |
|
| 363 | + final SailingAnalyticsHost<String> oldProductionArchive = getLandscape().getHostByPrivateDnsNameOrIpAddress(region, archiveAndFailoverIPs.getA(), new SailingAnalyticsHostSupplier<>()); |
|
| 364 | + getLandscape().setInstanceName(oldProductionArchive, SharedLandscapeConstants.ARCHIVE_SERVER_FAILOVER_INSTANCE_NAME); |
|
| 365 | + } catch (Exception e) { |
|
| 366 | + logger.warning("Couldn't find old production ARCHIVE with IP "+archiveAndFailoverIPs.getA()+", so couldn't update its Name tag"); |
|
| 367 | + } |
|
| 364 | 368 | getLandscape().setInstanceName(candidate.getHost(), SharedLandscapeConstants.ARCHIVE_SERVER_INSTANCE_NAME); |
| 365 | 369 | logger.info("Removing reverse proxy rule for archive candidate with hostname "+ candidateHostname); |
| 366 | 370 | reverseProxyCluster.removeRedirect(candidateHostname, Optional.ofNullable(optionalKeyName), privateKeyEncryptionPassphrase); |
java/com.sap.sse.landscape/src/com/sap/sse/landscape/ssh/SshCommandChannelImpl.java
| ... | ... | @@ -51,7 +51,7 @@ public class SshCommandChannelImpl implements SshCommandChannel { |
| 51 | 51 | public InputStream sendCommandLineSynchronously(String commandLine, OutputStream stderr) throws IOException, InterruptedException, JSchException { |
| 52 | 52 | stdout = channel.getInputStream(); |
| 53 | 53 | channel.setCommand(commandLine); |
| 54 | - channel.setExtOutputStream(stderr); |
|
| 54 | + channel.setErrStream(stderr); |
|
| 55 | 55 | channel.connect(/* timeout in milliseconds */ 5000); |
| 56 | 56 | return stdout; |
| 57 | 57 | } |