Exemplo n.º 1
0
def cli(check_mode, log_level, path_to_file):
    """Starts fixing all ILM errors"""

    logging_level(log_level)
    class_log.logger.info("Starts fixing all ILM errors")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    generating_variables_for_fix_error()
    deleting_unnecessary_variables()

    start_fix_error_ilm_all(check_mode)
    start_check_mode_fix_error_ilm_all(check_mode)
Exemplo n.º 2
0
def cli(check_mode, log_level, path_to_file):
  """Runs all commands in order"""

  logging_level(log_level)
  class_log.logger.info("Started all fix ilm error")

  updating_variables(path_to_file)

  generating_variables_for_indices()
  generating_variables_for_delete()
  deleting_unnecessary_variables()

  start_delete_indexes_all(check_mode)
  start_check_mode_delete_indexes_all(check_mode)
Exemplo n.º 3
0
def cli(check_mode, log_level, path_to_file):
  """Adding a second alias for only shrink indexes"""

  logging_level(log_level)
  class_log.logger.info("Started adding a second alias for only shrink indexes")

  updating_variables(path_to_file)

  generating_variables_for_indices()
  generating_variables_for_alias()
  deleting_unnecessary_variables()

  start_add_alias_for_shrink_indices(check_mode)
  start_check_mode_add_alias_for_shrink_indices(check_mode)
Exemplo n.º 4
0
def cli(check_mode, log_level, path_to_file):
  """Deletion of empty not last indexes"""

  logging_level(log_level)
  class_log.logger.info("Started deletion of empty not last indexes")

  updating_variables(path_to_file)

  generating_variables_for_indices()
  generating_variables_for_delete()
  deleting_unnecessary_variables()

  start_delete_not_last_indexes(check_mode)
  start_check_mode_delete_not_last_indexes(check_mode)
Exemplo n.º 5
0
def cli(check_mode, log_level, path_to_file):
    """Starts fixing the mapping error in unassigned shards"""

    logging_level(log_level)
    class_log.logger.info(
        "Starts fixing the mapping error in unassigned shards")

    updating_variables(path_to_file)

    generating_variables_for_shards()
    generating_variables_for_unassigned_shard()

    start_fix_mapping_error_in_unassigned_shards(check_mode)
    start_check_mode_fix_mapping_error_in_unassigned_shards(check_mode)
Exemplo n.º 6
0
def cli(check_mode, log_level, path_to_file):
    """Runs all commands in order"""

    logging_level(log_level)
    class_log.logger.info("Started adding an alias for indexes")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    generating_variables_for_alias()
    deleting_unnecessary_variables()

    start_add_alias_for_all_indices(check_mode)
    start_check_mode_add_alias_for_all_indices(check_mode)
Exemplo n.º 7
0
def cli(check_mode, log_level, path_to_file):
  """Creates indexes from closed ones and includes write"""

  logging_level(log_level)
  class_log.logger.info("Starts creates indexes from closed ones and includes write")

  updating_variables(path_to_file)

  generating_variables_for_indices()
  generating_variables_for_write_close_indices()
  deleting_unnecessary_variables()

  start_creating_new_index_for_writing(check_mode)
  start_check_mode_creating_new_index_for_writing(check_mode)
Exemplo n.º 8
0
def cli(check_mode, log_level, path_to_file):
    """Update setting index.unassigned.node_left.delayed_timeout"""

    logging_level(log_level)
    class_log.logger.info("Started update index settings")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    generating_variables_for_update()
    deleting_unnecessary_variables()

    start_update_timeout_all(check_mode)
    start_check_update_timeout_all(check_mode)
Exemplo n.º 9
0
def cli(check_mode, log_level, path_to_file):
    """Next step only the not latest indexes (not shrink index)"""

    logging_level(log_level)
    class_log.logger.info(
        "Started next step only the not latest indexes (not shrink index)")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    generating_variables_for_rollover_next_step()
    deleting_unnecessary_variables()

    start_next_step_for_not_last_index(check_mode)
    start_check_mode_next_step_for_not_last_index(check_mode)
Exemplo n.º 10
0
def cli(check_mode, log_level, path_to_file):
    """Adding a parameter to allow writing to the primary index"""

    logging_level(log_level)
    class_log.logger.info(
        "Starts adding a parameter to allow writing to the primary index")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    generating_variables_for_write_alias()
    deleting_unnecessary_variables()

    start_add_alias_for_all_indices(check_mode)
    start_check_mode_add_alias_for_all_indices(check_mode)
Exemplo n.º 11
0
def cli(check_mode, log_level, path_to_file):
    """Rollover only the latest big shrink indexes"""

    logging_level(log_level)
    class_log.logger.info(
        "Started rollover only the latest big shrink indexes")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    generating_variables_for_rollover()
    generating_variables_for_rollover_next_step()
    deleting_unnecessary_variables()

    start_rollover_last_shrink_indices(check_mode)
    start_check_mode_rollover_last_shrink_indices(check_mode)
Exemplo n.º 12
0
def cli(check_mode, log_level, path_to_file):
    """Runs all commands in order (only for big indexes)"""

    logging_level(log_level)
    class_log.logger.info(
        "Started rollover all big indexes (only for big indexes)")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    generating_variables_for_rollover()
    generating_variables_for_rollover_next_step()
    deleting_unnecessary_variables()

    start_rollover_all(check_mode)
    start_check_mode_rollover_all(check_mode)
Exemplo n.º 13
0
def cli(check_mode, log_level, not_shrink, path_to_file):
    """Adding a primary alias for all indexes"""

    logging_level(log_level)
    class_log.logger.info("Started adding a primary alias for all indexes")

    updating_variables(path_to_file)

    generating_variables_for_indices()
    if not_shrink:
        generating_variables_for_alias_not_srink()
    else:
        generating_variables_for_alias()
    deleting_unnecessary_variables()

    start_add_necessary_alias_for_indices(check_mode)
    start_check_mode_add_necessary_alias_for_indices(check_mode)