lima-vm / lima-vm/lima

Hostagent logs are too noisy

Open
#2,577 1 comment 0 reactions 0 assignees View on GitHub
area/cli enhancement
Dominant language
Go
Stars
21.9k
Forks
957
Avg merge
2d 6h
Merged PRs (30d)
53

Description

### 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?)

Contributor guide

Open the contributing guide

Research direction

Locate the hostagent code that emits the example messages, including the requirement-waiting, TCP forwarding, and r.CreateEndpoint() logs. Review their current severity and surrounding error context, then run the relevant hostagent or cluster tests and verify that routine messages are quieter while genuine failures remain actionable.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
infrastructure, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.