Closed Bug 753260 Opened 12 years ago Closed 12 years ago

checkStalled/stopStalled not cleaning up everything it should

Categories

(Release Engineering :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Callek, Assigned: Callek)

References

Details

Attachments

(3 files, 1 obsolete file)

So, the sut_tools checkStalled/stopStalled doesn't clean everything it should.

It currently only notices bcontroller.py lines where we use the SUT IP itself. Also the functions require a SUT_NAME in all cases, and in cleanup we pass an IP instead when run from buildbot.

I'll address both issues in this bug.
Attached patch [tools] v1Splinter Review
Attachment #622316 - Flags: review?(bear)
Attached patch [buildbotcustom] use tegra name (obsolete) — Splinter Review
So, since we don't have sut_name available as a build property I decided to cheat and do slavename since we currently identify it as tegra-XXX to match.

I can instead, modify the job to set a property, or modify cleanup to take no args and auto-use os.env['SUT_NAME']. If you'd like.
Attachment #622318 - Flags: review?(bear)
Attachment #622316 - Flags: review?(bear) → review+
Comment on attachment 622318 [details] [diff] [review]
[buildbotcustom] use tegra name

this information is found in two environment variables set when calling each buildbot:  SUT_NAME and SUT_IP

we may not even need to set this property
Attachment #622318 - Flags: review?(bear) → review-
This stops us from passing anything to cleanup.py, will require a change in tools cleanup.py though.

Deployed the tools repo change won't require tegra downtime, so not a huge rush, I will get it pushed/reviewed before I check this in though.
Attachment #622318 - Attachment is obsolete: true
Attachment #622420 - Flags: review?(bear)
Comment on attachment 622420 [details] [diff] [review]
[buildbotcustom] v2 - Pass nothing to cleanup.py

doesn't stop us from passing something in the future, just wanted to make all of the sut helper scripts use the same method for knowing what tegra to use.

thanks
Attachment #622420 - Flags: review?(bear) → review+
Comment on attachment 622316 [details] [diff] [review]
[tools] v1

this one landed and deployed wednesday
Attachment #622316 - Flags: checked-in+
Attachment #622316 - Attachment is patch: true
I decided to also do the updateSUT.py adjustments while I was here, since it just made sense to do them both. contexually this patch will conflict with the sys.stdout.flush() patch, but I'll properly rebase when that lands before I land this.

It has been tested in staging with various forms of calling
Attachment #623212 - Flags: review?(bear)
Attachment #623212 - Flags: feedback?(armenzg)
Attachment #623212 - Flags: review?(bear) → review+
Comment on attachment 623212 [details] [diff] [review]
[tools] Part 2 -- make <sut_name> arg optional

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

Thanks a lot for making this saner.

::: sut_tools/updateSUT.py
@@ +14,5 @@
>  target_version = "1.07"
>  apkfilename = "sutAgentAndroid.apk"
> +tegra_name = os.getenv('SUT_NAME')
> +apkFoopyDirPattern =  "/builds/%(tegra_name)s"
> +apkFoopyDir = apkFoopyDirPattern % {'tegra_name': tegra_name}

It's weird to have these 3 variables under #Constants when in main can be modified but I guess it is like this because of the case when we import updateSUT.py rather than calling it directly.

@@ +77,5 @@
>          print "INFO: updateSUT.py: We're now running %s" % ver
>          return RETCODE_SUCCESS
>  
> +def main(device):
> +    dm = connect(device)

I would personally call it "tegra_name" instead of "device" since "device" sounds more generic.
Attachment #623212 - Flags: feedback?(armenzg) → feedback+
Comment on attachment 623212 [details] [diff] [review]
[tools] Part 2 -- make <sut_name> arg optional

Armen, fyi I'm removing your second hunk in http://hg.mozilla.org/build/tools/rev/16fc4f354b44

So that things work "right" here.
Comment on attachment 623212 [details] [diff] [review]
[tools] Part 2 -- make <sut_name> arg optional

http://hg.mozilla.org/build/tools/rev/c5e085fcde40
Attachment #623212 - Flags: checked-in+
Comment on attachment 622420 [details] [diff] [review]
[buildbotcustom] v2 - Pass nothing to cleanup.py

argh this dropped off my list of checkins last week, this bug can close when it gets merged/pushed to prod.

http://hg.mozilla.org/build/buildbotcustom/rev/75dbae83f458
Attachment #622420 - Flags: checked-in+
This went went into production today.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: