Closed Bug 640943 Opened 14 years ago Closed 13 years ago

post_upload.py should support a config file for host specific values

Categories

(Release Engineering :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: catlee, Assigned: coop)

References

Details

(Whiteboard: [scripts][simple])

Attachments

(1 file, 3 obsolete files)

right now post_upload.py has 2 or 3 sections at the top that need commenting out depending on what environment you're running it in. This makes deploying new versions hard and error prone on stage and preproduction. post_upload.py should support a config file to load the relevant paths from, or to indicate if it should use the production, stage, or preproduction paths.
OS: Linux → All
Priority: -- → P5
Hardware: x86_64 → All
Whiteboard: [scripts][simple]
someone didn't patch their tools correctly which caused this to bite me. I'm working on a fix, will take bug when I think my patch is done
Assignee: nobody → jhford
Attached patch tools v1 (obsolete) — Splinter Review
Testing this in staging is a bit of a pain, so I want to make sure the approach is acceptable
Attachment #611617 - Flags: feedback?(catlee)
Attached patch puppet-manifests v1 (obsolete) — Splinter Review
I am not too familiar with master-puppet stuff, so I don't know if there is a production vs staging variable that I could use for the symlink. If there isn't, is it OK to bake in the staging string?
Attachment #611619 - Flags: review?(catlee)
Comment on attachment 611619 [details] [diff] [review] puppet-manifests v1 Review of attachment 611619 [details] [diff] [review]: ----------------------------------------------------------------- So I have mixed feelings about this...post_upload is run by several users, and I think the settings are almost all host-specific. So maybe it makes sense to put postupload.ini in /etc?
Attachment #611619 - Flags: review?(catlee)
Comment on attachment 611617 [details] [diff] [review] tools v1 looks great!
Attachment #611617 - Flags: feedback?(catlee) → feedback+
(In reply to Chris AtLee [:catlee] from comment #5) > Comment on attachment 611619 [details] [diff] [review] > puppet-manifests v1 > > Review of attachment 611619 [details] [diff] [review]: > ----------------------------------------------------------------- > > So I have mixed feelings about this...post_upload is run by several users, > and I think the settings are almost all host-specific. So maybe it makes > sense to put postupload.ini in /etc? Thinking about it again, yeah, everything that is user-specific is taken care of by using string formatters in the variables.
The remaining work here is to address Catlee's concerns from comment 5, which shouldn't be difficult and deploy it. I've never done a post_upload.py deployment, so I am unsure what's needed here.
Assignee: jhford → nobody
Whiteboard: [scripts][simple] → [scripts][simple][triagefollowup]
Assignee: nobody → coop
Whiteboard: [scripts][simple][triagefollowup] → [scripts][simple]
Using /etc sounds good to me. Deploying changes is documented at https://wiki.mozilla.org/ReleaseEngineering/How_To/Modify_scripts_on_stage
ping from mtg w/Jesse, who is asking me about bug#751878. Any ETA?
Nope, kinda underwater with relops and the Thunderbird release right now, sorry.
Status: NEW → ASSIGNED
Priority: P5 → P2
(In reply to John Ford [:jhford] from comment #8) > The remaining work here is to address Catlee's concerns from comment 5, > which shouldn't be difficult and deploy it. I've never done a > post_upload.py deployment, so I am unsure what's needed here. By "deploy" I'm going to infer "test and then deploy." Once bitten and all. AFAICT the only changes that need to happen are adding an ini file for preproduction, and fixing up the puppet manifest.
I've patched the version of post_upload.py that's running on dev-stage01 and symlinked an updated version of staging.ini (with scl3 changes) as /etc/post_upload.ini. Working on a doing the same for preproduction now.
(In reply to Chris Cooper [:coop] from comment #13) > Working on a doing the same for preproduction now. Preproduction is setup now too.
post_upload.py isn't changed from jhford's patch, I've just added a new config for preproduction and fixed paths to point to new hosts in scl3 where applicable.
Attachment #611617 - Attachment is obsolete: true
Attachment #611619 - Attachment is obsolete: true
Attachment #635069 - Flags: review?(catlee)
Comment on attachment 635069 [details] [diff] [review] Use ini file for post_upload_py local config Drive by ... >diff --git a/stage/staging.ini b/stage/staging.ini >+[urls] >+tinderbox_builds = http://dev-stage01.build.sjc1.mozilla.com/pub/mozilla.org/%(product)s/tinderbox-builds/%(tinderbox_builds_dir)s >+long_dated = http://dev-stage01.build.sjc1.mozilla.com/pub/mozilla.org/%(product)s/%(nightly_dir)s/%(year)s/%(month)s/%(year)s-%(month)s-%(day)s-%(hour)s-%(minute)s-%(second)s-%(branch)s >+candidates = http://dev-stage01.build.sjc1.mozilla.com/pub/mozilla.org/%(product)s/%(nightly_dir)s/%(version)s-candidates/build%(buildnumber)s >+pvt_builds = https://dm-pvtbuild01.mozilla.org/staging/%(product)s/%(tinderbox_builds_dir)s >+try = http://dev-stage01.build.sjc1.mozilla.com/pub/mozilla.org/%(product)s/try-builds/%(who)s-%(revision)s/%(builddir)s s/dev-stage01-build.sjc1/dev-stage01.srv.releng.scl3/g I'm not sure what to do about pvt_builds - the hostname for prod is pvtbuilds2.dmz.scl3.mozilla.com. Are we going to use the production config there ? At any rate the old host is still in all three ini files.
(In reply to Nick Thomas [:nthomas] from comment #16) > s/dev-stage01-build.sjc1/dev-stage01.srv.releng.scl3/g Sigh. I took my patch from preproduction-stage after handing dev-stage01 over to jhopkins, and of course I forgot to move this change over. Updated patch attached. > I'm not sure what to do about pvt_builds - the hostname for prod is > pvtbuilds2.dmz.scl3.mozilla.com. Are we going to use the production config > there ? At any rate the old host is still in all three ini files. Good catch. pvt-builds for preproduction was previously pointing to preproduction-stage so I've honored that. Staging pvt-builds had always been pointing to the production location AFAICT.
Attachment #635069 - Attachment is obsolete: true
Attachment #635069 - Flags: review?(catlee)
Attachment #635156 - Flags: review?(catlee)
Attachment #635156 - Flags: review?(catlee) → review+
Comment on attachment 635156 [details] [diff] [review] Use ini file for post_upload_py local config, v2 https://hg.mozilla.org/build/tools/rev/2ad3ab02af12
Attachment #635156 - Flags: checked-in+
Comment on attachment 635156 [details] [diff] [review] Use ini file for post_upload_py local config, v2 svn ci -m"Bug 640943 - Use ini file for post_upload_py local config - r=catlee" Sending files/bin/post_upload.py Adding files/etc/post_upload.ini Sending manifests/post-upload.pp Transmitting file data ... Committed revision 41376. Now deployed in production and preproduction.
Just checked on stage.m.o and this is officially deployed now.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
....i think this broke seamonkey, at least releases. Cc ewong for a look before i can
(In reply to Justin Wood (:Callek) from comment #21) > ....i think this broke seamonkey, at least releases. Cc ewong for a look > before i can could another possible reason for the breakage be the patch for bug #725839?
(In reply to Edmund Wong (:ewong) from comment #22) > (In reply to Justin Wood (:Callek) from comment #21) > > ....i think this broke seamonkey, at least releases. Cc ewong for a look > > before i can > > could another possible reason for the breakage be the patch for bug #725839? Yep thats it (sorry for noise here)
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: