Utilize per_device actions in fabric for foopies and add a what_master action

RESOLVED FIXED

Status

Release Engineering
General Automation
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Callek, Assigned: Callek)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
This rounds out what I was working on before the holiday.

r? to coop incase he gets to it before Armen is back from holiday.
(Assignee)

Updated

5 years ago
Duplicate of this bug: 825141
(Assignee)

Comment 2

5 years ago
Comment on attachment 696221 [details] [diff] [review]
[tools] v1

grr bmo did that "lets create two bugs instead of one, and not set the reviews like you wanted, *AND* only attach this to one bug while we're at it" again.

Sadly I *never* notice when this seems to happen, so STR are not handy
Attachment #696221 - Flags: review?(coop)
Attachment #696221 - Flags: review?(armenzg)
Comment on attachment 696221 [details] [diff] [review]
[tools] v1

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

I looks good but I have this question below.

::: buildfarm/maintenance/manage_foopies.py
@@ +92,5 @@
> +    except:
> +        import traceback
> +        print "Failed to run", action, "on", foopy_dict['host']
> +        print traceback.format_exc()
> +        return False

What is the reason that the two except sections are repeated inside and outside of the try block?

Comment 4

5 years ago
Comment on attachment 696221 [details] [diff] [review]
[tools] v1

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

I'll echo Armen's question about the duplicated exception handling: can we consolidate that?

Also, I'm not really familiar with the "with x():" constructions...is that a standard way to work with the fabric commands?
Attachment #696221 - Flags: review?(coop) → review+
Comment on attachment 696221 [details] [diff] [review]
[tools] v1

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

I looks good but I have this question below.

::: buildfarm/maintenance/manage_foopies.py
@@ +92,5 @@
> +    except:
> +        import traceback
> +        print "Failed to run", action, "on", foopy_dict['host']
> +        print traceback.format_exc()
> +        return False

What is the reason that the two except sections are repeated inside and outside of the try block?
Attachment #696221 - Flags: review?(armenzg) → review+
(Assignee)

Comment 6

5 years ago
Comment on attachment 696221 [details] [diff] [review]
[tools] v1

So I initially had that inner try block so that if a single device action failed we'd still try the action for the other devices on the same foopy. However on re-reading the code I saw that it currently returns false in those except cases anyway, short-circuting the for loop.

Since I've used that code in my production for a bit and saw no issues, I decided to rip out inner try block for now and land. the out was my understanding of how that with settings() worked for the host, if we can't connect to host.

and coop, yea fabric is routinely done with, context managers like this.
Attachment #696221 - Flags: checked-in+
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 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.