From f3c607cf909ac767360a39a3940e3aac83d9674c Mon Sep 17 00:00:00 2001 From: Rudolf Meijering Date: Wed, 25 Mar 2020 12:32:02 +0100 Subject: [PATCH 1/2] Fix incorrect config validation on SIGHUP --- src/legacy/server/kbn_server.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/legacy/server/kbn_server.js b/src/legacy/server/kbn_server.js index 6991527a9503c..e627c1be29ddd 100644 --- a/src/legacy/server/kbn_server.js +++ b/src/legacy/server/kbn_server.js @@ -22,7 +22,6 @@ import { constant, once, compact, flatten } from 'lodash'; import { isWorker } from 'cluster'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { fromRoot, pkg } from '../../core/server/utils'; -import { Config } from './config'; import loggingConfiguration from './logging/configuration'; import httpMixin from './http'; import { coreMixin } from './core'; @@ -198,9 +197,7 @@ export default class KbnServer { return await this.server.inject(opts); } - applyLoggingConfiguration(settings) { - const config = new Config(this.config.getSchema(), settings); - + applyLoggingConfiguration(config) { const loggingOptions = loggingConfiguration(config); const subset = { ops: config.get('ops'), From 0c49908ec194b2dc30ba3a3b169846410d989703 Mon Sep 17 00:00:00 2001 From: Rudolf Meijering Date: Wed, 25 Mar 2020 14:46:04 +0100 Subject: [PATCH 2/2] Use the default schema factory to create logging config --- src/legacy/server/kbn_server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/legacy/server/kbn_server.js b/src/legacy/server/kbn_server.js index e627c1be29ddd..e06212d87e3e3 100644 --- a/src/legacy/server/kbn_server.js +++ b/src/legacy/server/kbn_server.js @@ -22,6 +22,7 @@ import { constant, once, compact, flatten } from 'lodash'; import { isWorker } from 'cluster'; // eslint-disable-next-line @kbn/eslint/no-restricted-paths import { fromRoot, pkg } from '../../core/server/utils'; +import { Config } from './config'; import loggingConfiguration from './logging/configuration'; import httpMixin from './http'; import { coreMixin } from './core'; @@ -197,7 +198,8 @@ export default class KbnServer { return await this.server.inject(opts); } - applyLoggingConfiguration(config) { + applyLoggingConfiguration(settings) { + const config = Config.withDefaultSchema(settings); const loggingOptions = loggingConfiguration(config); const subset = { ops: config.get('ops'),