diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2020-08-15 00:49:41 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2020-08-15 02:37:14 +0200 |
commit | 0fe5b904b76ee37ee0d6ad6230e1ea330694f2ea (patch) | |
tree | 201eab657120726aab76a520647f42295030d379 /grpc | |
parent | Merge pull request #6898 from opensourcerouting/grpc-proto-relicensing (diff) | |
download | frr-0fe5b904b76ee37ee0d6ad6230e1ea330694f2ea.tar.xz frr-0fe5b904b76ee37ee0d6ad6230e1ea330694f2ea.zip |
lib: don't ignore error messages generated during the commit apply phase
While a configuration transaction can't be rejected once it reaches
the APPLY phase, we should allow NB callbacks to generate error
or warning messages when a configuration change is being applied.
That should be useful, for example, to return warnings back to
the user informing that the applied configuration has some kind of
inconsistency or is missing something in order to be effectively
activated. The infrastructure for this was already present, but the
northbound layer was ignoring all errors/warnings generated during
the apply/abort phases instead of returning them to the user. This
commit changes that.
In the gRPC plugin, extend the Commit() RPC adding a new
"error_message" field to the response type. This is necessary to
allow errors/warnings to be returned even when the commit operation
succeeds (since grpc::Status::OK doesn't support error messages
like the other status codes).
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'grpc')
-rw-r--r-- | grpc/frr-northbound.proto | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/grpc/frr-northbound.proto b/grpc/frr-northbound.proto index d18554df2..32544ba69 100644 --- a/grpc/frr-northbound.proto +++ b/grpc/frr-northbound.proto @@ -287,6 +287,9 @@ message CommitResponse { // ID of the created configuration transaction (when the phase is APPLY // or ALL). uint32 transaction_id = 1; + + // Human-readable error or warning message(s). + string error_message = 2; } // |