diff options
author | Harald Musum <musum@oath.com> | 2018-07-06 11:22:03 +0200 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2018-07-06 11:22:03 +0200 |
commit | 908b76d684bff7b4bc77269ee2f2f53a0c8c2a46 (patch) | |
tree | 199d99a3a96a454bb8aedc240a3429bd622ff4bd /config-provisioning | |
parent | a9e1f8619ae5a4db3e0909ade11feaf4a263d8ce (diff) |
Do not upgrade applications to current version when bootstrapping in manually deployed zones
Diffstat (limited to 'config-provisioning')
-rw-r--r-- | config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java b/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java index d379788394e..2e53d4384a4 100644 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/Deployer.java @@ -20,7 +20,34 @@ public interface Deployer { * was not present for this id (meaning it either is not active or deployed at another * node in the config server cluster) */ - Optional<Deployment> deployFromLocalActive(ApplicationId application); + default Optional<Deployment> deployFromLocalActive(ApplicationId application) { + return deployFromLocalActive(application, false); + } + + /** + * Creates a new deployment from the active application, if available. Will use the default timeout for deployment. + * + * @param application the active application to be redeployed + * @param bootstrap the deployment is done when bootstrapping + * @return a new deployment from the local active, or empty if a local active application + * was not present for this id (meaning it either is not active or deployed at another + * node in the config server cluster) + */ + Optional<Deployment> deployFromLocalActive(ApplicationId application, boolean bootstrap); + + /** + * Creates a new deployment from the active application, if available. Prefer {@link #deployFromLocalActive(ApplicationId)} + * if possible, this method is for testing and will override the default timeout for deployment. + * + * @param application the active application to be redeployed + * @param timeout the timeout to use for each individual deployment operation + * @return a new deployment from the local active, or empty if a local active application + * was not present for this id (meaning it either is not active or active on another + * node in the config server cluster) + */ + default Optional<Deployment> deployFromLocalActive(ApplicationId application, Duration timeout) { + return deployFromLocalActive(application, timeout, false); + } /** * Creates a new deployment from the active application, if available. Prefer {@link #deployFromLocalActive(ApplicationId)} @@ -28,11 +55,12 @@ public interface Deployer { * * @param application the active application to be redeployed * @param timeout the timeout to use for each individual deployment operation + * @param bootstrap the deployment is done when bootstrapping * @return a new deployment from the local active, or empty if a local active application * was not present for this id (meaning it either is not active or active on another * node in the config server cluster) */ - Optional<Deployment> deployFromLocalActive(ApplicationId application, Duration timeout); + Optional<Deployment> deployFromLocalActive(ApplicationId application, Duration timeout, boolean bootstrap); /** Returns the time the current local active session was created, or empty if there is no local active session */ Optional<Instant> lastDeployTime(ApplicationId application); |