Solved HAST degraded after clean install

Hello!
I have two VM (on XenServer) with same /etc/hast.conf:

Code:
resource test {

  on master-a {
  local /dev/ada1
  remote 192.168.0.98
  }
  on master-b {
  local /dev/ada1
  remote 192.168.0.97
  }
}

Hostname master-a have IP 192.168.0.98, hostname master-b have IP 192.168.0.97. Servers visible over ICMP.

Problem - on master always hast as degradated.

My steps to configure HAST:

1. Create /etc/hast.conf on both servers
2. service hastd onestart on both servers
3. hastctl create test on both servers
4. Run on master-a hastctl role primary test, and on master-b hastctl role secondary test
5. create ZFS volume on master-a zpool create test /dev/hast/test
6. on slave run zpool import -F , but not nothing imported. Also run zpool import -f test , but not nothing imported.

Code:
root@master-a:~ # hastctl status
Name  Status  Role  Components
test  degraded primary  /dev/ada1  192.168.0.98

Code:
root@master-b:~ # hastctl status
Name  Status  Role  Components
test  -  secondary  /dev/ada1  192.168.0.97

On master-a in /var/log/messages i see repeated lines:

Code:
Jul 25 08:21:33 master-a hastd[542]: [test] (primary) We act as primary for the resource and not as secondary as requested by tcp://192.168.0.98:33567.
Jul 25 08:21:33 master-a hastd[712]: [test] (primary) Remote node acts as primary for the resource and not as secondary.

I not know why master-a (current primary in hast) search secondary at 192.168.0.98, but hats not start.
 
I have two VM (on XenServer) with same /etc/hast.conf:

Code:
resource test {

  on master-a {
  local /dev/ada1
  remote 192.168.0.98
  }
  on master-b {
  local /dev/ada1
  remote 192.168.0.97
  }
}

Hostname master-a have IP 192.168.0.98, hostname master-b have IP 192.168.0.97. Servers visible over ICMP.
I've never used HAST but reading through the handbook your config doesn't seem right.

On master-a the remote is 192.168.0.97, not 192.168.0.98 as your config has. The same for master-b. So your config has the IP addresses the wrong way around.

https://www.freebsd.org/doc/handbook/disks-hast.html
 
Back
Top