system-image cannot recover from a partial download without rebooting

Bug #1233521 reported by Steve Langasek
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu system image
Fix Released
Critical
Barry Warsaw
system-image (Ubuntu)
Fix Released
High
Unassigned
Saucy
Fix Released
High
Unassigned

Bug Description

In response to bug #1228254, u-d-m now throws a dbus error if it's asked in unconfined mode for a file that already exists. This combines with system-image behavior to make it impossible to recover from a failed download without rebooting the device. I think system-image needs to check for already-downloaded files on the system in the expected path, and either remove them unconditionally for redownload, or spot-verify their sums and omit any correctly-downloaded files from the request to u-d-m.

Relatedly, system-image needs to stop using a well-known path under /tmp for these files. This needs to move to a root-only directory instead. (While s-i could use proper tmpdir handling to create a private directory under /tmp without risking a DoS or symlink attack, this would have undesirable semantics wrt retries, because subsequent s-i processes would necessarily be asking u-d-m to download files to different directories each time.) From an FHS standpoint, I think the correct location for these downloads is /var/cache/system-image. That would need to be coordinated with lxc-android-config to get this directory made writable. Alternatively, the files should just be downloaded directly to /android/cache/recovery (under an appropriate tmp/"in-progress" directory name), which would save having to do a cross-filesystem copy after download.

Steve Langasek (vorlon)
Changed in system-image (Ubuntu):
importance: Undecided → High
status: New → Triaged
Changed in system-image (Ubuntu Saucy):
assignee: nobody → Barry Warsaw (barry)
Barry Warsaw (barry)
tags: added: client
Revision history for this message
Sebastien Bacher (seb128) wrote :

I just reported bug #1234703, which is about "checking for new updates makes the update panel non functional until reboot", it seems somewhat similar but I'm not sure if that's a duplicate

Barry Warsaw (barry)
no longer affects: system-image (Ubuntu Saucy)
no longer affects: system-image (Ubuntu)
Barry Warsaw (barry)
Changed in ubuntu-system-image:
status: New → Triaged
importance: Undecided → High
Steve Langasek (vorlon)
Changed in system-image (Ubuntu):
status: New → Triaged
importance: Undecided → High
Gema Gomez (gema)
tags: added: avengers qa-touch rls-s-incoming
Revision history for this message
Barry Warsaw (barry) wrote :

When LP: #1238102 is fixed, this one will be fixed for free.

Changed in ubuntu-system-image:
milestone: none → 1.9
assignee: nobody → Barry Warsaw (barry)
importance: High → Critical
status: Triaged → In Progress
Barry Warsaw (barry)
Changed in ubuntu-system-image:
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in ubuntu-system-image:
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-image - 1.9.1-0ubuntu1

---------------
system-image (1.9.1-0ubuntu1) saucy; urgency=low

  * New upstream release:
    - LP: #1240105 - Further refinement of permission checking/fixing.
    - LP: #1240106 - Work around some failures in DEP 8 tests.
  * d/control: Point Vcs-Bzr and Vcs-Browser to the packaging branch.
  * d/system-image-common.dirs: Add /var/log/system-image.
  * d/rules, d/tests/unittests: Set $SYSTEMIMAGE_REACTOR_TIMEOUT to 1200
    seconds to avoid random timeout errors.
  * d/system-image-common.postinst, system-image-common.postrm: debhelper
    scripts for ensuring the proper permissions and for purging directories.
 -- Barry Warsaw <email address hidden> Tue, 15 Oct 2013 11:23:54 -0400

Changed in system-image (Ubuntu Saucy):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.