summaryrefslogtreecommitdiff
path: root/lib/northbound_grpc.cpp
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2020-08-19 20:14:05 -0300
committerGitHub <noreply@github.com>2020-08-19 20:14:05 -0300
commit0d206e9d85846b4a95e252b4233af494cc673449 (patch)
tree7553e90d0a9bce17491c5c750bad0cbe772c95a6 /lib/northbound_grpc.cpp
parent54c1ad98026bbf16e79f8390664885001d7f6b2d (diff)
parent5bfb669b377ab5980dd2cb137e1bb28849a8efe1 (diff)
Merge pull request #6945 from qlyoung/nb-more-messages
More gRPC logging + errmsg for no changes
Diffstat (limited to 'lib/northbound_grpc.cpp')
-rw-r--r--lib/northbound_grpc.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp
index f49a3b23f6..f35b4bb31b 100644
--- a/lib/northbound_grpc.cpp
+++ b/lib/northbound_grpc.cpp
@@ -677,11 +677,13 @@ class NorthboundImpl
switch (phase) {
case frr::CommitRequest::VALIDATE:
+ zlog_debug("`-> Performing VALIDATE");
ret = nb_candidate_validate(
&context, candidate->config, errmsg,
sizeof(errmsg));
break;
case frr::CommitRequest::PREPARE:
+ zlog_debug("`-> Performing PREPARE");
ret = nb_candidate_commit_prepare(
&context, candidate->config,
comment.c_str(),
@@ -689,17 +691,20 @@ class NorthboundImpl
sizeof(errmsg));
break;
case frr::CommitRequest::ABORT:
+ zlog_debug("`-> Performing ABORT");
nb_candidate_commit_abort(
candidate->transaction, errmsg,
sizeof(errmsg));
break;
case frr::CommitRequest::APPLY:
+ zlog_debug("`-> Performing ABORT");
nb_candidate_commit_apply(
candidate->transaction, true,
&transaction_id, errmsg,
sizeof(errmsg));
break;
case frr::CommitRequest::ALL:
+ zlog_debug("`-> Performing ALL");
ret = nb_candidate_commit(
&context, candidate->config, true,
comment.c_str(), &transaction_id,
@@ -737,6 +742,12 @@ class NorthboundImpl
grpc::StatusCode::INTERNAL, errmsg);
break;
}
+
+ if (nb_dbg_client_grpc)
+ zlog_debug("`-> Result: %s (message: '%s')",
+ nb_err_name((enum nb_error)ret),
+ errmsg);
+
if (ret == NB_OK) {
// Response: uint32 transaction_id = 1;
if (transaction_id)