[Linux-HA] AW: Resource script isn't starting FIXED

Thomas Heidemann Thomas.Heidemann at camelot-idpro.de
Wed Feb 14 00:26:41 MST 2007


Fixed.
Sorry for posting.
 
________________________________

Von: linux-ha-bounces at lists.linux-ha.org im Auftrag von Thomas Heidemann
Gesendet: Mo 12.02.2007 22:14
An: linux-ha at lists.linux-ha.org
Betreff: [Linux-HA] Resource script isn't starting



Hi list,

I plan to implement a HA bridging firewall between our clients and a
central file server. The scenario is the following:

         |- node1 beavis ---|
clients -+                  +- file server
           |- node2 butthead -|
                                        

Currently I test with butthead only to keep it simple somehow.

My configuration looks like this:
----------------------------------------
butthead:/etc # cat /etc/ha.d/ha.cf
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility     local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport 694
baud    19200
serial  /dev/ttyS0
auto_failback off
node butthead
node beavis
ping 192.168.11.1
respawn hacluster /usr/lib/heartbeat/ipfail
----------------------------------------


haresources:
butthead:/etc # cat /etc/ha.d/haresources
butthead drbddisk::drbd0 Filesystem::/dev/drbd0::/data::ext3 bridge


The active node should mount a drbd filesystem and than start the init
script "bridge" which starts the bridging interface.
Each node has three network interfaces: 1 for ssh login and two for the
bridge itself. These two do not have ip addresses.

When starting the heartbeat daemon, I get the following logging output:
---------------------------------------------
heartbeat[16922]: 2007/02/12_08:54:26 WARN: Core dumps could be lost if
multiple dumps occur
heartbeat[16922]: 2007/02/12_08:54:26 WARN: Consider setting
/proc/sys/kernel/core_uses_pid (or equivalent) to 1 for maximum
supportability
heartbeat[16922]: 2007/02/12_08:54:26 WARN: Logging daemon is disabled
--enabling logging daemon is recommended
heartbeat[16922]: 2007/02/12_08:54:26 info: **************************
heartbeat[16922]: 2007/02/12_08:54:26 info: Configuration validated.
Starting heartbeat 2.0.8
heartbeat[16923]: 2007/02/12_08:54:26 info: heartbeat: version 2.0.8
heartbeat[16923]: 2007/02/12_08:54:26 info: Heartbeat generation: 28
heartbeat[16923]: 2007/02/12_08:54:26 info: G_main_add_TriggerHandler:
Added signal manual handler
heartbeat[16923]: 2007/02/12_08:54:26 info: G_main_add_TriggerHandler:
Added signal manual handler
heartbeat[16923]: 2007/02/12_08:54:26 info: Removing
/var/run/heartbeat/rsctmp failed, recreating.
heartbeat[16923]: 2007/02/12_08:54:27 info: glib: Starting serial
heartbeat on tty /dev/ttyS0 (19200 baud)
heartbeat[16923]: 2007/02/12_08:54:27 info: glib: ping heartbeat
started.
heartbeat[16923]: 2007/02/12_08:54:27 info: G_main_add_SignalHandler:
Added signal handler for signal 17
heartbeat[16923]: 2007/02/12_08:54:27 info: Local status now set to:
'up'
heartbeat[16923]: 2007/02/12_08:54:28 info: Link
192.168.11.1:192.168.11.1 up.
heartbeat[16923]: 2007/02/12_08:54:28 info: Status update for node
192.168.11.1: status ping
heartbeat[16927]: 2007/02/12_08:54:57 WARN: glib: TTY write timeout on
[/dev/ttyS0] (no connection or bad cable? [see documentation])
heartbeat[16927]: 2007/02/12_08:54:57 info: glib: See
http://linux-ha.org/FAQ#TTYtimeout for details
heartbeat[16923]: 2007/02/12_08:56:27 WARN: node beavis: is dead
heartbeat[16923]: 2007/02/12_08:56:27 info: Comm_now_up(): updating
status to active
heartbeat[16923]: 2007/02/12_08:56:27 info: Local status now set to:
'active'
heartbeat[16923]: 2007/02/12_08:56:27 info: Starting child client
"/usr/lib/heartbeat/ipfail" (90,90)
heartbeat[16923]: 2007/02/12_08:56:27 WARN: No STONITH device
configured.
heartbeat[16923]: 2007/02/12_08:56:27 WARN: Shared disks are not
protected.
heartbeat[16923]: 2007/02/12_08:56:27 info: Resources being acquired
from beavis.
heartbeat[16933]: 2007/02/12_08:56:27 info: Starting
"/usr/lib/heartbeat/ipfail" as uid 90  gid 90 (pid 16933)
harc[16934]:    2007/02/12_08:56:27 info: Running /etc/ha.d/rc.d/status
status
mach_down[16954]:       2007/02/12_08:56:27 info:
/usr/lib/heartbeat/mach_down: nice_failback: foreign resources acquired
mach_down[16954]:       2007/02/12_08:56:27 info: mach_down takeover
complete for node beavis.
heartbeat[16923]: 2007/02/12_08:56:27 info: Initial resource acquisition
complete (T_RESOURCES(us))
heartbeat[16923]: 2007/02/12_08:56:27 info: mach_down takeover complete.
heartbeat[16935]: 2007/02/12_08:56:27 info: Local Resource acquisition
completed.
harc[17006]:    2007/02/12_08:56:27 info: Running
/etc/ha.d/rc.d/ip-request-resp ip-request-resp
ip-request-resp[17006]: 2007/02/12_08:56:27 received ip-request-resp
drbddisk::drbd0 OK yes
ResourceManager[17021]: 2007/02/12_08:56:27 info: Acquiring resource
group: butthead drbddisk::drbd0 Filesystem::/dev/drbd0::/data::ext3
bridge
ResourceManager[17021]: 2007/02/12_08:56:27 info: Running
/etc/ha.d/resource.d/drbddisk drbd0 start
Filesystem[17087]:      2007/02/12_08:56:28 INFO:  Resource is stopped
ResourceManager[17021]: 2007/02/12_08:56:28 info: Running
/etc/ha.d/resource.d/Filesystem /dev/drbd0 /data ext3 start
Filesystem[17128]:      2007/02/12_08:56:28 INFO: Running start for
/dev/drbd0 on /data
Filesystem[17125]:      2007/02/12_08:56:28 INFO:  Success
heartbeat[16923]: 2007/02/12_08:56:38 info: Local Resource acquisition
completed. (none)
heartbeat[16923]: 2007/02/12_08:56:38 info: local resource transition
completed.
---------------------------------------------

As you can see, the bridging script is mentioned by ResourceManager but
not started. (??)

Here is the script:

#!/bin/sh
#
# This scipt handles the bridging interfaces in buttheat and beavis.
# On start the new bridging interface will be brought up.

### BEGIN INIT INFO
# Provides:          Bridge
# Required-Start:    $syslog $remote_fs $network
# Should-Start: $time
# Required-Stop:     $syslog $remote_fs $network
# Should-Stop: $time
# Default-Start:
# Default-Stop:
# Short-Description: Handles bridging interfaces
# Description:
### END INIT INFO

. /etc/rc.status

rc_reset

BR_BIN="/sbin/brctl"
IF_CON="/sbin/ifconfig"

case "$1" in
    start)
        echo -n "Starting Bridge "

        # Create bridge
        $BR_BIN addbr br0

        # add interfaces
        $BR_BIN addif br0 eth1
        $BR_BIN addif br0 eth2

        $IF_CON eth1 up
        $IF_CON eth2 up

        # activate bridge
        $IF_CON br0 up

        # Remember status and be verbose
        rc_status -v
        ;;
    stop)
        echo -n "Shutting down Bridge "

        # deactivate bridge
        $IF_CON br0 down

        # remove interfaces
        $BR_BIN delif br0 eth1
        $BR_BIN delif br0 eth2

        # Delete Bridge
        $BR_BIN delbr br0

        # Remember status and be verbose
        rc_status -v
        exit 0
        ;;
    restart)
        ## Stop the service and regardless of whether it was
        ## running or not, start it again.
        $0 stop
        $0 start

        # Remember status and be quiet
        rc_status
        ;;
    status)
        echo -n "Checking for service FOO "
        ## Check status with checkproc(8), if process is running
        ## checkproc will return with exit status 0.

        # Return value is slightly different for the status command:
        # 0 - service up and running
        # 1 - service dead, but /var/run/  pid  file exists
        # 2 - service dead, but /var/lock/ lock file exists
        # 3 - service not running (unused)
        # 4 - service status unknown :-(
        # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)

        # NOTE: checkproc returns LSB compliant status values.
        #/sbin/checkproc $FOO_BIN
        # NOTE: rc_status knows that we called this init script with
        # "status" option and adapts its messages accordingly.
        rc_status -v
        ;;
    probe)
        ## Optional: Probe for the necessity of a reload, print out the
        ## argument to this init script which is required for a reload.
        ## Note: probe is not (yet) part of LSB (as of 1.9)

        test /etc/FOO/FOO.conf -nt /var/run/FOO.pid && echo reload
        ;;
    *)
        echo "Usage: $0
{start|stop|status|try-restart|restart|force-reload|reload|probe}"
        exit 1
        ;;
esac
rc_exit
----------------------------------

It has the start and stop parameter and is stored in /etc/init.d.

Does anybody have an idea?

Many thanks

Regards,
Thomas


_______________________________________________
Linux-HA mailing list
Linux-HA at lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems




More information about the Linux-HA mailing list