Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging: Reduce device discovering verbosity #793

Conversation

zeeke
Copy link
Member

@zeeke zeeke commented Oct 18, 2024

The DiscoverSriovDevices routine produces a huge amount of log entries, making debugging problems hard.

Remove log entries that can produce a log line for each configured VF and which does not produce any change in the environment.

The following data comes from a lab I debugged recently:

Analysing a 51 Megabytes rotated log file:

$ ls -lh config-daemon.log
-rw-r--r--. 1 apanatto apanatto 51M Oct 18 12:26 config-daemon.log

$ wc -l config-daemon.log
267148 config-daemon.log

for 2h32m of idle application

$ tail -n 1 config-daemon.log
2024-09-23T12:40:30.620250456Z     INFO    daemon/writer.go:147    setNodeStateStatus(): status    {"sync-status": "Succeeded", "last-sync-error": ""}

$ head -n 1 config-daemon.log
2024-09-23T10:08:47.308287975Z     LEVEL(-2)       daemon/daemon.go:220    get item from queue     {"item": 2}
$ grep "DiscoverVDPAType() discover device type" config-daemon.log | wc -l
84736

$ grep "DiscoverVDPAType(): VDPA device for VF not found" config-daemon.log | wc -l
84736

grep "sriov/sriov.go:127     TryGetInterfaceName()" config-daemon.log | wc -l
84736

Which is 95% of the whole file.

The `DiscoverSriovDevices` routine produces a huge amount of log entries,
making debugging problems hard.

Remove log entries that can produce a log line for each configured VF and which
does not produce any change in the environment.

Signed-off-by: Andrea Panattoni <[email protected]>
@zeeke zeeke requested a review from SchSeba October 18, 2024 11:15
Copy link

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11402676883

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.007%) to 45.01%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/host/internal/network/network.go 0 1 0.0%
Totals Coverage Status
Change from base Build 11294509064: -0.007%
Covered Lines: 6661
Relevant Lines: 14799

💛 - Coveralls

@adrianchiris adrianchiris merged commit 68b6c02 into k8snetworkplumbingwg:master Oct 21, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants