Page 1 of 1

DNS Cluster key is hostname

Posted: Fri Jan 11, 2019 5:00 am
by rich
Hi all,

I have come across an issue with the DNS Cluster function where it is possible for one VestaCP master to wipe out another VestaCP master's domain records because both have the same hostname (but not the same FQDN). - the setup is -

Vesta #1 (ns1.a.foo) (master) -->> Vesta #3 ns2.org.foo (slave) <<-- Vesta #2 (ns1.b.foo) (master)

Vesta #3 ns2.org.foo is a slave to many, master of none. Since Vesta #1 and Vesta #2 have the same host name (ns1), adding Vesta #2 (ns1.b.foo) to the cluster wipes out the records of Vesta #1 (ns1.a.foo) - the cluster key appears to be $HOSTNAME (ns1) in the code -

Code: Select all

v-add-remote-dns-record:    cluster_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'domain' 'no'
Is it possible to change the use of the hostname as the cluster identifier to something which is likely to be unique such as the main system IP addr? Would this break anything major?

With Regards,

rich