glusterd2 icon indicating copy to clipboard operation
glusterd2 copied to clipboard

Mechanism to suppress repetitive logs

Open atinmu opened this issue 6 years ago • 1 comments

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 avatar Jan 03 '19 03:01 atinmu

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

atinmu avatar Jan 17 '19 10:01 atinmu