-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error back channel / side channel #233
Comments
I guess we have to consider not just the |
We could also use this as an informational conduit, so in addition to an "error" key in the output data there could be an "info" key. This comes up in the case of the ps command, where there are informational messages (lockfile could not be deleted) and some possibly soft errors that should not cause the command to fail. |
The normal case with errors is that sonar starts and produces output, but that some error occurs during the run that prevents it from completing or producing correct data. (The abnormal case is that sonar does not run at all; in this case, heartbeat messages will not arrive at the receiver and the receiver has the opportunity to discover this.)
In the normal error case we have a couple of options, not exclusive:
In the interest of making errors actionable I think the third option is best, and it doesn't cost us much.
We are already multiplexing two data streams on the
sonar ps
stream - the sample stream and the per-system load stream, with the "load" and "gpuinfo" fields - so there's no sin in adding a third, or if you like, a third field to the existing side channel. In the CSV data this would likely be an "error" field that shows up in the first record, along with "load" and "gpuinfo" except it would also show up in heartbeat records, and in JSON data it would just be an additional "error" field at the top level. The field would be absent if there are no errors to report. The payload would be a string. A complication is that we don't want to push literal newlines in either type of data, so the string should be url-encoded or base64-encoded or in some other way safe for transmission. (Neither encoding uses " or , and both are good for both CSV and JSON. Base64 adds about 33% overhead for all data. URL-encoding adds little overhead for ASCII text, which is the expected case.)Also see #201 #232.
The text was updated successfully, but these errors were encountered: