When changing the firewall policies, if there're more than node
connected and node selected is All, ask the user to confirm the changes.
To avoid surprises.
- Use text instead of icons, because in some themes the - icon is not
represented as "-" character.
- Put the + button on the right, and - on the left.
Closes: #1473
This option was causing a reaaally annoying behaviour:
When you scrolled horizontally the view and clicked on a row,
the view would automatically scroll to the left.
Some distros like OpenSuse Leap 15.6 ships with python3.6 by default.
PyQt6 is not available for python3.6, but python311-PyQt6 is.
So there's no generic python3-PyQt6, but python311-PyQt6.
In this specific case, the user will have to change the default python3
version to python3.11. And they'll have to install some packages like
slugify from pip.
But as a best effort, we'll try to install PyQt6 from the distro
repositories.
By default, every second we send to the GUI the collected statistics by
the daemon: metrics + events (connections).
This call has a hard-coded timeout of one second, and if it reaches the
deadline, a warning message is printed to the log.
After several timeouts, the daemon closes the connection and tries to
reconnect again.
The daemon invokes this call even if there're no statistics to send.
With one daemon and one GUI, it's not much of a problem. But if there're
n nodes, the GUI will receive a minimum of n connections every second.
In many scenarios, these empty calls are unnecessary.
So, in order to optimize this behaviour, if the daemon has not collected
new statistics, we won't invoke this call. This will slightly reduce the
load on the GUI (server) when managing multiple nodes, and will save
some CPU cycles on the daemon side.
The connection status between the daemon and the GUI is managed with the
following gRPC options:
- The server and the daemon configures a 5-seconds keepalive to keep
the channel open:
'grpc.keepalive_time_ms', 5000
- If after 5 seconds the keepalive msg is not received, then after 20
seconds the connection with the daemon will be closed if the server
doesn't receive a response:
'grpc.keepalive_timeout_ms', 20000
So after about 30 seconds, if the daemon can't communicate with the GUI
(server), it'll close the connection and retry it every second.
When clicking on a node, the GUI starts a background task to obtain the
system stats of the daemon (ram, swap, uptime, load avg, ...).
We were not handling the monitoring/unmonitoring actions properly.
When a node connected to the gui for the first time, we were not
updating the db accordingly. We were doing it when populating the
stats or adding events.
Unfortunately, not all fields are available when a node subscribes to
the GUI, they're sent when the node posts new events. Because of this,
some fields may appear blank until the node send new events.
It'll be fixed in future releases.
When showing/hiding the main window by clicking on the systray icon, if
the user was reviewing the connections of a node before hiding the
window, the node table was not restored again.
We changed a few weeks ago how the window is shown (showEvent() ->
show()), so this is an unexpected error from that change.
Sometimes, when closing the notifications channel, we could end up
trying to reply to a notification after the channel was already
closed. For example when changing the server address of a node.
In that scenario, the goroutine never finished and attempted to
reply to the notification.
- allow to configure max number of nodes (incoming connections).
If the server address is a unix socket, it'd make sense to limit it
to 1.
- allow to configure server workers.
By default ThreadPoolExecutor max_workers value is calculated based
on the number of CPUs: min(32, os.cpu_count() + 4).
When the GUI (server) is configured to manage multiple nodes, if
there're not enough server workers (for example because there's
only 1 CPU, thus ~6 threads), it can end up freezing, blocking new
requests (new nodes, new stats, new rule requests, etc).
The server uses one worker per node to handle notifications, and
it's not released until the node exits.
Every second, the nodes send the statistics to the server, which also
consumes one worker for at least one second.
Additionally the server may receive new rule requests and alerts,
which also consume one worker each temporarily.
So if there're 6 nodes, the server may need ~3 workers per node.
Related: #1453
When sending the events to the GUI (server), there's a hardcoded timeout
of one second. If the call takes longer, we were writing a warning to
the logs for each call, which in some cases could be excessive.
Hitting the timeout can be normal under some circumstances, such as when
connecting to a GUI with multiple nodes and a lot of activity.
More info: #1453