Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Mechanism to suppress repetitive logs #1456

Open
atinmu opened this issue Jan 3, 2019 · 1 comment
Open

Mechanism to suppress repetitive logs #1456

atinmu opened this issue Jan 3, 2019 · 1 comment

Comments

@atinmu
Copy link
Contributor

atinmu commented Jan 3, 2019

As gluster clients have the logic of attempting to reconnect to the server after every 3 seconds, there's a critical need to have a wrapper log API over logrus to ensure repetitive logs are suppressed and are being reported with a particular time interval. We have seen cases where if some of the bricks are down, one of the client like glustershd tries to keep connecting to the brick asking for the port number from glusterd2 which results in flooding log entries of following:

time="2018-12-31 04:52:53.287543" level=error msg="registry.SearchByBrickPath() failed for brick" brick=/var/run/glusterd2/bricks/pvc-7f0db129-0c2a-11e9-94f0-98f2b3e68824/subvol1/brick3/brick error="SearchByBrickPath: port for brick /var/run/glusterd2/bricks/pvc-7f0db129-0c2a-11e9-94f0-98f2b3e68824/subvol1/brick3/brick not found" source="[rpc_prog.go:104:pmap.(*GfPortmap).PortByBrick]"

GlusterFS source (and hence GD1) already has a log API GF_LOG_OCCASIONALLY which takes care of the requirement and same needs an implementation in GD2 too.

@atinmu atinmu changed the title log API for occassional logs Mechanism to suppress repetitive logs Jan 3, 2019
@atinmu atinmu added FW: Logging priority: high GCS/1.0 Issue is blocker for Gluster for Container Storage labels Jan 7, 2019
@atinmu atinmu removed the GCS/1.0 Issue is blocker for Gluster for Container Storage label Jan 17, 2019
@atinmu
Copy link
Contributor Author

atinmu commented Jan 17, 2019

With rescoped MVP of GCS/1.0 this item isn't possible to work on. Removing the label.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants