aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/sdc-backend/chef-repo/cookbooks/sdc-catalog-be
AgeCommit message (Expand)AuthorFilesLines
2018-07-31fix UEB configurationMichael Lando1-2/+1
2018-07-29marge fixMichael Lando1-1/+1
2018-07-29re base codeMichael Lando4-28/+70
2018-06-12update sdc logic for new typesMichael Lando1-1/+1
2018-06-06update documentationMichael Lando1-1/+1
2018-05-31Fix SDC DCAE configurationAreli, Fuss (af732p)2-2/+2
2018-05-28Change dcae health uriAreli, Fuss (af732p)1-3/+2
2018-05-02fix catalog be startupMichael Lando1-1/+1
2018-05-01Update DCAE BE and FE configurationAreli, Fuss (af732p)3-7/+12
2018-04-28set base imagesMichael Lando1-6/+6
2018-04-24Add cluster resiliance supportAreli, Fuss (af732p)6-12/+28
2018-04-24Create on boarding dockerAvi Ziv3-7/+15
2018-04-17fix miss match in the notificationml636r2-2/+7
2018-04-11Add support of http and httpsAreli, Fuss (af732p)1-0/+8
2018-04-11Add support of http and httpsAreli, Fuss (af732p)5-24/+119
2018-04-11Replace ssl configurationAreli, Fuss (af732p)4-10/+14
2018-03-07Sync Integ to MasterMichael Lando2-1/+90
2018-02-27ES OOM alignmentYuli Shlosberg1-2/+0
2018-02-25update template filesYuli Shlosberg1-1/+3
2018-02-21OOM Alignment BE,FE,KBNYuli Shlosberg19-0/+1056
> DynamicConfiguration(List<Configurable> configurables, MapperConfig originalConfig) { super(RECONFIGURE_ENDPOINT); this.configurables = configurables; this.originalConfig = originalConfig; this.configHandler = new ConfigHandler(); } private void applyConfiguration(MapperConfig updatedConfig) throws ReconfigurationException { for (Configurable configurable : configurables) { logger.unwrap().debug("Reconfiguring: {}", configurable); configurable.reconfigure(updatedConfig); } } /** * Receives requests to pull the latest configuration from CBS. * @param httpServerExchange inbound http server exchange. * @throws Exception */ @Override public void handleRequest(HttpServerExchange httpServerExchange) throws Exception { try { logger.entering(new HttpServerExchangeAdapter(httpServerExchange)); boolean reconfigured = reconfigure(); int responseCode = reconfigured? StatusCodes.OK : StatusCodes.INTERNAL_SERVER_ERROR; String responseMessage = reconfigured ? StatusCodes.OK_STRING : StatusCodes.INTERNAL_SERVER_ERROR_STRING; httpServerExchange.setStatusCode(responseCode).getResponseSender().send(responseMessage); } finally { logger.exiting(); } } /** * @return Boolean to indicate if configuration attempt was successful * @throws Exception If environment config cannot be read, or if re-applying the original config fails */ public boolean reconfigure() throws Exception { boolean success = true; MapperConfig config = configHandler.getMapperConfig(); if (!this.originalConfig.equals(config)) { logger.unwrap().info("Configuration update detected."); logger.unwrap().info("Reconfiguring configurables"); try { applyConfiguration(config); this.originalConfig = config; } catch (ReconfigurationException e) { success = false; logger.unwrap().error("Failed to apply configuration update, reverting to original config", e); applyConfiguration(this.originalConfig); } } return success; } }