diff options
author | Jon Bratseth <bratseth@gmail.com> | 2022-02-24 13:21:36 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2022-02-24 13:21:36 +0100 |
commit | 1e37c945f44837557014714886b09caeeecc9504 (patch) | |
tree | 079bb33e0cb0ef53c731fc6a45432141a4c2a20f /config-model/src/main/java/com/yahoo/config | |
parent | ccf690fbe40e769161c6bf15bbd0d2f87ad7cefa (diff) |
Make the error message meaningful for users
If application packages uses <nodes count=... syntax
but also have a hosts.xml file, and are deploying
self-hosted we will fail, but should do so with an
understandable error.
Diffstat (limited to 'config-model/src/main/java/com/yahoo/config')
-rw-r--r-- | config-model/src/main/java/com/yahoo/config/model/provision/HostsXmlProvisioner.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config-model/src/main/java/com/yahoo/config/model/provision/HostsXmlProvisioner.java b/config-model/src/main/java/com/yahoo/config/model/provision/HostsXmlProvisioner.java index a9ee440f22c..5a6a8e86e6a 100644 --- a/config-model/src/main/java/com/yahoo/config/model/provision/HostsXmlProvisioner.java +++ b/config-model/src/main/java/com/yahoo/config/model/provision/HostsXmlProvisioner.java @@ -45,9 +45,12 @@ public class HostsXmlProvisioner implements HostProvisioner { throw new IllegalArgumentException("Unable to find host for alias '" + alias + "'"); } + /** Called when provisioning nodes using <nodes count="..." */ @Override public List<HostSpec> prepare(ClusterSpec cluster, Capacity quantity, ProvisionLogger logger) { - throw new UnsupportedOperationException("Prepare on an XML host provisioner is not supported"); + throw new UnsupportedOperationException("Using <nodes count=\"...\"> is not supported when there is a " + + "hosts.xml file. Remove hosts.xml to make this deployable on " + + "Vespa Cloud and single-node self-hosted instances."); } private HostSpec host2HostSpec(Host host) { |