aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Rutkovsky <alexvru@mail.ru>2022-03-10 13:12:59 +0300
committerAlexander Rutkovsky <alexvru@mail.ru>2022-03-10 13:12:59 +0300
commit13ec41e2ad5944d88687beb484d24250d9f96d3f (patch)
tree7a5ab97236c215d1c4a5c6a4c76a679223b18cd4
parent712efbec47eaf34f7090523deae64736322625ff (diff)
downloadydb-13ec41e2ad5944d88687beb484d24250d9f96d3f.tar.gz
Improve VDisks internal table in BSC monitoring KIKIMR-9812
ref:6e6ea8a95836d4e2858349ead8d9f7b4392a77b1
-rw-r--r--ydb/core/mind/bscontroller/monitoring.cpp37
1 files changed, 35 insertions, 2 deletions
diff --git a/ydb/core/mind/bscontroller/monitoring.cpp b/ydb/core/mind/bscontroller/monitoring.cpp
index 245c782cea6..37b94001934 100644
--- a/ydb/core/mind/bscontroller/monitoring.cpp
+++ b/ydb/core/mind/bscontroller/monitoring.cpp
@@ -943,8 +943,17 @@ void TBlobStorageController::RenderGroupDetail(IOutputStream &out, TGroupId grou
if (TGroupInfo *group = FindGroup(groupId)) {
RenderVSlotTable(out, [&] {
+ std::vector<const TVSlotInfo*> donors;
for (const TVSlotInfo *slot : group->VDisksInGroup) {
RenderVSlotRow(out, *slot);
+ for (const auto& [vslotId, vdiskId] : slot->Donors) {
+ if (const auto *x = FindVSlot(vslotId)) {
+ donors.push_back(x);
+ }
+ }
+ }
+ for (const TVSlotInfo *slot : donors) {
+ RenderVSlotRow(out, *slot);
}
});
}
@@ -979,7 +988,7 @@ void TBlobStorageController::RenderVSlotTable(IOutputStream& out, std::function<
TABLE_CLASS("table") {
TABLEHEAD() {
TABLER() {
- TAG_ATTRS(TTableH, {{"colspan", "8"}}) { out << "VDisk attributes"; }
+ TAG_ATTRS(TTableH, {{"colspan", "10"}}) { out << "VDisk attributes"; }
TAG_ATTRS(TTableH, {{"colspan", "1"}}) { out << "Current"; }
TAG_ATTRS(TTableH, {{"colspan", "1"}}) { out << "Maximum"; }
}
@@ -993,6 +1002,7 @@ void TBlobStorageController::RenderVSlotTable(IOutputStream& out, std::function<
TABLEH() { out << "Status"; }
TABLEH() { out << "IsReady"; }
TABLEH() { out << "LastSeenReady"; }
+ TABLEH() { out << "Donors"; }
TABLEH() { out << "Data Size"; }
@@ -1008,7 +1018,7 @@ void TBlobStorageController::RenderVSlotTable(IOutputStream& out, std::function<
void TBlobStorageController::RenderVSlotRow(IOutputStream& out, const TVSlotInfo& vslot) {
HTML(out) {
- TAG_ATTRS(TTableR, {{"title", vslot.Metrics.DebugString()}}) {
+ TAG_ATTRS(TTableR, {{"title", vslot.Metrics.DebugString()}, {"id", vslot.GetVDiskId().ToString()}}) {
TABLED() {
out << vslot.GetVDiskId();
}
@@ -1030,6 +1040,21 @@ void TBlobStorageController::RenderVSlotRow(IOutputStream& out, const TVSlotInfo
out << vslot.LastSeenReady;
}
}
+ TABLED() {
+ if (vslot.AcceptorVSlotId != TVSlotId()) {
+ if (const auto *x = FindVSlot(vslot.AcceptorVSlotId)) {
+ out << "<strong>donor for <a href='#" << x->GetVDiskId() << "'>" << vslot.AcceptorVSlotId << "</a></strong>";
+ } else {
+ out << "?";
+ }
+ } else {
+ bool first = true;
+ for (const auto& [vslotId, vdiskId] : vslot.Donors) {
+ out << (std::exchange(first, false) ? "" : "<br/>");
+ out << "<a href='#" << vdiskId.ToString() << "'>" << vdiskId << "</a> at " << vslotId;
+ }
+ }
+ }
RenderResourceValues(out, vslot.GetResourceCurrentValues());
RenderResourceValues(out, vslot.GetResourceMaximumValues());
}
@@ -1055,6 +1080,7 @@ void TBlobStorageController::RenderGroupTable(IOutputStream& out, std::function<
TABLEH() { out << "Seen operational"; }
TABLEH() { out << "Operating<br/>status"; }
TABLEH() { out << "Expected<br/>status"; }
+ TABLEH() { out << "Donors"; }
}
}
TABLEBODY() {
@@ -1116,6 +1142,13 @@ void TBlobStorageController::RenderGroupRow(IOutputStream& out, const TGroupInfo
const auto& status = group.Status;
TABLED() { out << NKikimrBlobStorage::TGroupStatus::E_Name(status.OperatingStatus); }
TABLED() { out << NKikimrBlobStorage::TGroupStatus::E_Name(status.ExpectedStatus); }
+ TABLED() {
+ ui32 numDonors = 0;
+ for (const auto& vdisk : group.VDisksInGroup) {
+ numDonors += vdisk->Donors.size();
+ }
+ out << numDonors;
+ }
}
}
}