Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reloading the config breaks legacy config validation #59494

Closed
joshdover opened this issue Mar 5, 2020 · 2 comments · Fixed by #61246
Closed

Reloading the config breaks legacy config validation #59494

joshdover opened this issue Mar 5, 2020 · 2 comments · Fixed by #61246
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.6.2 v7.7.0

Comments

@joshdover
Copy link
Contributor

joshdover commented Mar 5, 2020

Reloading the config breaks legacy config validation when a SIGHUP is received.

Steps to reproduce:

  • Set a valid config for an xpack plugin, such as xpack.licensing.api_polling_frequency: 30000
  • Start kibana
  • Send a SIGHUP signal to Kibana
  • Validation error in logs:
    { ValidationError: child "xpack" fails because ["licensing" is not allowed]
    at Object.exports.process (/kibana/node_modules/joi/lib/errors.js:196:19)
    at internals.Object._validateWithOptions (/kibana/node_modules/joi/lib/types/any/index.js:675:31)
    at module.exports.internals.Any.root.validate (/kibana/node_modules/joi/lib/index.js:146:23)
    at Config._commit (/kibana/src/legacy/server/config/config.js:132:34)
    at Config.set (/kibana/src/legacy/server/config/config.js:103:10)
    at Config.extendSchema (/kibana/src/legacy/server/config/config.js:75:10)
    at _lodash.default.each.child (/kibana/src/legacy/server/config/config.js:64:14)
    at arrayEach (/kibana/node_modules/lodash/index.js:1315:13)
    at Function.<anonymous> (/kibana/node_modules/lodash/index.js:3393:13)
    at Config.extendSchema (/kibana/src/legacy/server/config/config.js:63:30)
    at new Config (/kibana/src/legacy/server/config/config.js:54:10)
    at KbnServer.applyLoggingConfiguration (/kibana/src/legacy/server/kbn_server.js:197:20)
    at TapSubscriber.update$.pipe [as _tapNext] (/kibana/src/core/server/legacy/legacy_service.js:85:24)
    at TapSubscriber._next (/kibana/node_modules/rxjs/internal/operators/tap.js:59:27)
    at TapSubscriber.Subscriber.next (/kibana/node_modules/rxjs/internal/Subscriber.js:66:18)
    at CombineLatestSubscriber.notifyNext (/kibana/node_modules/rxjs/internal/observable/combineLatest.js:97:34) name: 'ValidationError' }
    

There a couple problems here:

  1. This ValidationError should be triggered when Kibana first starts up, not only config reload.
  2. Config paths should not be allowed to overlap
@joshdover joshdover added bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:New Platform labels Mar 5, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

@joshdover joshdover changed the title Overlapping config paths should not be allowed Reloading the config breaks legacy config validation Mar 5, 2020
@mshustov
Copy link
Contributor

mshustov commented Mar 6, 2020

@joshdover it seems we stumbled upon this bug again #43513 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:New Platform Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.6.2 v7.7.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants