Allow viewing of node logs via API/CLI #135
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Similar to
pvc vm log
, allowpvc node log
which should show the various logs (node daemon, API daemon, API worker daemon) in a similar fashion, i.e.less
-view ortail -f
-view. Implementation should be identical to thepvc vm log
except that the source will likely bejournalctl
(if file logging is turned off).Would need to store each node's log lines in Zookeeper to prevent shenannegans, and probably update them every keepalive. This will get really hairy quick though, so, as nice as it might be, as-is I don't think this will work out.
That said, there might be a better way to do this with some sort of syslog forwarding. Perhaps using journalctl, to send all the logs to the primary which can then read them. But that is it's own kind of weird.
Might be better to avoid this despite it seeming nice and easy on the surface.
Example implementation of the diff for the basic function to read logs:
https://serverfault.com/questions/758244/how-to-configure-systemd-journal-remote might provide a slightly more elegant way to move the logs around. I'd envision, if possible, some sort of full mesh among the coordinators so that all coordinators can receive all messages from all nodes and then store them in their own independent journal, which could then be dynamically called by whichever node is the primary at that moment using a similar method to the above. This would avoid storing arbitrary system logs in Zookeeper.
Journal forwarding doesn't seem very nice, since you can't really limit it to any sort of specific service/unit like
journalctl
can. Uploading to Zookeeper might be the better option but this need some more investigation of exactly how Zookeeper works, since unlike daemon logs which are bursty but generally quite unchanging, these are constantly updating and rotating.Ended up implementing this in a very similar way to VM console logs. The main downside is that this requires a lot more Zookeeper heap memory, so there is an adjustment in the PVC Ansible configuration to handle this. The option can be turned off in the node daemon configuration if desired.
Included in PVC 0.9.26
closed