Change default value of elasticsearch replicas
After executing "freezer-scheduler register" we face problem that all shards failed in elasticsearch (ES). If we use number of replicas "0" according to ES documentation for one node installation then this issue disappeared. After "first use" of freezer tool cloud engineer can add additional ES nodes to cluster and fine tune this value in configuration file. Change-Id: I4f2a6562358aefb6244f8d0590a9f138db19a925
This commit is contained in:
parent
5ba9b68167
commit
61f1b3704f
|
@ -347,6 +347,8 @@
|
|||
# path to CA certs on disk (string value)
|
||||
#ca_certs = <None>
|
||||
|
||||
# Number of replicas for elk cluster. Default is 2. Use 0 for no replicas
|
||||
# Number of replicas for elk cluster. Default is 0. Use 0 for no replicas
|
||||
# In a production environment, this value should be equal to:
|
||||
# (Number of elasticsearch node in the cluster - 1)
|
||||
# (integer value)
|
||||
#number_of_replicas = 2
|
||||
#number_of_replicas = 0
|
||||
|
|
|
@ -33,7 +33,7 @@ from freezer_api.common import db_mappings
|
|||
DEFAULT_CONF_PATH = '/etc/freezer/freezer-api.conf'
|
||||
DEFAULT_ES_SERVER_PORT = 9200
|
||||
DEFAULT_INDEX = 'freezer'
|
||||
DEFAULT_REPLICAS = 1
|
||||
DEFAULT_REPLICAS = 0
|
||||
|
||||
|
||||
class MergeMappingException(Exception):
|
||||
|
@ -351,6 +351,8 @@ def get_db_params(args):
|
|||
|
||||
|
||||
def main():
|
||||
print("Using the freezer-db-init script is deprecated. Please use "
|
||||
"freezer-manage instead.")
|
||||
mappings = db_mappings.get_mappings()
|
||||
|
||||
args = get_args(mapping_choices=mappings.keys())
|
||||
|
|
|
@ -34,7 +34,7 @@ LOG = log.getLogger(__name__)
|
|||
|
||||
DEFAULT_ES_SERVER_PORT = 9200
|
||||
DEFAULT_INDEX = 'freezer'
|
||||
DEFAULT_REPLICAS = 1
|
||||
DEFAULT_REPLICAS = 0
|
||||
|
||||
|
||||
def add_db_opts(subparser):
|
||||
|
|
|
@ -57,9 +57,10 @@ def get_elk_opts():
|
|||
default=None,
|
||||
help='path to CA certs on disk'),
|
||||
cfg.IntOpt('number_of_replicas',
|
||||
default=2,
|
||||
help='Number of replicas for elk cluster. Default is 2. '
|
||||
'Use 0 for no replicas')
|
||||
default=0,
|
||||
help='Number of replicas for elk cluster. Default is 0. '
|
||||
'Use 0 for no replicas. This should be set to (number '
|
||||
'of node in the ES cluter -1).')
|
||||
]
|
||||
return storage_opts
|
||||
|
||||
|
|
Loading…
Reference in New Issue