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

Observing many logs in the format "Connecting to %s" #110

Closed
tomfotherby opened this issue Apr 6, 2021 · 9 comments
Closed

Observing many logs in the format "Connecting to %s" #110

tomfotherby opened this issue Apr 6, 2021 · 9 comments

Comments

@tomfotherby
Copy link

tomfotherby commented Apr 6, 2021

We are using livenessprobe v2.2.0 and see many logs in stderr that look like this:

1 connection.go:153] Connecting to unix:///csi/csi.sock

I tracked the line of code that generates these log messages to the golang connection library:

klog.V(5).Infof("Connecting to %s", address)

Source: https://github.com/kubernetes-csi/csi-lib-utils/blob/v0.9.1/connection/connection.go#L153 . Although the V(5) was added only 3 months ago, 29/Dec/20 in kubernetes-csi/csi-lib-utils@75fbafd.

We configure the livenessprobe sidecar like this:

      - args:
        - --csi-address=/csi/csi.sock
        - --health-port=9808
        - --v=3
        image: k8s.gcr.io/sig-storage/livenessprobe:v2.2.0
        imagePullPolicy: IfNotPresent
        name: liveness-probe
        resources:
          limits:
            cpu: 50m
            memory: 32Mi
          requests:
            cpu: 10m
            memory: 8Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /csi
          name: socket-dir

My understanding was that the V(5) in the Connection logging whould mean that if we used --v=5 we would see the log, but since we use --v=3, we shouldn't see it.

Are we doing something wrong? or do we simply need to wait until v2.3 to pickup the new V(5) added to the connection library logging?


I noticed in the v2.2 CHANGELOG, there was a PR to reduce the default log level of the livenessprobe-sidecar to '4' (#88).


Currently we get about 20,000 logs like this per hour, which is wasting space in ElasticSearch. As a workaround we can filter out these logs with a logstash filter, for example:

    filter {
      if [kubernetes][container][name] == "liveness-probe" {
        if "Connecting to unix:///csi/csi.sock" in [message] {
          drop{}
        }
      }
    }
@sylr
Copy link

sylr commented Apr 23, 2021

You are using k8s.gcr.io/sig-storage/livenessprobe:v2.2.0 as I am and the fix you mention in kubernetes-csi/csi-lib-utils@75fbafd in not present in csi-lib-utils@v0.9.0 which is the version used in livenessprobe:v2.2.0.

Master has been upgraded to csi-lib-utils@v0.9.1 but has yet been released.

@pohly would it be possible to release a new version ? I'd really like to get rid of this spurious logging as well.

@pohly
Copy link
Contributor

pohly commented Apr 23, 2021

A new release of livenessprobe might be prepared for the Kubernetes 1.21 update of the sidecars: https://github.com/orgs/kubernetes-csi/projects/38#card-58114079

/cc @jsafrane

Jan, you wanted to check livenessprobe dependencies. Do we need to update those before doing a new release?

@jsafrane
Copy link
Contributor

I checked livenessprobe and it's fine, we don't need to update deps.

@pohly
Copy link
Contributor

pohly commented Apr 26, 2021

Will we do a new release anyway?

@msau42
Copy link
Collaborator

msau42 commented Apr 27, 2021

Yeah let's do a release to get this logging fix.

@ialidzhikov
Copy link
Contributor

livenessprobe@v2.3.0 is out with a fix for this issue. @tomfotherby , can you check the new version and verify that it is fixing the issue?

@tomfotherby
Copy link
Author

@ialidzhikov - I tested it on a small staging cluster. It works a treat:

Selection_158

@ialidzhikov
Copy link
Contributor

@tomfotherby, thank you for testing. Can we then close this issue?

@tomfotherby
Copy link
Author

Yes please

humblec pushed a commit to humblec/livenessprobe that referenced this issue Jan 28, 2022
4aff857 Merge pull request kubernetes-csi#109 from pohly/alpha-test-defaults
0427289 Merge pull request kubernetes-csi#110 from pohly/kind-0.9-bazel-build-workaround
9a370ab prow.sh: work around "kind build node-image" failure
522361e prow.sh: only run alpha tests for latest Kubernetes release
22c0395 Merge pull request kubernetes-csi#108 from bnrjee/master
b5b447b Add go ldflags using LDFLAGS at the time of compilation
16f4afb Merge pull request kubernetes-csi#107 from pohly/kind-update
7bcee13 prow.sh: update to kind 0.9, support Kubernetes 1.19
df518fb prow.sh: usage of Bazel optional
c3afd42 Merge pull request kubernetes-csi#104 from xing-yang/snapshot
dde93b2 Update to snapshot-controller v3.0.0

git-subtree-dir: release-tools
git-subtree-split: 4aff857d88149e07951fcd1322f462f765401a86
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

No branches or pull requests

6 participants