Repository navigation
Conversation
|
@rzarzynski - appreciate if you could have a look at this. I am not sure if we also want to move the cluster log (clog) to use the new structure. |
| void LogChannel::do_log(clog_type prio, LogMsg &&m) { | ||
| LogEntry e; | ||
| std::ostringstream oss; | ||
| oss << m; |
There was a problem hiding this comment.
std::ostringstream are relatively expensive to construct. Suggest using CachedStackStringStream (which we use for all debugging messages).
| LogMsg msg; | ||
| bool send_logmsg = false; | ||
| auto m = op->get_req<MMonCommand>(); | ||
| std::ostringstream oss; |
| void encode(bufferlist& bl, uint64_t features) const; | ||
| void decode(bufferlist::const_iterator& p); | ||
| }; | ||
| WRITE_CLASS_ENCODER_FEATURES(LogMsg) |
There was a problem hiding this comment.
Again, I think the direction is reasonable but I don't think we want to make these highly-specific structures for each message type that we may want to put into the audit log channels. I'm pondering whether to just construct a json payload for each type of message we might put into the log channel. We'll always have the normal "string" that goes to the text log but you can enhance it with a payload that can be interpreted specifically by the mgr / auditmon module.
So in this case, you might include a payload like:
{
"channel": "ceph_command",
"data": {
"cmd": ...,
"cmd_args": ...
// etc.
}
So then the MDS can trivially add its own payload for tell commands, etc.
What do you think?
There was a problem hiding this comment.
That sounds fine to me. Right now, what goes in cmd is actually the stringified json of the command which gets persisted in paxos store and will now be additionally recorded in sqlite (by ceph-mgr).
Just to be clear, you are suggesting that the LogMsg structure "carries" a JSON (as you describe above) and its stringified version ends up in paxos store and additionally the json binary ends up in sqlite.
Did I get that right?
There was a problem hiding this comment.
I think so. The ceph-mgr should be smart enough to replay log messages that it has not persisted yet.
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
Fixes: http://tracker.ceph.com/issues/71850
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.