Article ID: 114351, created on Jul 12, 2012, last review on Apr 22, 2015

  • Applies to:
  • Operations Automation

If Linux Virtual Server (LVS) based Load Balancer does not satisfy needs Provider may implement own customization scripts for the Load Balancer using the lvsctl script package located on the POA Management Node in the /usr/local/pem/etc/web_cluster/ folder. The Load Balancer configuration scripts are called in the following cases:
  • New NG cluster registration
  • New shared or exclusive IP address provisioning
  • New web server registration

The package consists of 5 Python modules:
  • lvs/ - command line parsing and driver for and modules.
  • lvs/ - Python utility module
    • lvs/ - contains configuration structures and allows retrieving current configuration from POA
    • lvs/ - updates LVS configuration using configuration structures created by module
    • lvs/ - common functions
  • - the main lvsctl module. It will be run by default.
Examine the configuration structure in the script and the Load Balancer updating mechanism for LVS in the script. Using information from the script, write your own LoadBalancerUpdater python class. The class should accept the instance of Config and should have the following methods implemented:
  • deploy_ips() - the method updates IPs on public interface of Load Balancer
  • deploy_lvs() - the method updates Load Balancer configuration
  • print_config() - the auxiliary method which prints Load Balancer configuration instead of updating it

Write you own main lvsctl script (name it as e.g. using and replace LoadBalancerUpdater import with proper one for you installation. Use LoadBalancerUpdater from as an example.

When adding a Load Balancer in to the Linux Shared Hosting NG cluster, enable the Custom Configuration Scripts checkbox to specify the new main customization lvsctl scripts as shown on the screenshot:

If you used the above instructions to create a custom script, the path to the scripts should be specified both in the Update Web Server List and Update Website IP List fields. The script will be called on each update of web server list and website IP list with ‘update’ command and database credentials as arguments. The ‘update’ command will call LoadBalancerUpdater’s deploy_ips() and deploy_lvs() methods sequentially.

See the main Knowledgebase article #114326 Linux Shared Hosting NG: General Information, Best Practices and Troubleshooting for more information about NG Hosting in Parallels Automation.

caea8340e2d186a540518d08602aa065 5356b422f65bdad1c3e9edca5d74a1ae e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF