crmd[670]: 2007/06/05_12:49:58 info: do_state_transition: State
transition S_STARTING -> S_STOPPING [ input=I_SHUTDOWN cause=C_SHUTDOWN
origin=crm_shutdown ]
crmd[670]: 2007/06/05_12:49:58 info: do_state_transition: State
transition S_STOPPING -> S_TERMINATE [ input=I_TERMINATE
cause=C_FSA_INTERNAL origin=do_shutdown ]
crmd[670]: 2007/06/05_12:49:58 info: verify_stopped: Checking for active
resources before exit
logd[524]: 2007/06/05_12:49:58 info: logd_term_write_action: received
SIGTERM
logd[524]: 2007/06/05_12:49:58 info: ha_logd: Exiting write process
logd[514]: 2007/06/05_12:55:05 info: logd started with /etc/logd.cf.
logd[514]: 2007/06/05_12:55:05 info: G_main_add_SignalHandler: Added
signal handler for signal 15
logd[525]: 2007/06/05_12:55:05 info: G_main_add_SignalHandler: Added
signal handler for signal 15
heartbeat[524]: 2007/06/05_12:55:05 info: Enabling logging daemon 
heartbeat[524]: 2007/06/05_12:55:05 info: logfile and debug file are
those specified in logd config file (default /etc/logd.cf)
heartbeat[524]: 2007/06/05_12:55:05 info: Version 2 support: yes
heartbeat[524]: 2007/06/05_12:55:06 info: **************************
heartbeat[524]: 2007/06/05_12:55:06 info: Configuration validated.
Starting heartbeat 2.0.9
heartbeat[524]: 2007/06/05_12:55:06 info: heartbeat: already running
[pid 525]. 


On booting heartbeat complained its already running with pid 525.
But 525 is the pid of logd. 

525 was heartbeat's pid of its former life:
bcm20-a:/ # cat /var/ha/local/run/heartbeat.pid
       525

I know there where already discussions on the main list
and the supposed fix was to sanity check the pid against a
link "/proc/<pid>/exe".

Unfortunately there is no "exe-link" under Solaris.

Here I come out with a Posix solution which uses a Posix lockf
advisory lock instead of comparing pids.

It is not a "designer" solution because the
locking code is combined with reading and storing pids which
should better be separated. But I wanted to be compatible
with the current code and it solves the "heartbeat already 
started" problem on Solaris.

Because it's Posix it should also work on Linux.


 <<heartbeat-already-started.patch>> 

Attachment: heartbeat-already-started.patch
Description: heartbeat-already-started.patch

_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to