HomeClusterLabs Projects

Fix LogWatcher cursor bug with local logfile

Description

Fix LogWatcher cursor bug with local logfile

When calling setwatch(), LogWatcher is supposed to record the current
cursor position in log using a harvest() call. It then look for given
patterns starting from this recorded position as soon as look() is
called, usualy after some actions were called and logged useful
informations we are looking for.

However, harvest() was not called for local logfile, so the starting
cursor position was in fact recorded during the first call of look(),
most probably *after* the actions wrote to the local logfile.

This bug was leading to permanently failing cluster manager start
or tests when using combined syslog-based log reader.

It's not clear why harvest() was explicitly not called for
localhost in a first place...

Details

Provenance
Jehan-Guillaume de Rorthais <jgdr@dalibo.com>Authored on Jan 16 2019, 4:17 PM
Parents
rP8c91599c9d51: Merge pull request #1664 from kgaillot/master
Branches
Unknown
Tags
Unknown

Event Timeline