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

fix: enable trace logging only if logrus.LogLevel() is TRACE #1273

Conversation

denis-tingaikin
Copy link
Member

@denis-tingaikin denis-tingaikin commented Apr 27, 2022

Signed-off-by: Denis Tingaikin denis.tingajkin@xored.com

Description

Error prints can still be seen in the logs after deploying the basic kernel2kernel example from the repo:

Apr 21 11:31:46.821 [ERRO] [type:registry] (7.3)         failed to dial unix:///var/lib/networkservicemesh/nsm.io.sock: context deadline exceeded
Apr 21 11:31:46.821 [ERRO] [type:registry] (6.2)        failed to dial unix:///var/lib/networkservicemesh/nsm.io.sock: context deadline exceeded
Apr 21 11:31:46.821 [ERRO] [type:registry] (5.3)       failed to dial unix:///var/lib/networkservicemesh/nsm.io.sock: context deadline exceeded
Apr 21 11:31:46.821 [ERRO] [type:registry] (4.2)      failed to dial unix:///var/lib/networkservicemesh/nsm.io.sock: context deadline exceeded
Apr 21 11:31:46.821 [ERRO] [type:registry] (3.2)     failed to dial unix:///var/lib/networkservicemesh/nsm.io.sock: context deadline exceeded
Apr 21 11:31:46.821 [ERRO] [retryNSEClient:Register] [type:registry] (2.89)    try attempt has failed: failed to dial unix:///var/lib/networkservicemesh/nsm.io.sock: context deadline exceeded

[Richárd Kővári](https://app.slack.com/team/U02U0J7LGU8)  [6 days ago](https://cloud-native.slack.com/archives/CHQNNUPN1/p1650540992192639?thread_ts=1648557444.028369&cid=CHQNNUPN1)
Apr 21 11:32:27.401 [ERRO] [type:registry] (7.1)         rpc error: code = Canceled desc = context canceled;    Error returned from api/pkg/api/registry/networkServiceEndpointRegistryFindClient.Recv; github.com/networkservicemesh/sdk/pkg/registry/core/trace.logError;              /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/core/trace/common.go:38;   github.com/networkservicemesh/sdk/pkg/registry/core/trace.(*traceNetworkServiceEndpointRegistryFindClient).Recv;         /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/core/trace/nse_registry.go:56;      github.com/networkservicemesh/sdk/pkg/registry/core/trace.(*traceNetworkServiceEndpointRegistryFindClient).Recv;                /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/core/trace/nse_registry.go:47;      github.com/networkservicemesh/sdk/pkg/registry/common/dial.(*dialNSEFindClient).Recv;           /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/common/dial/nse_client.go:118;      github.com/networkservicemesh/sdk/pkg/registry/core/trace.(*traceNetworkServiceEndpointRegistryFindClient).Recv;         /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/core/trace/nse_registry.go:47;     github.com/networkservicemesh/sdk/pkg/registry/core/trace.(*traceNetworkServiceEndpointRegistryFindClient).Recv;         /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/core/trace/nse_registry.go:47;      github.com/networkservicemesh/sdk/pkg/registry/core/trace.(*traceNetworkServiceEndpointRegistryFindClient).Recv;                /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/core/trace/nse_registry.go:47;      github.com/networkservicemesh/sdk/pkg/registry/core/trace.(*traceNetworkServiceEndpointRegistryFindClient).Recv;                /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/core/trace/nse_registry.go:47;      github.com/networkservicemesh/sdk/pkg/registry/common/heal.(*healNSEClient).Register.func1;              /root/go/pkg/mod/github.com/networkservicemesh/sdk@v0.5.1-0.20220415125440-009c3f3a16bd/pkg/registry/common/heal/nse_client.go:68;      runtime.goexit;         /go/src/runtime/asm_amd64.s:1371;
Apr 21 11:32:27.401 [ERRO] [type:registry] (7.1)         Error returned from api/pkg/api/registry/networkServiceEndpointRegistryFindClient.Recv: rpc error: code = Canceled desc = context canceled
Apr 21 11:32:27.401 [ERRO] [type:registry] (7.1)         Error returned from api/pkg/api/registry/networkServiceEndpointRegistryFindClient.Recv: rpc error: code = Canceled desc = context canceled
Apr 21 11:32:27.401 [ERRO] [type:registry] (7.1)         Error returned from api/pkg/api/registry/networkServiceEndpointRegistryFindClient.Recv: rpc error: code = Canceled desc = context canceled
Apr 21 11:32:27.401 [ERRO] [type:registry] (7.1)         Error returned from api/pkg/api/registry/networkServiceEndpointRegistryFindClient.Recv: rpc error: code = Canceled desc = context canceled
Apr 21 11:32:27.401 [ERRO] [type:registry] (7.1)         Error returned from api/pkg/api/registry/networkServiceEndpointRegistryFindClient.Recv: rpc error: code = Canceled desc = context cancele

This PR temporary fixes the problem with logging from the community for all NSM applications.

Issue link

We're planning to rework and simplify logging within #1272

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>
@denis-tingaikin denis-tingaikin changed the title fix: enable trace logging only if logrus.TraceLevel is TRACE fix: enable trace logging only if logrus.LogLevel() is TRACE Apr 27, 2022
@edwarnicke edwarnicke merged commit 241ef75 into networkservicemesh:main Apr 27, 2022
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-remote-vlan that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-ipam-vl3 that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-map-ip-k8s that referenced this pull request Apr 27, 2022
…k@main

PR link: networkservicemesh/sdk#1273

Commit: 241ef75
Author: Denis Tingaikin
Date: 2022-04-28 01:41:49 +0300
Message:
  - enable trace logging only if logrus.TraceLevel is TRACE (#1273)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
denis-tingaikin added a commit that referenced this pull request Apr 29, 2022
Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>
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.

2 participants