On 28 Nov 2023 13:50, Stuart Henderson wrote:
> On 2023/11/28 10:43, Silamael Darkomen wrote:
>> Hi!
>>
>> During setup of a new buildbot master under OpenBSD 7.4 I noticed that
>> 'rcctl start buildbot' always fails but buildbot is running afterwards.
>>
>> Debugging showed that buildbot is calling 'tail -F' to watch the twistd.log
>> for recognizing a successfull startup.
>>
>> The attached diff fixes this call to tail by replacing '-F' with '-f'.
>> Now buildbot startes as expected and rcctl is happy too.
>
> the -F flag on some tail implementations allows monitoring a file which
> hasn't been created yet.
>
> is the logfile in this case always expected to exist before buildbot is
> run? if so, then your diff works. but if not, it might need an alternative
> fix e.g. changing to use gtail and adding a dep on coreutils.
Actually I haven't tested this. All I can say is that on my fresh
buildbot installation this fixes the startup problems with rcctl. Maybe
there could be a race there, but I'm not the python crack to read the
whole buildbot startup code ;)
-- Matthias
>> --- buildbot/scripts/logwatcher.py.orig Tue Nov 28 10:31:51 2023
>> +++ buildbot/scripts/logwatcher.py Tue Nov 28 10:32:01 2023
>> @@ -113,7 +113,7 @@ class LogWatcher(LineOnlyLongLineReceiver):
>> else:
>> tailBin = "/usr/bin/tail"
>>
>> - args = ("tail", "-F", "-n", "0", self.logfile)
>> + args = ("tail", "-f", "-n", "0", self.logfile)
>> self.p = self._reactor.spawnProcess(self.pp, tailBin, args,
>> env=os.environ)
>> self.running = True
>
No comments:
Post a Comment