The default bug view has changed. See this FAQ.

Add fabric action to reset the timestamp used by buildbot-master exception log reporting

RESOLVED FIXED

Status

Release Engineering
Buildduty
P2
normal
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: coop, Assigned: coop)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
While we're waiting on me for the fix in bug 1076623, it would be useful to unblock exception reporting by updating the last-time.txt file on each master via fabric. This file contains an epoch tiemstamp that determines how far back in the logs to look for exceptions.

Patch incoming.
(Assignee)

Comment 1

3 years ago
Created attachment 8502929 [details] [diff] [review]
Update the exception timestamp.

Ran this successfully after the db outage today to clean up the exception mailings.
Attachment #8502929 - Flags: review?(pmoore)
Comment on attachment 8502929 [details] [diff] [review]
Update the exception timestamp.

Review of attachment 8502929 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks Coop!

r+ with nits

::: lib/python/util/fabric/actions.py
@@ +230,5 @@
>  
>  
> +def action_update_exception_timestamp(master):
> +    with show('running'):
> +        run('echo `date +%s` > ' +  '`ls -1 /home/cltbld/.%(name)s-last-time.txt`' % master)

Nit: There are two spaces after the +
Nit: Echo not needed, you can run date command directly
Nit: -1 not needed, because without wildcards ls returns maximum of one file
Nit: Having ls ensures that only an existing file is updated, but will cause errors if it does not exist. I've checked and see that the file exists on all the masters, so I think the ls check is not needed. If it is needed, we should not show errors if file does not exist.

Alternatives:

run('date +%s > /home/cltbld/.' + master['name'] + 's-last-time.txt') # preferred
run('date +%s > /home/cltbld/.{0}s-last-time.txt'.format(master['name']))
Attachment #8502929 - Flags: review?(pmoore) → review+
(Assignee)

Comment 3

3 years ago
Comment on attachment 8502929 [details] [diff] [review]
Update the exception timestamp.

Review of attachment 8502929 [details] [diff] [review]:
-----------------------------------------------------------------

Landed with nits fixed:

https://hg.mozilla.org/build/tools/rev/eb6fb1412521
Attachment #8502929 - Flags: checked-in+
(Assignee)

Updated

3 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.