debug output from parsing pubsub messages
Some checks are pending
/ build_macos (push) Waiting to run
/ build_windows (push) Waiting to run
/ Central Controller Build (push) Waiting to run
/ multi-arch-docker (push) Blocked by required conditions
/ build_ubuntu (push) Waiting to run

This commit is contained in:
Grant Limberg 2025-10-01 09:07:08 -07:00
parent 20a67ab1de
commit b4f018b918
No known key found for this signature in database
GPG key ID: 8F2F97D3BE8D7735

View file

@ -133,7 +133,7 @@ void PubSubNetworkListener::onNotification(const std::string& payload)
span->SetStatus(opentelemetry::trace::StatusCode::kError, "Failed to parse protobuf"); span->SetStatus(opentelemetry::trace::StatusCode::kError, "Failed to parse protobuf");
return; return;
} }
fprintf(stderr, "PubSubNetworkListener: parsed protobuf message. %s\n", nc.DebugString().c_str());
fprintf(stderr, "Network notification received\n"); fprintf(stderr, "Network notification received\n");
try { try {
@ -212,7 +212,7 @@ void PubSubMemberListener::onNotification(const std::string& payload)
span->SetStatus(opentelemetry::trace::StatusCode::kError, "Failed to parse protobuf"); span->SetStatus(opentelemetry::trace::StatusCode::kError, "Failed to parse protobuf");
return; return;
} }
fprintf(stderr, "PubSubMemberListener: parsed protobuf message. %s\n", mc.DebugString().c_str());
fprintf(stderr, "Member notification received"); fprintf(stderr, "Member notification received");
try { try {
@ -318,7 +318,10 @@ nlohmann::json toJson(const pbmessages::NetworkChange_Network& nc, pbmessages::N
pool["ipRangeEnd"] = p.end_ip(); pool["ipRangeEnd"] = p.end_ip();
pools.push_back(pool); pools.push_back(pool);
} }
out["assignmentPools"] = pools; out["ipAssignmentPools"] = pools;
}
else {
out["ipAssignmentPools"] = nlohmann::json::array();
} }
if (nc.routes_size() > 0) { if (nc.routes_size() > 0) {
@ -343,6 +346,9 @@ nlohmann::json toJson(const pbmessages::NetworkChange_Network& nc, pbmessages::N
} }
dns["servers"] = servers; dns["servers"] = servers;
} }
else {
dns["servers"] = nlohmann::json::array();
}
dns["domain"] = nc.dns().domain(); dns["domain"] = nc.dns().domain();
out["dns"] = dns; out["dns"] = dns;