root@ncs# show running-config ha
ha token supersecret
ha interval 4
ha failure-limit 10
ha vip address 172.16.41.40
ha member nso-yfherzog-p.ciscolab.com
address 172.16.41.41
default-ha-role master
vip-interface ens32
!
ha member nso-yfherzog-s.ciscolab.com
address 172.16.41.42
default-ha-role slave
failover-master true
vip-interface ens32
!
HA status on both sides:
root@ncs# show ha
CURRENT
NAME HA ROLE
--------------------------------------
nso-yfherzog-p.ciscolab.com master
nso-yfherzog-s.ciscolab.com slave
/etc/hosts file on both side:
[root@nso-yfherzog-p ssh]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.41.41 nso-yfherzog-p.ciscolab.com
172.16.41.42 nso-yfherzog-s.ciscolab.com
172.16.41.40 ha-vip
The hostname command gives this:
[root@nso-yfherzog-p ssh]# hostname
nso-yfherzog-p.ciscolab.com
[root@nso-yfherzog-s opt]# hostname
nso-yfherzog-s.ciscolab.com
Although hostname configurations seems to be in place, I still suspect that it has something to do with hostnames as I get these errors:
On /var/log/messages:
Nov 16 11:49:53 nso-yfherzog-p logger: ncs VIP: All ha members do not have a VIP interface
And on devel.log:
./devel.log:<ERR> 16-Nov-2015::10:30:45.678 nso-yfherzog-p ncs[20175]: devel-econfd Hostname "nso-yfherzog-p" did not match any member name
It seems like when trying to configure VIP, the non fqdn value is still fetched somehow.
It appears that this value is fetched using this line in the Erlang code:
{ok, Hostname} = inet:gethostname()
Somehow the value returned there is the non fqdn value?
Any thoughts?
Thanks,
Yftach
Solved! Go to Solution.
Yes,
This looks like a bug I was made aware of the other day. The VIP code resolves the hostname without suffix, and therefore cant find itself in the memberlist. By suffix, in your case, I mean the '.ciscolab.com'-part.
A quick fix would be to rename the hosts without the suffix.
A better fix is coming in a new version of tailf-hcc.
/Simon Unge
Yes,
This looks like a bug I was made aware of the other day. The VIP code resolves the hostname without suffix, and therefore cant find itself in the memberlist. By suffix, in your case, I mean the '.ciscolab.com'-part.
A quick fix would be to rename the hosts without the suffix.
A better fix is coming in a new version of tailf-hcc.
/Simon Unge
Thank you Simon for clarifying this!
I’ll try the quick fix.
Regards,
Yftach