Configuration

Main configuration file

By default main configuration file surealived.cfg is placed in /etc/surealived. That file holds basic configuration for surealived and ipvssync. Configuration can be held in separate collections in particular because synchronizer uses only few variables defined inside that set. However in order to protect us from strange errors related to config desynchronization it's better to keep it in that one file.

 

surealived config variables

Here's a list of variables used by tester:

  • maxfd - maximum number of open descriptors (1024 by default).
  • log - path to log or stderr. That value is overwritten
    to stderr if program is not run daemonized (-d parameter).
  • logging - logging verbosity in ascending order:
    error, warn, info, debug, debdt.
    This value is overwritten by -v parameter.
  • modules_path - path to tester's binary modules.
  • modules - comma-separated list of modules
    (WARNING - there must be no space after comma) or all,
    which forces loading all modules from path set in modules_path.
  • epoll_size - minimum epoll size, if there is more services to test
    than this value describes, it will be overwritten
  • loop_interval_ms - defines, how often (in ms) surealived should check
    if virtual time has ended or if virtual tests should be initiated
    (default: 100)
  • epoll_interval_ms - maximum time (in milliseconds) epoll should wait for event
    (default: 10)
  • startup_delay_ms - defines maximum tests start delay,
    start times of reals tests are spread in that period (default: 1000)
  • debug_comm - binary flag (0/1) determining if dumping
    communication with reals, inside given virtual, should be enabled.
    Setting this value to 1 is insufficient prerequisite to dump communication.
  • debug_comm_path - path to directory where communication dump files
    should be saved.
  • memlimit - surealived''s memory limit, if exceeded watchdog will restart application, this value is ignored if surealived isn't run as daemon.
  • listen_addr - interface command address (cmd) on which you can
    get tester statistics and execute active commands like real weight change
    or set its state (ONLINE/OFFLINE/DOWN), default 127.0.0.1.
  • listen_port - interface command port, default 1337.
  • stats_dir - directory path, describing where test stats should be saved
  • log_stats - setting this value to true will enable
    saving test statistics inside stats_dir, each virtual will have it's own file
    named <set>.<timestamp>
  • log_stats_combined - setting this value to true enables
    saving all statistics to one fileno_sync - setting this to true disables synchronization with IPVS
  • use_offline_dump - defines whether offline.dump file should be used, that file
    holds information about reals that are currently offline (negative states file). This file
    is very helpful when restarting application!
  • offline_dump - path to offline.dump file
    (default: /var/lib/surealived/offline.dump, this value is ignored if
    use_offline_dump is set to false)
  • override_dump - path to override.dump file
    (default: /var/lib/surealived/override.dump)

Ipvssync config variables

Here's a list of variables used by synchronizer:

  • ipvssync_log - path to synchronizer's log file or stderr
    (default: /var/log/surealived/ipvssync.log), this value is overwritten
    to stderr if program is not run daemonized (-d parameter).
  • ipvssync_logging - logging verbosity in ascending order:
    error, warn, info, debug, debdt.
    This value is overwritten by -v parameter.

Common variables

Here is a list of variables used by both - tester and synchronizer:

  • lock_sync_file - file used to synchronize between
    ipvssync and surealived (flock).
  • full_sync_file - full synchronization file, containing
    complete IPVS table information (generated every 60 seconds by tester)
  • full_reload_file - file (flag), forcing full resynchronization.
  • diff_sync_dir - directory in which differential synchronization files
    should be stored (files containing changes made after full synchronization).