Closed Bug 755845 Opened 12 years ago Closed 12 years ago

Add post-setup |import-buildbot-data.py -d 2| to TBPL Vagrant config

Categories

(Tree Management Graveyard :: TBPL, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Assigned: emorley)

References

Details

Attachments

(1 file, 1 obsolete file)

When using Vagrant to set up a TBPL instance, the crobjob in the VM does:
*/5 * * * * tbpl python /var/www/tbpl/dataimport/import-buildbot-data.py

However, this just uses builds-4hr.js.gz, and so the local TBPL instance will be missing builders/runs from earlier that day, making the local instance look broken until it has run for quite a while.

To solve this, the Vagrant config should run something like this after the initial setup, to import the last 5 days worth of runs (might not need as high as 5, but that's what the README suggests for manual setup, so keeping parity with that):
sudo su tbpl
MYSQL_PASSWORD="tbpl"
python /var/www/tbpl/dataimport/import-buildbot-data.py -d 5
Attached patch Patch v1 (obsolete) — Splinter Review
This is my first time using puppet, so I'm not sure of best practices etc. Am I supposed to have an |unless| field? (Seems to work ok locally)

Thanks!
Assignee: nobody → bmo
Status: NEW → ASSIGNED
Attachment #624785 - Flags: review?(rhelmer)
Comment on attachment 624785 [details] [diff] [review]
Patch v1

This will work, but the problem is that it will be run every time puppet is invoked (on boot, on "vagrant provision", on "vagrant reload")

The "unless" keeps it from doing that and is generally used as a way to indicate that something has been done. I think it'd be tricky to really tell if this had been run before...

Instead of using "unless" you could use "creates" and have the exec command create a state file, say in /var/tmp, which would indicate that this had been run once.

However thinking about it, it might not be such a big deal if this runs on every puppet invocation, so perhaps we should just take it. It's not necessary to run puppet much on a tbpl VM since the checkout is shared directly to /var/www anyway.
Attachment #624785 - Flags: review?(rhelmer) → review+
Attached patch Patch v2Splinter Review
I agree that it doesn't hurt to refresh after reloading. However I've changed the d parameter to 2, since 5 increased the total Vagrant+puppet setup time to ~300s on this machine, which was a bit too much.
Attachment #624785 - Attachment is obsolete: true
Summary: Add post-setup |import-buildbot-data.py -d 5| to TBPL Vagrant config → Add post-setup |import-buildbot-data.py -d 2| to TBPL Vagrant config
http://hg.mozilla.org/users/mstange_themasta.com/tinderboxpushlog/rev/cefda9fd4b40
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 756723
Depends on: 756959
Product: Webtools → Tree Management
Product: Tree Management → Tree Management Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: