A basic two-node cluster requires directory /var/run/resource-agents. Reproducible: Always Steps to Reproduce: 1.$ sudo /etc/ha.d/resource.d/IPaddr 192.168.20.48 start 2. 3. Actual Results: IPaddr[10503]: INFO: Using calculated nic for 192.168.20.48: eth0 IPaddr[10503]: INFO: Using calculated netmask for 192.168.20.48: 255.255.252.0 IPaddr[10503]: DEBUG: Using calculated broadcast for 192.168.20.48: 192.168.23.255 touch: cannot touch '/var/run/resource-agents/IPaddr-eth0': No such file or directory IPaddr[10489]: ERROR: Generic error ERROR: Generic error Expected Results: $ ip addr show dev eth0 3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 52:54:00:77:89:2c brd ff:ff:ff:ff:ff:ff inet 192.168.20.46/22 brd 192.168.23.255 scope global eth0 valid_lft forever preferred_lft forever inet 192.168.20.48/22 brd 192.168.23.255 scope global secondary eth0:0 valid_lft forever preferred_lft forever Adding checkpath -q -d -m 0755 -o root:root /var/run/resource-agents to start() in /etc/init.d/heartbeat solves the problem.
This is an issue related with the FHS specification. This is what says the spec: "This directory contains system information data describing the system since it was booted. Files under this directory must be cleared (removed or truncated as appropriate) at the beginning of the boot process. Programs may have a subdirectory of /var/run; this is encouraged for programs that use more than one run-time file. Process identifier (PID) files, which were originally placed in /etc, must be placed in /var/run. The naming convention for PID files is <program-name>.pid. For example, the crond PID file is named /var/run/crond.pid." It's possible that the installer did create the directory but after the first reboot the directory was deleted. To workaround is to include one line in the script to create the directory if it doesn't exist. --- heartbeat.gentoo 2016-05-20 13:52:39.677274228 +0000 +++ heartbeat 2016-05-20 00:01:42.853635819 +0000 @@ -28,6 +28,7 @@ start() { checkpath -q -d -m 0755 -o root:root /var/run/heartbeat + [ -d /var/run/resource-agents ] || mkdir /var/run/resource-agents ebegin "Starting heartbeat"
Package removed.