the switching time hastd from secondary to primary

Shahin Hasanov shahinhasanov at hotmail.com
Thu Jan 14 10:24:56 UTC 2016


In  /usr/local/sbin/ucarp_up.sh(below shown extract of it)  script ucarp waiting while it became primary. It tooks about 20 sec as written http://www.freebsd.org/cgi/man.cgi?query=hast.conf&apropos=0&sektion=0&manpath=FreeBSD+10.2-RELEASE&arch=default&format=html . 
 
for i in `jot 30`; do
        pgrep -f "hastd: ${resource} \(secondary\)" >/dev/null 2>&1 || break
        sleep 1
done
if pgrep -f "hastd: ${resource} \(secondary\)" >/dev/null 2>&1; then
        logger -p local0.error -t hast "Secondary process for resource ${resource} is still running after 30 seconds."
        exit 1
fi

 
Date: Thu, 14 Jan 2016 11:31:58 +0300
Subject: Re: the switching time hastd from secondary to primary
From: vsasjason at gmail.com
To: shahinhasanov at hotmail.com
CC: freebsd-questions at freebsd.org

14 янв. 2016 г. 10:25 пользователь "Shahin Hasanov" <shahinhasanov at hotmail.com> написал:

>

> I can't change the switching time hastd from secondary to primary. it is default time 20 sec.is it possible? In despite of that in etc/hast.conf was written timeout 10

>

> resource HAST0 {

>    replication memsync

>    compression lzf

>    timeout 10

>    on node1 {

>          local /dev/da1p1

>          remote 10.190.190.4

>     }

>    on node2 {

>          local /dev/da1p1

>           remote 10.190.190.3

>          }

> }

http://www.freebsd.org/cgi/man.cgi?hastd

A hastd daemon never picks its role automatically. The role has to be configured with the hastctl(8) control utility by additional software like ucarp	or heartbeat that can reliably manage role separation and switch secondary node to primary role in case of the primary's failure. 		 	   		  


More information about the freebsd-questions mailing list