The shutdown agent needs to be configured if the master server is installed on a virtual environment (KVM).
Log in to the host machine with root permissions.
Define the following values in the /etc/sysconfig/libvirt-guests file:
ON_SHUTDOWN=shutdown
SHUTDOWN_TIMEOUT=timeToWaitForVirtualMachineToShutdown
Example
If the time taken for the virtual machine to shutdown is less than 300 seconds (5 minutes):
# cat /etc/sysconfig/libvirt-guests <Enter> ... omitted ... ON_SHUTDOWN=shutdown SHUTDOWN_TIMEOUT=300
Point
This setting is made so that if the host machine is mistakenly shutdown while virtual machines are running, the virtual machines that contain master servers can be stopped properly. In SHUTDOWN_TIMEOUT, set the longest time it takes for shutdown when multiple virtual machines have been created on the host machine.
Note
When making a replicated configuration for the master server
When the primary master server and the secondary master server are to be installed on separate host machines, do this on both host machines.
Create user accounts on the host machine.
Log in to the host machine with root permissions.
Set any password for the user.
Example
Creating the user pcluser for the shutdown agent:
# useradd pcluser <Enter> # passwd pcluser <Enter>
Allow users to execute commands as the root user.
Execute visudo, and in the editor started by the command, add a setting line for the user.
# visudo <Enter>
Example
Configuring to allow the user pcluser to execute commands as root without entering a password:
pcluser ALL=(ALL) NOPASSWD: ALL
Log in to the virtual machine where the master server is to be installed.
Go through the process of the initial user query (RSA key generation) that happens with ssh connection.
This must be done on both the primary master server and the secondary master server in order to build a master server replicated configuration.
Example
If the IP address of the KVM host machine is 192.168.1.100 and the user account for the shutdown agent is pcluser:
# ssh -l pcluser 192.168.1.100 <Enter> The authenticity of host '192.168.1.100 (192.168.1.100)' can't be established. RSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx. Are you sure you want to continue connecting (yes/no)? yes <Enter> Warning: Permanently added '192.168.1.100' (RSA) to the list of known hosts. pcluser@192.168.1.100's password: passwordForShutdownAgentUser <Enter> $ exit
Point
The IP address for the KVM host machine, the created user accounts, and passwords need to be set in BDPP_KVMHOST_IP, BDPP_KVMHOST_ACCOUNT, and BDPP_KVMHOST_PASS parameters (respectively) in bdpp.conf specified during installation of the master server.
Refer to "Master server" in "B.1 bdpp.conf" for information on bdpp.conf.
Note
When making a replicated configuration for the master server
When the primary master server and the secondary master server are to be installed on separate host machines, do this on both host machines.
In this case, set the same user account and password for the shutdown agent. Furthermore, also perform the initial access required for ssh connection on the host machines for the primary master server and the secondary master server to the other host machines.