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

Misleading license log messages with a fresh Basic installation #95032

Closed
xeraa opened this issue Mar 21, 2021 · 8 comments · Fixed by #95973
Closed

Misleading license log messages with a fresh Basic installation #95032

xeraa opened this issue Mar 21, 2021 · 8 comments · Fixed by #95973
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:CCR and Remote Clusters Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more triage_needed

Comments

@xeraa
Copy link

xeraa commented Mar 21, 2021

Kibana version: 7.11.1

Elasticsearch version: 7.11.1

Server OS version: Ubuntu 20.04

Browser version: Chrome

Browser OS version: Latest

Original install method (e.g. download page, yum, from source, etc.): tar.gz but same for Docker images and others

Describe the bug: When starting a fresh cluster in Basic (no trial started), without configuring anything related to Watcher or CCR, Kibana's log still includes the following messages:

  log   [20:53:46.404] [info][plugins][watcher] Your basic license does not support watcher. Please upgrade your license.
  log   [20:53:46.416] [info][crossClusterReplication][plugins] Your basic license does not support crossClusterReplication. Please upgrade your license.

Especially for new users this is unexpected and confusing. We shouldn't print Please upgrade your license if this isn't actually necessary.

Steps to reproduce: Start a fresh installation and watch the Kibana logs

Expected behavior: Don't log things that haven't been configured and are only confusing for users starting a cluster.

Screenshots (if relevant): none

Errors in browser console (if relevant): none

Provide logs and/or server output (if relevant):

  log   [20:53:45.336] [info][plugins-system] Starting [101] plugins: [taskManager,licensing,globalSearch,globalSearchProviders,code,usageCollection,xpackLegacy,telemetryCollectionManager,telemetry,telemetryCollectionXpack,kibanaUsageCollection,securityOss,newsfeed,mapsLegacy,kibanaLegacy,translations,share,legacyExport,embeddable,uiActionsEnhanced,expressions,charts,esUiShared,bfetch,data,home,observability,console,consoleExtensions,apmOss,searchprofiler,painlessLab,grokdebugger,management,indexPatternManagement,advancedSettings,fileUpload,savedObjects,visualizations,visTypeVislib,visTypeVega,visTypeTimeseries,visTypeTimeseriesEnhanced,visTypeTimelion,features,licenseManagement,dataEnhanced,watcher,canvas,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeMarkdown,tileMap,regionMap,mapsOss,lensOss,inputControlVis,graph,timelion,dashboard,dashboardEnhanced,visualize,discover,discoverEnhanced,savedObjectsManagement,spaces,security,savedObjectsTagging,maps,lens,reporting,lists,encryptedSavedObjects,dashboardMode,cloud,upgradeAssistant,snapshotRestore,fleet,indexManagement,rollup,remoteClusters,crossClusterReplication,indexLifecycleManagement,enterpriseSearch,ml,beatsManagement,transform,ingestPipelines,eventLog,actions,alerts,triggersActionsUi,stackAlerts,securitySolution,case,infra,monitoring,logstash,apm,uptime]
  log   [20:53:46.404] [info][plugins][watcher] Your basic license does not support watcher. Please upgrade your license.
  log   [20:53:46.416] [info][crossClusterReplication][plugins] Your basic license does not support crossClusterReplication. Please upgrade your license.
  log   [20:53:46.433] [info][kibana-monitoring][monitoring][monitoring][plugins] Starting monitoring stats collection
  log   [20:53:48.511] [info][listening] Server running at https://0.0.0.0:5601
  log   [20:53:49.216] [info][server][Kibana][http] http server running at https://0.0.0.0:5601

Any additional context: This was confusing enough for a user to disable replicas because of the CCR message — https://twitter.com/0111010A/status/1373729476069167110

@xeraa xeraa added the bug Fixes for quality problems that affect the customer experience label Mar 21, 2021
@xeraa xeraa changed the title Misleading license log messages Misleading license log messages with a fresh Basic installation Mar 21, 2021
@wylieconlon wylieconlon added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc triage_needed labels Mar 26, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@pgayvallet pgayvallet added the Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more label Mar 29, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@pgayvallet pgayvallet removed the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Mar 29, 2021
@pgayvallet
Copy link
Contributor

cc to @elastic/es-ui, which own both plugins

@cjcenizal
Copy link
Contributor

cjcenizal commented Mar 29, 2021

@elastic/kibana-core I'm moving this issue over to your area because I believe this message is being emitted by the licensing plugin: https://github.com/elastic/kibana/blob/master/x-pack/plugins/licensing/common/license.ts#L130

Happy to chat about this if I'm mistaken!

@cjcenizal cjcenizal added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc and removed Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Mar 29, 2021
@pgayvallet
Copy link
Contributor

pgayvallet commented Mar 30, 2021

The message is coming from licensing. The fact that it's outputted in the logs is not.

watcher:

licensing.license$.subscribe(async (license) => {
const { state, message } = license.check(PLUGIN.ID, PLUGIN.MINIMUM_LICENSE_REQUIRED);
const hasMinimumLicense = state === 'valid';
if (hasMinimumLicense && license.getFeature(PLUGIN.ID)) {
this.log.info('Enabling Watcher plugin.');
this.licenseStatus = {
hasRequired: true,
};
} else {
if (message) {
this.log.info(message);
}

crossClusterReplication

if (hasRequiredLicense) {
this.licenseStatus = { isValid: true };
} else {
this.licenseStatus = {
isValid: false,
message: message || defaultErrorMessage,
};
if (message) {
logger.info(message);
}
}

Core is not responsible for what plugins decide to do with a license check result and/or message. AFAIK these two plugins are the only ones behaving that way.

@pgayvallet pgayvallet added Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more and removed Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Mar 30, 2021
@cjcenizal
Copy link
Contributor

Thanks @pgayvallet! Do you know what the intention of that message from licensing is? Is it intended to be logged? If not, is it surfaced to users some other way? I'm trying to understand the UX we want users to have for plugins unsupported by the current license and how the pieces we're considering here relate to that.

@joshdover
Copy link
Contributor

Hi @cjcenizal!

We just discussed this in our weekly sync and decided that long-term we should probably remove this message key from the return type to encourage plugins to craft the best end-user experience here. Since this low-level licensing API itself does not know exactly where the information is being consumed, it can't provide a default experience that works for all use cases.

For now, I think it makes sense for these ES UI plugins to only log this message when a license-gated API is actually called, inside the guardApiRoute function that you have. Do you think that makes sense?

@cjcenizal
Copy link
Contributor

@joshdover Makes sense! Thanks for clarifying and thanks for the guidance. We'll log the message inside guardApiRoute and also define the message within each plugin, to remove the dependency on the message key.

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:CCR and Remote Clusters Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more triage_needed
Projects
None yet
6 participants