aboutsummaryrefslogtreecommitdiffstats
path: root/config-provisioning/src/main/java/com/yahoo/config/provision/exception
diff options
context:
space:
mode:
Diffstat (limited to 'config-provisioning/src/main/java/com/yahoo/config/provision/exception')
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/exception/ApplicationLockException.java16
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/exception/CertificateNotReadyException.java17
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/exception/LoadBalancerServiceException.java15
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/exception/OutOfCapacityException.java18
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/exception/ParentHostUnavailableException.java18
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/exception/TransientException.java20
-rw-r--r--config-provisioning/src/main/java/com/yahoo/config/provision/exception/package-info.java5
7 files changed, 109 insertions, 0 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ApplicationLockException.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ApplicationLockException.java
new file mode 100644
index 00000000000..9e9fe83c478
--- /dev/null
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ApplicationLockException.java
@@ -0,0 +1,16 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config.provision.exception;
+
+/**
+ *
+ * Exception thrown when we are unable to get the Zookeeper application lock.
+ * @author hmusum
+ *
+ */
+public class ApplicationLockException extends RuntimeException {
+
+ public ApplicationLockException(Exception e) {
+ super(e);
+ }
+
+}
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/exception/CertificateNotReadyException.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/CertificateNotReadyException.java
new file mode 100644
index 00000000000..fccc95f49c6
--- /dev/null
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/CertificateNotReadyException.java
@@ -0,0 +1,17 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config.provision.exception;
+
+/**
+ * Exception thrown when trying to validate an application which is configured
+ * with a certificate that is not yet retrievable
+ *
+ * @author andreer
+ *
+ */
+public class CertificateNotReadyException extends TransientException {
+
+ public CertificateNotReadyException(String message) {
+ super(message);
+ }
+
+}
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/exception/LoadBalancerServiceException.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/LoadBalancerServiceException.java
new file mode 100644
index 00000000000..eb89a710534
--- /dev/null
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/LoadBalancerServiceException.java
@@ -0,0 +1,15 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config.provision.exception;
+
+/**
+ * Transient exception thrown on behalf of a load balancer service
+ *
+ * @author mpolden
+ */
+public class LoadBalancerServiceException extends TransientException {
+
+ public LoadBalancerServiceException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/exception/OutOfCapacityException.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/OutOfCapacityException.java
new file mode 100644
index 00000000000..1ff9bef2b62
--- /dev/null
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/OutOfCapacityException.java
@@ -0,0 +1,18 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config.provision.exception;
+
+/**
+ *
+ * Exception thrown when we are unable to fulfill the request due to
+ * having too few nodes (of the specified flavor)
+ *
+ * @author hmusum
+ *
+ */
+public class OutOfCapacityException extends RuntimeException {
+
+ public OutOfCapacityException(String message) {
+ super(message);
+ }
+
+}
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ParentHostUnavailableException.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ParentHostUnavailableException.java
new file mode 100644
index 00000000000..b955d20dfa5
--- /dev/null
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/ParentHostUnavailableException.java
@@ -0,0 +1,18 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config.provision.exception;
+
+/**
+ *
+ * Exception thrown when trying to activate a node that runs on a host that is not
+ * yet ready to run the node.
+ *
+ * @author freva
+ *
+ */
+public class ParentHostUnavailableException extends TransientException {
+
+ public ParentHostUnavailableException(String message) {
+ super(message);
+ }
+
+}
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/exception/TransientException.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/TransientException.java
new file mode 100644
index 00000000000..822e722f5d9
--- /dev/null
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/TransientException.java
@@ -0,0 +1,20 @@
+// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config.provision.exception;
+
+/**
+ * A provisioning exception that is considered transient. Exceptions that we expect to recover from after a short
+ * duration should extend this. Throwing a subclass of this indicates that the operation can safely be retried.
+ *
+ * @author mpolden
+ */
+public abstract class TransientException extends RuntimeException {
+
+ public TransientException(String message) {
+ super(message);
+ }
+
+ public TransientException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/exception/package-info.java b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/package-info.java
new file mode 100644
index 00000000000..5730f3fdb6b
--- /dev/null
+++ b/config-provisioning/src/main/java/com/yahoo/config/provision/exception/package-info.java
@@ -0,0 +1,5 @@
+// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+@ExportPackage
+package com.yahoo.config.provision.exception;
+
+import com.yahoo.osgi.annotation.ExportPackage;