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