Skip to content

Commit

Permalink
Bug in instance param management.
Browse files Browse the repository at this point in the history
  • Loading branch information
pdechamboux committed May 27, 2020
1 parent 37ee828 commit 503f4f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public Catalog catalog() {
param_props.put("minimum", Parameters.MINMEMORYSIZE);
param_props.put("maximum", Parameters.MAXMEMORYSIZE);
param_props.put("multipleOf", Parameters.INCMEMORYSIZE);
props.put(MatomoServiceInstanceService.PARAM_INSTANCES, param_props);
props.put(MatomoServiceInstanceService.PARAM_MEMORYSIZE, param_props);
MethodSchema methodSchema = MethodSchema.builder()
.parameters("$schema", "http://json-schema.org/draft-04/schema#")
.parameters("type", "object")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ public String updateMatomoInstance(String uuid, String pfid, Parameters paramete
}
if (pmi.getInstances() == parameters.getCfInstances()) {
parameters.setCfInstances(-1);
} else if (pmi.getPlanId().equals(ServiceCatalogConfiguration.PLANGLOBSHARDB_UUID)) {
LOGGER.warn("Cannot scale service instance for that plan.");
parameters.setCfInstances(-1);
} else {
LOGGER.debug("Upgrade Matomo instance nodes from {} to {}.", pmi.getInstances(), parameters.getCfInstances());
pmi.setIntances(parameters.getCfInstances());
Expand Down

0 comments on commit 503f4f9

Please sign in to comment.