drakkar-lig / walt-python-packages

Home of walt-node, walt-server, walt-client and walt-common python packages.
https://walt-project.liglab.fr
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

walt-echo should always be available #14

Closed eduble closed 5 years ago

eduble commented 6 years ago

Commands walt-cat and walt-tee are always available on walt nodes, because they are based on shell scripts and copied by the server when the image is mounted. Commands walt-monitor and walt-echo are only available if python package "walt-node" is installed on the image. Since we can hardly require python to be installed on all image, this is optional. The reason walt-monitor cannot be a shell script is that it has to create a virtual tty, which is not something we can do on a shell script. The reason walt-echo is not a shell script is that this command is designed to send a single log line, and performance of a simple shell script that would perform this would be low. Currently this command relies on a background daemon (walt-log-daemon, written in python and started by systemd, another requirement of walt-node package) in order to cache network connections to the server.

However, for simple usage, walt-echo is easier to use for beginners, so it is important to have it on images. It would probably be possible to modify it, so that it connects to the background daemon only if this daemon is available, and sends the log line directly otherwise. In this case, it could be included by the server each time an image is mounted.