diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-04-29 12:12:25 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-05-24 15:16:13 +0200 |
commit | 432b79f947965c6fa13102757998d42d0f17ab5e (patch) | |
tree | 44af6d394a7c1fe1efbf2137cb683127ce139408 /config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java | |
parent | f63093f6519dbad54cf7293826100ce6b510880a (diff) |
Assign Slobroks only on cluster controllers
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java b/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java index 6e16b1a120e..6d4da3d995c 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/AbstractService.java @@ -92,10 +92,11 @@ public abstract class AbstractService extends AbstractConfigProducer<AbstractCon * Preferred constructor when building from XML. Use this if you are building * in doBuild() in an AbstractConfigProducerBuilder. * build() will call initService() in that case, after setting hostalias and baseport. - * @param parent Parent config producer in the model tree. - * @param name Name of this service. + * + * @param parent the parent config producer in the model tree + * @param name the name of this service */ - public AbstractService(AbstractConfigProducer parent, String name) { + public AbstractService(AbstractConfigProducer<?> parent, String name) { super(parent, name); } @@ -107,6 +108,13 @@ public abstract class AbstractService extends AbstractConfigProducer<AbstractCon super(name); } + @Override + protected void remove() { + super.remove(); + if (hostResource != null) + hostResource.deallocateService(this); + } + /** * Distribute affinity on a collection of services. Services that are located on the same host * will be assigned a specific cpu socket on that host. |