Closed Bug 1063701 Opened 12 years ago Closed 11 years ago

Test Fxos OTA updates - metabug

Categories

(Testing :: General, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: fabrice, Assigned: rwood)

References

Details

Attachments

(2 files)

We need to test OTA updates and that the device is still usable after we build the nightly update packages, and based on that test result decide whether to push a new update to users or not.
Fabrice, if you could please provide any helpful documentation or links about the OTA updates, where they are built/located, how they are applied, etc. that would be great, thanks!
Assignee: nobody → rwood
Flags: needinfo?(fabrice)
Is this up-to-date? Also, do we use both types of updates FOTA and Gecko/Gaia? Thanks! https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_update_packages
Hi Fabrice, questions: a) The 'b2g-flame-gecko-update.mar' that I see built with the nightly flame builds is known as a 'full' mar, correct? Is this mar ever deployed as an update on it's own? If so I'm guessing that would be done so you could upgrade from ANY existing version to that full build. b) To generate a 'partial' mar i.e. an incremental update, the B2G/tools/update-tools/build-gecko-mar.py is used, passing in a full mar from build x and a full mar from build y (to create a 'partial' / incremental mar to upgrade from build x to build y). Is this correct? I'm thinking this would be a valid test process, at least to start. Am I on the right track here? 1) Download build X including full mar 2) Download build Y including full mar 3) Use build-gecko-mar.py to generate an incremental update mar from build x to build y 4) Flash flame device with build X 5) Host the resulting incremental update mar on an http server 6) Change the flame device's default update polling URL to point to my server 7) Restart b2g 8) Apply the update 9) Restart b2g 10) Verify device is alive and run a sanity test
Your process looks good to me. I'm putting ni? on Marshall since he knows the details of the various scripts better.
Flags: needinfo?(fabrice) → needinfo?(marshall)
(In reply to Robert Wood [:rwood] from comment #3) > Hi Fabrice, questions: > > a) The 'b2g-flame-gecko-update.mar' that I see built with the nightly flame > builds is known as a 'full' mar, correct? Is this mar ever deployed as an > update on it's own? If so I'm guessing that would be done so you could > upgrade from ANY existing version to that full build. I'm not intimately familiar with the MARs / existing update infrastructure, but the size of the MAR definitely suggests it is a "full" OTA build, i.e. it can be used to update from any existing version.. > > b) To generate a 'partial' mar i.e. an incremental update, the > B2G/tools/update-tools/build-gecko-mar.py is used, passing in a full mar > from build x and a full mar from build y (to create a 'partial' / > incremental mar to upgrade from build x to build y). Is this correct? Yes, see the documentation here for usage: https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS/Firefox_OS_update_packages#Generating_an_incremental_OTA_update_MAR_2 > > I'm thinking this would be a valid test process, at least to start. Am I on > the right track here? > > 1) Download build X including full mar > 2) Download build Y including full mar > 3) Use build-gecko-mar.py to generate an incremental update mar from build x > to build y > 4) Flash flame device with build X > 5) Host the resulting incremental update mar on an http server > 6) Change the flame device's default update polling URL to point to my server > 7) Restart b2g > 8) Apply the update > 9) Restart b2g > 10) Verify device is alive and run a sanity test This sounds right. You might also consider running a local http server with busybox on the device..
Flags: needinfo?(marshall)
Attached file logcat.txt —
Hi Marshall, Thanks for the info. I have run into a roadblock and need your help please. 1) I used the build-gecko-mar.py tool and created an incremental gecko/gaia update mar (using nightly build-x full mar, and nighlty build-y full mar) 2) I used the build-update-xml.py tool and created a corresponding update.xml file 3) I flashed build-x onto my flame, and connected to wifi 4) I started my local http server at 10.242.xx.xxx:8082, and in my server folder I have the update.xml and the buildx-to-buildy.mar. If I open a browser on the flame, I can browse to that site and see the files fine. 5) I adb shelled into the device, stopped b2g, added the following pref to /data/b2g/mozilla/*.defaults/prefs.js, then restarted b2g: user_pref("app.update.url.override", "http://10.242.xx.xxx:8082/update.xml"); 6) The device does poll my server and picks up the update.xml fine 7) The device indicates two updates are availble (don't know why two, one 'stage' and one 'system update' which matches the size of my update 8) I turn off the 'stage' update checkbox, just leaving my system update, and click download 9) The update downloads from my server to the device fine, and then starts to 'uncompress'.. and then the update UI just goes back to 'two updates available'. Logcat (attached) shows "I/Gecko ( 1317): UpdatePrompt: Update error, state: failed, errorCode: 7" which is a WRITE_ERROR. Any ideas? Is this a bug?? I tried another flame and had the same result. I will attach the update.xml also.
Flags: needinfo?(marshall)
Attached file update.xml —
I'm going to see if I can use this existing code to host and deploy the update-under-test: https://github.com/mozilla-b2g/B2G/blob/master/tools/update-tools/test-update.py And then add some gaia-ui / marionette code to drive the device and run a sanity check afterwards. :jhford :mshal :garndt Where should we get the builds from?? Do we need to get mozilla-inbound CI flame builds (treeherder builds?) and then generate our own MAR files? Or do we grab the 'official' ota update MAR files from somewhere? If someone could please provide or point me to: 1) The full starting build including the corresponding complete MAR, and full build and sources.xml so I can flash the flame ('build X'); or a build with source so I can generate the full build MAR myself would work too 2) The complete MAR for the destination build ('build Y') and corresponding sources.xml; or full source for destination build then I can generate the complete MAR Then I can generate the incremental OTA MAR and go from there... -- OR -- The 'offical' OTA update MAR files that are being considered for deployment, and corresponding builds so I can flash the starting device Then I can take the automation from there....
Flags: needinfo?(mshal)
Flags: needinfo?(jhford)
Flags: needinfo?(garndt)
(In reply to Robert Wood [:rwood] from comment #8) > Where should we get the builds from?? Do we need to get mozilla-inbound CI > flame builds (treeherder builds?) and then generate our own MAR files? Or do > we grab the 'official' ota update MAR files from somewhere? Based on my reading of how partial MARs are generated for m-c, I'd guess you want to just grab the already generated MAR files from previous builds. It looks like there's different logic for nightly vs release builds, but for example a nightly partial mar would wget the previous mar from: http://stage.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/ In your case I'd guess you just want to wget the previous flame mar: http://stage.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central-flame/b2g-flame-gecko-update.mar Release partial MARs are a little different, and also generate multiple partial MARs (eg: for the last X releases). I'm a little light on the details there, though. Are you just trying to generate a partial MAR against the previous nightly in order to test the OTA partial update logic? If so I think just grabbing that URL would suffice. I could be completely wrong though, so YMMV :)
Flags: needinfo?(mshal)
(In reply to Michael Shal [:mshal] from comment #9) > (In reply to Robert Wood [:rwood] from comment #8) > > Where should we get the builds from?? Do we need to get mozilla-inbound CI > > flame builds (treeherder builds?) and then generate our own MAR files? Or do > > we grab the 'official' ota update MAR files from somewhere? > > Based on my reading of how partial MARs are generated for m-c, I'd guess you > want to just grab the already generated MAR files from previous builds. It > looks like there's different logic for nightly vs release builds, but for > example a nightly partial mar would wget the previous mar from: > > http://stage.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla- > central/ > > In your case I'd guess you just want to wget the previous flame mar: > > http://stage.mozilla.org/pub/mozilla.org/b2g/nightly/latest-mozilla-central- > flame/b2g-flame-gecko-update.mar > > Release partial MARs are a little different, and also generate multiple > partial MARs (eg: for the last X releases). I'm a little light on the > details there, though. > > Are you just trying to generate a partial MAR against the previous nightly > in order to test the OTA partial update logic? If so I think just grabbing > that URL would suffice. > > I could be completely wrong though, so YMMV :) :mshal The goal moreso is to prevent bad OTA updates from being released, than testing the update logic itself (although it will be exercised too). I wasn't sure if I should grab full MAR(s) from the nightly builds and generate the partial MAR myself, or if there was another place like a FFOS OTA update staging server where I should grab 'offical' MARs from instead. For now though yes I will generate the partial MAR myself from the previous nightly, using the path above. Thanks!
Flags: needinfo?(garndt)
Depends on: 1079262
Flags: needinfo?(marshall)
Flags: needinfo?(jhford)
1. A new Firefox OS build is available, download it. This becomes 'Build Y' and includes a full MAR. 2. Download the previous Firefox OS build. This becomes 'Build X' and includes a full MAR. 3. Flash the flame device with 'Build X'. 4. Use the B2G/tools/update-tools to generate an incremental/partial MAR from 'Build X' to 'Build Y'. 5. Use B2G/tools/update-tools/test_update.py to create the update XML; push the partial MAR and XML onto the device; push busybox onto the device; start the busybox http server; override the device's default update URL; and reset the device. 6. Run a gaiatest script to drive the device and verify that the device sees the update; apply the update; reset. 7. Run the existing gaia-ui gaiatest 'sanity' test suite to verify the update was applied and the device is still alive and functional 8. Report results to treeherder
Can you help me break this out into a metabug for the production quality work? Thanks for whipping up the prototype we have some outstanding issues to get this into a sane state.
Flags: needinfo?(rwood)
Component: Gaia::UI Tests → General
Flags: needinfo?(rwood)
Product: Firefox OS → Testing
Summary: Test OTA updates → Test Fxos OTA updates - metabug
Depends on: 1083784
Depends on: 1083787
Depends on: 1083792
Depends on: 1083796
Depends on: 1083802
Depends on: 1083811
Depends on: 1083964
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: