diff options
Diffstat (limited to 'src/mon/NVMeofGwMon.cc')
-rw-r--r-- | src/mon/NVMeofGwMon.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mon/NVMeofGwMon.cc b/src/mon/NVMeofGwMon.cc index d9e936e27df..c9a6b789b89 100644 --- a/src/mon/NVMeofGwMon.cc +++ b/src/mon/NVMeofGwMon.cc @@ -176,6 +176,11 @@ void NVMeofGwMon::encode_pending(MonitorDBStore::TransactionRef t) << HAVE_FEATURE(mon.get_quorum_con_features(), NVMEOFHA) << dendl; put_version(t, pending_map.epoch, bl); put_last_committed(t, pending_map.epoch); + + //health + health_check_map_t checks; + pending_map.get_health_checks(&checks); + encode_health(checks, t); } void NVMeofGwMon::update_from_paxos(bool *need_bootstrap) @@ -188,6 +193,7 @@ void NVMeofGwMon::update_from_paxos(bool *need_bootstrap) bufferlist bl; int err = get_version(version, bl); ceph_assert(err == 0); + load_health(); auto p = bl.cbegin(); map.decode(p); @@ -317,6 +323,12 @@ bool NVMeofGwMon::preprocess_command(MonOpRequestRef op) f->dump_string("group", group); if (HAVE_FEATURE(mon.get_quorum_con_features(), NVMEOFHA)) { f->dump_string("features", "LB"); + if (map.created_gws[group_key].size()) { + time_t seconds_since_1970 = time(NULL); + uint32_t index = ((seconds_since_1970/60) % + map.created_gws[group_key].size()) + 1; + f->dump_unsigned("rebalance_ana_group", index); + } } f->dump_unsigned("num gws", map.created_gws[group_key].size()); if (map.created_gws[group_key].size() == 0) { @@ -607,6 +619,7 @@ bool NVMeofGwMon::prepare_beacon(MonOpRequestRef op) if (sub.size() == 0) { avail = gw_availability_t::GW_CREATED; + dout(20) << "No-subsystems condition detected for GW " << gw_id <<dendl; } else { bool listener_found = false; for (auto &subs: sub) { @@ -616,6 +629,7 @@ bool NVMeofGwMon::prepare_beacon(MonOpRequestRef op) } } if (!listener_found) { + dout(10) << "No-listeners condition detected for GW " << gw_id << dendl; avail = gw_availability_t::GW_CREATED; } }// for HA no-subsystems and no-listeners are same usecases |