Closed
Bug 827892
Opened 12 years ago
Closed 12 years ago
Each panda should know to which mobile imaging server to talk to
Categories
(Infrastructure & Operations Graveyard :: CIDuty, task, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: armenzg, Assigned: armenzg)
References
Details
Attachments
(2 files, 2 obsolete files)
56.69 KB,
text/plain
|
Details | |
8.07 KB,
patch
|
jhopkins
:
review+
armenzg
:
checked-in+
|
Details | Diff | Splinter Review |
Our configs have hard-coded the address of one of the 10 mobile imaging servers:
"mozpool_api_url": "http://mobile-imaging-001.p1.releng.scl1.mozilla.com"
I should fix this so we can use the remaining racks that have been allocated for b2g work.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → armenzg
Priority: -- → P1
Assignee | ||
Comment 1•12 years ago
|
||
What do you think?
Attachment #699457 -
Flags: review?(jhopkins)
Attachment #699457 -
Flags: feedback?(aki)
Comment 2•12 years ago
|
||
Comment on attachment 699457 [details] [diff] [review]
remove hardcoded value
>- def query_mozpool_handler(self):
>+ def determine_mozpool_host(self, device):
>+ fqdn = socket.getfqdn(device)
>+ vlan_match = re.search("%s\.p([0-9]+)\.releng.*" % device, fqdn)
>+ if vlan_match:
>+ vlan = int(vlan_match.group(1))
>+ else:
>+ raise MozpoolException("This panda board does not have an associated BMM.")
>+ return "http://mobile-imaging-%03i.p%i.releng.scl1.mozilla.com" % (vlan, vlan)
Cool, I didn't realize this mapped that way.
If you wanted to be super cool you could make "http://mobile-imaging-%03i.p%i.releng.scl1.mozilla.com" part of the config rather than hardcoding here, but this works for now.
>+ def query_mozpool_handler(self, device=None, mozpool_api_url=None):
> if not self.mozpool_handler:
>- if 'mozpool_api_url' not in self.config:
>- self.fatal("Can't create mozpool handler without mozpool_api_url set!")
>+ assert device != None or mozpool_api_url != None
This assert is probably ok, though I'd tend to prefer a human-readable |self.fatal("query_mozpool_handler() requires either a device or mozpool_api_url!")|
That may just be me.
Attachment #699457 -
Flags: feedback?(aki) → feedback+
Assignee | ||
Comment 3•12 years ago
|
||
I've taken aki's suggestions.
Attachment #699795 -
Flags: review?(jhopkins)
Attachment #699795 -
Flags: feedback?(aki)
Comment 4•12 years ago
|
||
Comment on attachment 699457 [details] [diff] [review]
remove hardcoded value
Patch is failing unit tests. I will attach the unit test log.
Attachment #699457 -
Flags: review?(jhopkins) → review-
Comment 5•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #699457 -
Attachment is obsolete: true
Assignee | ||
Updated•12 years ago
|
Attachment #699795 -
Flags: review?(jhopkins)
Attachment #699795 -
Flags: feedback?(aki)
Assignee | ||
Comment 6•12 years ago
|
||
This passes the test.
I will file a bug for the remaining tests.
Attachment #699795 -
Attachment is obsolete: true
Attachment #700573 -
Flags: review?(jhopkins)
Assignee | ||
Updated•12 years ago
|
Priority: P1 → P2
Comment 7•12 years ago
|
||
Comment on attachment 700573 [details] [diff] [review]
remove mozpool-api-url hardcoded value
r+ with one change - move just the assertion of mozpool_api_url to _after_ the |self.mozpool_api_url=| line, as discussed in IRC:
+ def query_mozpool_handler(self, device=None, mozpool_api_url=None):
if not self.mozpool_handler:
- if 'mozpool_api_url' not in self.config:
- self.fatal("Can't create mozpool handler without mozpool_api_url set!")
+ assert device != None or mozpool_api_url != None, \
+ "query_mozpool_handler() requires either a device or mozpool_api_url!"
+ self.mozpool_api_url = self.determine_mozpool_host(device) if device else mozpool_api_url
Attachment #700573 -
Flags: review?(jhopkins) → review+
Assignee | ||
Comment 8•12 years ago
|
||
Comment on attachment 700573 [details] [diff] [review]
remove mozpool-api-url hardcoded value
ff4a8964387d
Attachment #700573 -
Flags: checked-in+
Assignee | ||
Updated•12 years ago
|
Priority: P2 → P3
Assignee | ||
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
Updated•7 years ago
|
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Updated•5 years ago
|
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•