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

Function as though max_local_storage_nodes defaults to 1 in prod mode #19748

Closed
wants to merge 2 commits into from

Commits on Aug 2, 2016

  1. Function as though max_local_storage_nodes defaults to 1 in prod mode

    Defaulting `max_local_storage_nodes` to `50` is useful for testing so
    this patch moves that default from "all the time" to "if you don't bind
    a public ip". If you *do* bind a public IP and attempt to use more than
    a single node per data directory without *explicitly* setting
    `max_local_storage_nodes` then Elasticsearch will now fail to start.
    
    Since you can't change the default for a setting depending on the
    "prod-mode/non-prod-mode" flag we instead use a sentinel value (`0`) of
    `max_local_storage_nodes` to mean "user didn't specify, pick it from
    the "prod-mode/non-prod-mode" flag".
    
    Since we don't know if we're in prod mode when we pick the data directory
    we instead assume that we *aren't* and then check if the directory that
    we picked was OK when we run the `BootstrapCheck`s. The nice thing about
    doing it this way is that we warn the user if they have more than one
    Elasticsearch in their data directory even if they are running even in dev
    mode!
    
    While this is the easiest way to make this change the cost is that, even
    if Elasticsearch fails to start because it is in production mode and
    `max_local_storage_nodes` isn't configured it'll still create a directory.
    
    This also removes some of the documentation that suggests you override the
    setting on all production clusters. That is no longer important because
    Elasticsearch won't start in production mode if you try to start more
    than one node.
    
    Closes elastic#19679
    nik9000 committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    8dc4fa7 View commit details
    Browse the repository at this point in the history
  2. Rename dataDirectoryIndex

    nik9000 committed Aug 2, 2016
    Configuration menu
    Copy the full SHA
    2b5a975 View commit details
    Browse the repository at this point in the history