Closed Bug 811116 Opened 12 years ago Closed 12 years ago

Deploy updated android and maintenance BMM scripts

Categories

(Infrastructure & Operations :: RelOps: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: dustin)

Details

Attachments

(1 file, 1 obsolete file)

Finally, I integrated the device-side shell scripts with the server-side Lifeguard state machine.  These have successfully imaged a panda (well, one out of three, but they'll try about 200 times).
Attached patch bug811116.patch (obsolete) — Splinter Review
Assignee: server-ops-releng → dustin
Attachment #680816 - Flags: review?(jwatkins)
Comment on attachment 680816 [details] [diff] [review]
bug811116.patch

>+
>+WGET_OUTPUT=$(wget -nv --directory-prefix=/opt/artifacts/ http://${IMAGING_SERVER}/artifacts/panda-jb-gcc47-tilt-stable-blob-12.08-release/system.tar.bz2 2>&1)
>+log "${WGET_OUTPUT}"
>+WGET_OUTPUT=$(wget -nv --directory-prefix=/opt/artifacts/ http://${IMAGING_SERVER}/artifacts/panda-jb-gcc47-tilt-stable-blob-12.08-release/userdata.tar.bz2 2>&1)
>+log "${WGET_OUTPUT}"
>+WGET_OUTPUT=$(wget -nv --directory-prefix=/opt/artifacts/ http://${IMAGING_SERVER}/artifacts/panda-jb-gcc47-tilt-stable-blob-12.08-release/boot.tar.bz2  2>&1)
>+log "${WGET_OUTPUT}"
>+

These artifacts are not the current ones for production and should only be used for testing


>+log "Extracting artifacts"
>+tar -jxf /opt/artifacts/boot.tar.bz2 -C /opt/mnt/boot --strip=1 boot/uImage boot/uInitrd

fat doesn't like it when tar tries to set owner.  it may work but it will exit tar with errors.  add the --no-same-owner flag
eg.
tar -jx --no-same-owner -f /opt/artifacts/boot.tar.bz2 -C /opt/mnt/boot --strip=1 boot/uImage boot/uInitrd


>+log "Unmounting partitions"
>+umount /opt/mnt/boot /opt/mnt/system /opt/mnt/userdata

call sync before umounting here otherwise umount can sometimes fail


>+# signal an event to our lifeguard server, retrying as necessary
>+lifeguard_event() {
>+    local retry
>+    local event="$1"
>+    local url="http://${IMAGING_SERVER}/api/device/${HOSTNAME}/event/${event}/"
>+
>+    # retry forever, assuming lifeguard will kill us if this doesn't work
>+    while true; do
>+        log "Submitting lifeguard event at $url"
>+        wget -O/dev/null $url && return 0
>+        sleep 60
>+    done
>+}

According to the API this is call should be HTTP POST
Use --post-data='' with wget or correct API docs



>+# get and source utils
>+wget --post-data='' http://<%= @ipaddress %>/scripts/liveutil.sh || exit 1
>+source liveutil.sh

no need for HTTP POST here
Attachment #680816 - Flags: review?(jwatkins) → review-
(In reply to Jake Watkins [:dividehex] from comment #2)
> According to the API this is call should be HTTP POST
> Use --post-data='' with wget or correct API docs

Actually, GET is legal:
  http://hg.mozilla.org/build/bmm/file/tip/API.txt#l97

The rest I'll fix.  Thanks!
This seems to work as far as puppet is concerned, but the pandas aren't behaving well enough for me to actually test it.
Attachment #680816 - Attachment is obsolete: true
Attachment #681047 - Flags: review?(jwatkins)
I was being stupid.  This basically works, so review away.
Comment on attachment 681047 [details] [diff] [review]
bug811116-r2.patch

lgtm
Attachment #681047 - Flags: review?(jwatkins) → review+
landed
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Server Operations: RelEng → RelOps
Product: mozilla.org → Infrastructure & Operations
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: