Hi people,
for a test setup of 2 vms
vm1:
vm2:
I would like to write a fail-over-script for hast.
Before you scream, yes, I know, there are already some scripts like this one for ucarp or that little older one from 2012.
I cannot use the ucarp one, because in my setup I use carp.
The little older one from 2012 could be used, but there is this tiny difference in the network setup
in /etc/devd.conf on both nodes to trigger the fail-over script.
And in general, of course you should setup a dedicated nic acting as wire backbone ? for ha-heartbeats and data sync of a ha-storage if bandwidth is low. But this is not the case here.
Later I want to expand the setup little up to 2 nics per vms, maybe using lagg (failover mode), so the carp device thing in /etc/devd.conf might not work anymore, because none of both nics will go down if - for example - one switch dies and nic1 will be unavailable on each machine and lagg nic dummy device will stay online.
So triggering the failover script does not rely on link status ...
At this moment, I am actually out-of-ideas how to handle it. Got lost for today.
I appreciate each help.
for a test setup of 2 vms
vm1:
Code:
hostname="hosta.example.org"
ifconfig_em0="inet 192.168.1.3 netmask 255.255.255.0"
ifconfig_em0_alias0="inet vhid 1 pass testpass alias 192.168.1.100/32"
vm2:
Code:
hostname="hostb.example.org"
ifconfig_em0="inet 192.168.1.4 netmask 255.255.255.0"
ifconfig_em0_alias0="inet vhid 1 advskew 100 pass testpass alias 192.168.1.100/32"
I would like to write a fail-over-script for hast.
Before you scream, yes, I know, there are already some scripts like this one for ucarp or that little older one from 2012.
I cannot use the ucarp one, because in my setup I use carp.
The little older one from 2012 could be used, but there is this tiny difference in the network setup
cloned_interfaces="carp0"
, so I cannot actually use
Code:
notify 30 {
match "system" "IFNET";
match "subsystem" "carp0";
match "type" "LINK_UP";
action "/usr/local/bin/failover master";
};
notify 30 {
match "system" "IFNET";
match "subsystem" "carp0";
match "type" "LINK_DOWN";
action "/usr/local/bin/failover slave";
};
And in general, of course you should setup a dedicated nic acting as wire backbone ? for ha-heartbeats and data sync of a ha-storage if bandwidth is low. But this is not the case here.
Later I want to expand the setup little up to 2 nics per vms, maybe using lagg (failover mode), so the carp device thing in /etc/devd.conf might not work anymore, because none of both nics will go down if - for example - one switch dies and nic1 will be unavailable on each machine and lagg nic dummy device will stay online.
So triggering the failover script does not rely on link status ...
At this moment, I am actually out-of-ideas how to handle it. Got lost for today.

I appreciate each help.
Last edited: