check cluster health. Closes #3

This commit is contained in:
Denis Zheleztsov 2017-01-20 12:51:29 +03:00
parent b470a9afb4
commit c3b66c53a7

View File

@ -37,6 +37,13 @@ func (z ZooNode) RequestWatch(fqdn string) {
log.Print("[ERROR] ", err)
}
if z.GetLeader() != "alive." {
z.RMR(p)
z.Answer(fqdn, child, []byte(""), "FAIL")
log.Print("[ERROR] Mapping error: ", err)
break
}
// 0) Check already mounted devices 1) Map RBD 2) Mount FS
if child == "mount" {
m, err := z.CheckMounted(r)