Some Linux distributions use the initialization (init) systemd to bootstrap the user space and subsequently manage all processes.


This section applies to Centos 7 and Debian 8 only. The other Linux distributions rely on init scripts

The table below summarizes the services that systemd manages directly and the ones that sysv manages. The service list may change based on the subscription level and installed packages.

Service Init system
hapee-1.6 sysv
hapee-1.6-lb systemd
hapee-1.6-log sysv
hapee-1.6-rhi sysv
hapee-1.6-route sysv
hapee-1.6-snmp sysv
hapee-1.6-vrrp sysv


The commands listed here apply to both services managed by systemd or sysv.

Interaction between systemd and HAProxy

When a system uses systemd, the following process unfolds:

  1. systemd starts a wrapper process, which is used to handle communication between systemd and HAProxy. This wrapper process name is hapee-lb-systemd-wrapper.
  2. hapee-lb-systemd-wrapper then parses the configuration file and starts up a new process called hapee-lb-master. Its role is to parse and load the configuration file and to create the required number of HAProxy processes.
  3. Running HAProxy processes are called hapee-lb.

The process basically gives us the following cgroup tree. A cgroup (abbreviated from control groups) is a Linux kernel feature that limits, accounts for, and isolates the resource usage (CPU, memory, disk I/O, network, etc.) of a collection of processes.

Main PID: PID from (hapee-lb-systemd-wrapper)
CGroup: /user/system.slice/hapee-1.6-lb.service
 |-PID /opt/hapee-1.6/sbin/hapee-lb-systemd-wrapper ...
 |-PIDa /opt/hapee-1.6/sbin/hapee-lb-master
 |-PIDb /opt/hapee-1.6/sbin/hapee-lb ...
 |-PIDc /opt/hapee-1.6/sbin/hapee-lb ...

Systemd sends signals to hapee-lb-systemd-wrapper. This process propagates its environment to its descendants. When a reload occurs, hapee-lb-systemd-wrapper itself is not reloaded, but passes the information to hapee-lb-master to run the reload operation.

Enable a service

By default, the services installed with HAPEE are not enabled.

To enable a service run systemctl enable <service name>

Output when enabling a systemd based service:

# systemctl enable hapee-1.6-lb
Created symlink from /etc/systemd/system/ to /usr/lib/systemd/system/hapee-1.6-lb.service.

Output when enabling a sysv based service:

# systemctl enable hapee-1.6
hapee-1.6-log.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig hapee-1.6-log on

Start a service

To start a service run systemctl start <service name>

systemctl start hapee-1.6-lb

Stop a service

To stop a service run systemctl stop <service name>

To stop hapee-1.6-lb:

systemctl stop hapee-1.6-lb

To stop hapee-1.6-log:

systemctl stop hapee-1.6-log

Restart a service

To restart a service run systemctl restart <service name>

Example to restart hapee-1.6-lb:

systemctl restart hapee-1.6-lb

Example to stop hapee-1.6-log:

systemctl restart hapee-1.6-log

Reload a service

To reload a service run systemctl reload <service name>

Example to reload hapee-1.6-lb:

systemctl reload hapee-1.6-lb

Example to reload hapee-1.6-log:

systemctl reload hapee-1.6-log


systemd has a severe limitation concerning reload: the environment variables do not get reloaded during a service reload. You must perform a service restart.

The reason is that environment variables are loaded by hapee-lb-systemd-wrapper at startup, and they cannot be refreshed at reload. See Interaction between systemd and HAProxy.