lima-vm / lima

Linux virtual machines, with a focus on running containers
https://lima-vm.io/
Apache License 2.0
15.24k stars 600 forks source link

Hostagent logs are too noisy #2577

Open nirs opened 2 months ago

nirs commented 2 months ago

Description

INFO level logs from "[hostagent"] contain many messages that could be debug level or duplicate messages.

Example log:

msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""
msg="[hostagent] [VZ] - vm state change: running"
msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""
msg="[hostagent] The essential requirement 1 of 2 is satisfied"
msg="[hostagent] Waiting for the essential requirement 2 of 2: \"user session is ready for ssh\""
msg="[hostagent] The essential requirement 2 of 2 is satisfied"
msg="[hostagent] Waiting for the optional requirement 1 of 6: \"systemd must be available\""
msg="[hostagent] Guest agent is running"
msg="[hostagent] Not forwarding TCP 127.0.0.53:53"
msg="[hostagent] Not forwarding TCP 127.0.0.54:53"
msg="[hostagent] The optional requirement 1 of 6 is satisfied"
msg="[hostagent] Not forwarding TCP [::]:22"
msg="[hostagent] Waiting for the optional requirement 2 of 6: \"containerd binaries to be installed\""
msg="[hostagent] Not forwarding TCP 127.0.0.1:41899"
msg="[hostagent] The optional requirement 2 of 6 is satisfied"
msg="[hostagent] Waiting for the optional requirement 3 of 6: \"kubeadm to be installed\""
msg="[hostagent] The optional requirement 3 of 6 is satisfied"
msg="[hostagent] Waiting for the optional requirement 4 of 6: \"kubeadm to be completed\""
msg="[hostagent] Not forwarding TCP 127.0.0.1:45865"
msg="[hostagent] Not forwarding TCP 127.0.0.1:10248"
msg="[hostagent] Not forwarding TCP [::]:10250"
msg="[hostagent] The optional requirement 4 of 6 is satisfied"
msg="[hostagent] Waiting for the optional requirement 5 of 6: \"kubernetes cluster to be running\""
msg="[hostagent] Not forwarding TCP 192.168.105.23:2380"
msg="[hostagent] Not forwarding TCP 192.168.105.23:2379"
msg="[hostagent] Not forwarding TCP 127.0.0.1:2379"
msg="[hostagent] Not forwarding TCP 127.0.0.1:2381"
msg="[hostagent] Not forwarding TCP 127.0.0.1:10257"
msg="[hostagent] Not forwarding TCP 127.0.0.1:10259"
msg="[hostagent] Not forwarding TCP [::]:6443"
msg="[hostagent] The optional requirement 5 of 6 is satisfied"
msg="[hostagent] Waiting for the optional requirement 6 of 6: \"coredns deployment to be running\""
msg="[hostagent] Not forwarding TCP 127.0.0.1:10249"
msg="[hostagent] Not forwarding TCP [::]:10256"
msg="[hostagent] The optional requirement 6 of 6 is satisfied"
msg="[hostagent] Waiting for the guest agent to be running"
msg="[hostagent] Waiting for the final requirement 1 of 1: \"boot scripts must have finished\""
msg="[hostagent] The final requirement 1 of 1 is satisfied"
msg="[hostagent] Copying config from /etc/kubernetes/admin.conf to /Users/nsoffer/.lima/cluster/copied-from-guest/kubeconfig.yaml"

Duplicate messages:

msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""
msg="[hostagent] Waiting for the essential requirement 1 of 2: \"ssh\""

Debug level messages:

msg="[hostagent] Not forwarding TCP 127.0.0.53:53"
msg="[hostagent] Not forwarding TCP 127.0.0.54:53"
msg="[hostagent] Not forwarding TCP [::]:22"
msg="[hostagent] Not forwarding TCP 127.0.0.1:41899"
msg="[hostagent] Not forwarding TCP 127.0.0.1:45865"
msg="[hostagent] Not forwarding TCP 127.0.0.1:10248"
msg="[hostagent] Not forwarding TCP [::]:10250"
msg="[hostagent] Not forwarding TCP 192.168.105.23:2380"
msg="[hostagent] Not forwarding TCP 192.168.105.23:2379"
msg="[hostagent] Not forwarding TCP 127.0.0.1:2379"
msg="[hostagent] Not forwarding TCP 127.0.0.1:2381"
msg="[hostagent] Not forwarding TCP 127.0.0.1:10257"
msg="[hostagent] Not forwarding TCP 127.0.0.1:10259"
msg="[hostagent] Not forwarding TCP [::]:6443"
msg="[hostagent] Not forwarding TCP 127.0.0.1:10249"
msg="[hostagent] Not forwarding TCP [::]:10256"

Another logs that I see from time to time is:

msg="[hostagent] r.CreateEndpoint() = connection was refused"

I have working clusters (using complicated setup and running DR flows) so I guess this is not really an error and can reported as debug message, or maybe as a warning if this can help users to debug this issue.

If this is a real issue it need much more context in the error message (e.g. connection to which address? why the connection is needed?)

jandubois commented 2 months ago

Another logs that I see from time to time is:

msg="[hostagent] r.CreateEndpoint() = connection was refused"

That is #1160.