Skip to content

Conversation

@tamilmani1989
Copy link
Member

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
This PR addresses

  1. prevents multi process access same telemetry lofile. only telemetry server can access log file.
  2. included more meaningful logs

Special notes for your reviewer:

Release note:

@codecov
Copy link

codecov bot commented Mar 12, 2019

Codecov Report

Merging #312 into master will decrease coverage by 0.02%.
The diff coverage is 95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #312      +/-   ##
==========================================
- Coverage   46.51%   46.48%   -0.03%     
==========================================
  Files          25       25              
  Lines        3440     3418      -22     
==========================================
- Hits         1600     1589      -11     
+ Misses       1600     1581      -19     
- Partials      240      248       +8
Impacted Files Coverage Δ
telemetry/telemetrybuffer.go 58.05% <100%> (+4.23%) ⬆️
telemetry/telemetrybuffer_linux.go 81.25% <100%> (+18.75%) ⬆️
telemetry/telemetry.go 29.41% <91.66%> (+2.25%) ⬆️
npm/nwpolicy.go 56.09% <0%> (-7.32%) ⬇️
npm/pod.go 62.62% <0%> (-6.07%) ⬇️
npm/namespace.go 59.43% <0%> (-5.67%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 159cd85...a4119fb. Read the comment docs.

Copy link
Contributor

@jaer-tsun jaer-tsun left a comment

Choose a reason for hiding this comment

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

I don't see changes to CNS telemetry here; will that be required? (for DNC as well?)

log.Printf("[cni] Telemetry service started")

for attempt := 0; attempt < 5; attempt++ {
if telemetry.CheckIfSockExists() {
Copy link
Contributor

Choose a reason for hiding this comment

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

telemetry.SockExists() ?

Why are there 5 attempts?

Copy link
Member Author

Choose a reason for hiding this comment

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

just a calculated number. wait for second and then exit if telemetry socket doesn;t exist.

go tb.BufferAndPushData(0)
}

if !CheckIfSockExists() {
Copy link
Contributor

Choose a reason for hiding this comment

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

SockExists()

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

jaer-tsun
jaer-tsun previously approved these changes Mar 13, 2019
Copy link
Contributor

@jaer-tsun jaer-tsun left a comment

Choose a reason for hiding this comment

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

lgtm

@tamilmani1989 tamilmani1989 merged commit 83945fd into Azure:master Mar 13, 2019
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