Closed Bug 887945 Opened 12 years ago Closed 12 years ago

release-runner.py should use a lockfile to make sure only one instance is ever running

Categories

(Release Engineering :: Release Automation, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bhearsum, Assigned: rail)

Details

(Whiteboard: [shipit])

Attachments

(1 file, 1 obsolete file)

No description provided.
Summary: release runner wrapper should use a lockfile to make sure only one instance of release-runner.py is ever running → release-runner.py should use a lockfile to make sure only one instance is ever running
Attached patch use twisted.python.lockfile (obsolete) — Splinter Review
I haven't tested this yet.
Attachment #768952 - Flags: feedback?(bhearsum)
Attachment #768952 - Flags: feedback?(bhearsum) → feedback+
When we switch to puppet managed wrapper (either shell or python) we should explicitly pass --lockfile to not pollute tools checkout with untracked files and keep the lock file in /builds/releaserunner.
Attachment #768952 - Attachment is obsolete: true
Attachment #771415 - Flags: review?(bhearsum)
Comment on attachment 771415 [details] [diff] [review] use twisted.python.lockfile v2 Review of attachment 771415 [details] [diff] [review]: ----------------------------------------------------------------- ::: buildfarm/release/release-runner.py @@ +220,2 @@ > # Shorthand > + sendchange_master = config.get('release-runner', 'sendchange_master') Not worried about the "if not sendchange_master" check anymore?
Attachment #771415 - Flags: review?(bhearsum) → review+
(In reply to Ben Hearsum [:bhearsum] from comment #3) > Comment on attachment 771415 [details] [diff] [review] > use twisted.python.lockfile v2 > > Review of attachment 771415 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: buildfarm/release/release-runner.py > @@ +220,2 @@ > > # Shorthand > > + sendchange_master = config.get('release-runner', 'sendchange_master') > > Not worried about the "if not sendchange_master" check anymore? No. config.get raises an exception in that case, what is kind of the same. parser.error is not really what we want there.
Comment on attachment 771415 [details] [diff] [review] use twisted.python.lockfile v2 https://hg.mozilla.org/build/tools/rev/49eef4de11a6 and deployed on bm81 [cltbld@buildbot-master81.srv.releng.scl3.mozilla.com tools]$ $ pwd /builds/releaserunner/tools [cltbld@buildbot-master81.srv.releng.scl3.mozilla.com tools]$ hg st ? buildfarm/release/.release-runner.lock [cltbld@buildbot-master81.srv.releng.scl3.mozilla.com tools]$ ls -l buildfarm/release/.release-runner.lock lrwxrwxrwx 1 cltbld cltbld 5 Jul 4 11:51 buildfarm/release/.release-runner.lock -> 28187 The library uses a (broken) symlink to PID.
Attachment #771415 - Flags: checked-in+
$ ps -p `readlink buildfarm/release/.release-runner.lock` uw USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND cltbld 28187 0.0 0.3 218088 20196 ? S 11:51 0:00 python release-runner.py -c /builds/releaserunner/release-runner.ini
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: