Convert logging config to YANG/mgmtd, and add missing mgmtd functionality#19060
Convert logging config to YANG/mgmtd, and add missing mgmtd functionality#19060Jafaral merged 6 commits intoFRRouting:masterfrom
Conversation
876dab8 to
825bd19
Compare
a464420 to
5ea1666
Compare
59327fd to
0c416a4
Compare
c289f7e to
92727f7
Compare
92727f7 to
a16d8fd
Compare
a16d8fd to
2981a66
Compare
yang/frr-logging.yang
Outdated
| leaf record-severity { | ||
| type boolean; | ||
| default false; | ||
| description "Include priority in non-syslog messages."; |
There was a problem hiding this comment.
We maybe use priority and severity interchangeably, but did you mean severity here?
There was a problem hiding this comment.
yes, should be Include severity ...
Add module for configuring logging. Add and use ietf-syslog-types for syslog based configuration. Signed-off-by: Christian Hopps <chopps@labn.net>
Signed-off-by: Christian Hopps <chopps@labn.net>
Record log level using standard syslog severity tags which is understood by auto-styling/coloring log viewers, etc. Signed-off-by: Christian Hopps <chopps@labn.net>
| @@ -173,7 +173,8 @@ struct timestamp_control { | |||
| "Local use\n" | |||
|
|
|||
|
|
|||
mgmtd/mgmt_txn.c
Outdated
| enum mgmt_txn_req_type req_type; | ||
| uint64_t req_id; | ||
| union { | ||
| /* XXX allocated or not, pick one, but cc is by far the largest! */ |
There was a problem hiding this comment.
I don't understand this comment, drop or clarify?
There was a problem hiding this comment.
The union is made up of pointers to allocated sub-structs except struct mgmt_commit_cfg_req commit_cfg (i.e., cc) which is declared inline. Usually one would do this bit of oddness b/c the allocated things are very large and the inline thing was small to save on the extra allocation.
In this case the inline thing is way bigger than any of the other allocated things in the union so it makes no sense.
There was a problem hiding this comment.
I left this comment here so someone maybe cleans it up. But since it will change all references from commit_cfg.foobar to commit_cfg->foobar everywhere in the code (or rpc.foobar, get_tree.foobar from rpc->foobar and get_tree->foobar if the choice is the other direction to embed all of the variants rather than allocate) I wanted to leave this to a cleanup PR, and not generate a lot of noise in this functionality PR. .
Prior to this mgmtd was a YANG broker only, it didn't actually process any YANG configuration for itself. These changes add support for configuring mgmtd with YANG in addition to the backend clients. Signed-off-by: Christian Hopps <chopps@labn.net>
Signed-off-by: Christian Hopps <chopps@labn.net>
2981a66 to
80d4140
Compare
Test logging configuration variations including syslog. Signed-off-by: Christian Hopps <chopps@labn.net>
80d4140 to
1df0ed0
Compare
Add a frr-logging.yang module, and implement it converting to Mgmtd/YANG.
Add a topotest for logging config.
This is the penultimate conversion to be done for lib/*. logging 5424 is the only remaining functionality not converted, and this appears to not actually be used.
Prior to this PR mgmtd was a YANG broker only, it didn't actually process
any YANG configuration for itself. These changes add support for configuring
mgmtd with YANG in addition to the backend cilents.
Finally add a
log record-severityto add syslog standard tags to file/consol logs (i.e., DEBUG, INFO, ...).