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

Add logs to healClient #1195

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

glazychev-art
Copy link
Contributor

Signed-off-by: Artem Glazychev artem.glazychev@xored.com

Description

Added logs to healClient to to localize this problem:
networkservicemesh/integration-k8s-packet#185

Issue link

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

@@ -62,7 +63,7 @@ func (h *healClient) Request(ctx context.Context, request *networkservice.Networ
}
cc, ccLoaded := clientconn.Load(ctx)
if ccLoaded {
cancelEventLoop, eventLoopErr := newEventLoop(h.chainCtx, begin.FromContext(ctx), cc, conn, h.livelinessCheck)
cancelEventLoop, eventLoopErr := newEventLoop(h.chainCtx, begin.FromContext(ctx), cc, conn, h.livelinessCheck, log.FromContext(ctx))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cancelEventLoop, eventLoopErr := newEventLoop(h.chainCtx, begin.FromContext(ctx), cc, conn, h.livelinessCheck, log.FromContext(ctx))
cancelEventLoop, eventLoopErr := newEventLoop(extend.WithValuesFromContext(h.chainCtx, ctx), cc, conn, h.livelinessCheck)

Then you can get logger and begin from the ctx:

b := begin.FromContext(ctx)
logger := log.FromContext(ctx).WithField(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you, fixed

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
@denis-tingaikin denis-tingaikin merged commit 0b0a87a into networkservicemesh:main Dec 9, 2021
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr-proxy that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-admission-webhook-k8s that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsmgr that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nse-vfio that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-init that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-memory that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-kernel that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/cmd-registry-proxy-dns that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot pushed a commit to networkservicemesh/sdk-k8s that referenced this pull request Dec 9, 2021
…k@main

PR link: networkservicemesh/sdk#1195

Commit: 0b0a87a
Author: Artem Glazychev
Date: 2021-12-09 21:11:08 +0700
Message:
  - Add logs to healClient (#1195)
Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
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