Skip to content
khosrow edited this page Nov 23, 2014 · 7 revisions

On startup lvsm looks for a configuration file. By the default the program will look for /etc/lvsm.conf , but it is not required and the program will function without it.

The configuration file can also be specified on the command line

$ lvsm --config=configfile

A sample configuration file is supplied with the package with the defaults mentioned.

Comments start with # to the end of the line and can start anywhere in a line. Apart from items mentioned below, any other directives are invalid and result in an error message.

List of Sections

General
Director
Firewall
Source Control
SNMP

General Options

  • ipvsadm: Location of the ipvsadm binary.
    • Default: ipvsadm
  • iptables: Location of the iptables binary.
    • Default: iptables
  • pager: Terminal paging program to use.
    • Default: /bin/more
  • cache_dir: Cache directory used to store working files.
    • Default: /var/cache/lvsm
  • nodes: Comma separated list of nodes in the cluster.

Director Options

  • director: The type of director used for ipvs. Valid values are one of ldirectord or keepalived.
  • director_bin: Path to the binary of the director program.
  • director_cmd: Command to reload the director configuration.
  • director_config: Location of the director configuration file.
  • parse_director_config: Whether or not to parse the director config file before saving it. Valid values are yes or no. Defaults to yes.
  • template_lang: Path to the templating language used in building the director config. This item can be useful with keepalived where the configuration files can be different between nodes in the cluster.

Firewall (iptables) Options

  • firewall_config: Location of the iptables configuration file.
  • firewall_cmd: Command used to reload the iptables configuration.

Source Control Options

This section is only needed if users wish lvsm to manage all the configuration files.

  • version_control: SCM used for versioning configs. Valid values are one of svn or git.
  • git_remote: Remote used to perform the git pull operation.
  • git_repo: Local location where the git repository is located.

SNMP Options

SNMP is only used if the version of keepalived supports it. It is used by lvsm to enable/disable real servers.

  • keepalived-mib: Path to the KEEPALIVED-MIB file.
    • Default: KEEPALIVED-MIB
  • snmp_community: Community name with read and write permission.
  • snmp_host: Hostname with the read and write permissions.
  • snmp_user: Username if authentication is needed.
  • snmp_password: Password for the SNMP user.

Example

# this line is a comment
director_config = /etc/ha.d/ldirectord.cf
firewall_config = /etc/iptables.rules
nodes = lb1, lb2

Clone this wiki locally