This mostly useful for development, but serves as a way to show a
valid JSON representation of a node event.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Add more verbose logging when there's an error reading events from the
node control socket, and more verbose debug logging in general. This
helps figure out what's going on when something fails.
Handle the failure to subscribe (e.g., socket doesn't exist) and
failure to read an event from an open socket (e.g., node was stopped)
as separate errors. This makes troubleshooting easier.
Add a shutdown message, to allow tests to shut down the CI broker
cleanly.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Add a shutdown event to allow a clean shutdown of the CI broker, which
is useful for tests.
The added logging helps figure out what's going on, when there's a
problem communicating with the node or something else breaks when a
trigger message is constructed.
Also, handle the directory for status page not existing by silently
not writing a status page.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Prepare Cargo.toml for an upcoming change to add an integration and
acceptance testing suite. Update Cargo.lock as well. This commit
brings no functional changes.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Oops. We were exiting zero if there were errors. This is embarrassing.
A zero exit code should always indicate the program ran successfully.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Each request message has a field "version" set to an integer. An
adapter can check that it gets the version of the message it knows how
to handle.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
It was never very clear how Failure and Error actually differ, and
making the choice was thus unnecessarily difficult for an adapter
implementation. Having just Failure is simpler.
We'll re-introduce other variants if there are actual use cases and
things aren't vague.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
Various updates to bring the text of the architecture document up to
date with what has been implemented. Most of the speculative "we will
probably do it like this" parts have been dropped. Various fixes have
been made.
Signed-off-by: Lars Wirzenius <liw@liw.fi>
This means they won't vanish when the broker is restarted.
BREAKING CHANGE: the configuration files MUST now have a field "db"
that is a path to the database file to use. The file will be created
if needed.
Signed-off-by: Lars Wirzenius <liw@liw.fi>