diff options
author | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-01-03 15:17:45 +0100 |
---|---|---|
committer | Jon Marius Venstad <jvenstad@yahoo-inc.com> | 2018-01-03 15:17:45 +0100 |
commit | f9321adb9c847dc5d412d99aad12f64a002c2776 (patch) | |
tree | d2a015d7db2a7cb1ed4b6e4e94af7ce56c796438 /controller-server | |
parent | e142050c5bea2d5ff68ead04a4343cfa8edc008d (diff) |
List all applications failing upgrade in issue;
;
Diffstat (limited to 'controller-server')
2 files changed, 12 insertions, 4 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java index 324868878af..4c477cc7e5b 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/maintenance/DeploymentIssueReporter.java @@ -1,6 +1,7 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.maintenance; +import com.yahoo.component.Version; import com.yahoo.config.provision.ApplicationId; import com.yahoo.vespa.hosted.controller.Application; import com.yahoo.vespa.hosted.controller.Controller; @@ -75,17 +76,23 @@ public class DeploymentIssueReporter extends Maintainer { * longer than the set grace period, or update this list if the issue already exists. */ private void maintainPlatformIssue(List<Application> applications) { - if ( ! (controller().versionStatus().version(controller().systemVersion()).confidence() == broken)) + Version systemVersion = controller().systemVersion(); + + if ((controller().versionStatus().version(systemVersion).confidence() != broken)) + return; + + if (ApplicationList.from(applications) + .failingUpgradeToVersionSince(systemVersion, controller().clock().instant().minus(upgradeGracePeriod)) + .isEmpty()) return; List<ApplicationId> failingApplications = ApplicationList.from(applications) - .failingUpgradeToVersionSince(controller().systemVersion(), controller().clock().instant().minus(upgradeGracePeriod)) + .failingUpgradeToVersionSince(systemVersion, controller().clock().instant()) .asList().stream() .map(Application::id) .collect(Collectors.toList()); - if ( ! failingApplications.isEmpty()) - deploymentIssues.fileUnlessOpen(failingApplications, controller().systemVersion()); + deploymentIssues.fileUnlessOpen(failingApplications, systemVersion); } private Tenant ownerOf(ApplicationId applicationId) { diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java index 4bcee5782ee..3b06fbf8615 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/versions/VespaVersion.java @@ -156,4 +156,5 @@ public class VespaVersion implements Comparable<VespaVersion> { int brokenByThisVersion = failingNonCanaries.size(); return brokenByThisVersion >= 4 && brokenByThisVersion >= productionOnThis.size() * 0.1; } + } |