_NoUpdate sends buggy UpdateFailed

Bug #1215946 reported by Sebastien Bacher
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ubuntu system image
Fix Released
High
Barry Warsaw
ubuntu-system-settings
Fix Released
Low
Didier Roche-Tolomelli
system-image (Ubuntu)
Fix Released
Undecided
Unassigned
ubuntu-system-settings (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Using the current version of lp:~barry/ubuntu-system-image/lp1212781, when calling CheckForUpdate() on the mock, there is an UpdateFailed returned before UpdateAvailableStatus, that confuses the system settings client

Tags: client
Revision history for this message
Sebastien Bacher (seb128) wrote :

(that's using "system-image-dbus --testing=no-update")

Barry Warsaw (barry)
tags: added: client
Revision history for this message
Barry Warsaw (barry) wrote :

Hmm, I can't reproduce this with r156 lp:~barry/ubuntu-system-image/lp1212781

I made a very minor fix to the no-update mock, but that shouldn't have affected anything. See also test_dbus.py TestDBusMockNoUpdate.test_lp_1215946()

Changed in ubuntu-system-image:
status: New → Incomplete
assignee: nobody → Barry Warsaw (barry)
summary: - CheckForUpdate's mock sends buggy UpdateFailed
+ _NoUpdate mock sends buggy UpdateFailed
Revision history for this message
Sebastien Bacher (seb128) wrote : Re: _NoUpdate mock sends buggy UpdateFailed

no, that's still happening, click the "retry" button in system-settings I get that in dbus-monitor

"signal sender=:1.393 -> dest=(null destination) serial=23 path=/Service; interface=com.canonical.SystemImage; member=UpdateFailed
   int32 5
   string "Canceled"
signal sender=:1.393 -> dest=(null destination) serial=26 path=/Service; interface=com.canonical.SystemImage; member=UpdateAvailableStatus
   boolean false
   boolean false
   string ""
   int32 0
   string "1983-09-13T12:13:14"
   string ""
signal sender=:1.5 -> dest=(null destination) serial=15732 path=/org/freedesktop/NetworkManager/AccessPoint/0; interface=org.freedesktop.NetworkManager.AccessPoint; member=PropertiesChanged
   array [
      dict entry(
         string "Strength"
         variant byte 58
      )
   ]

"

Revision history for this message
Sebastien Bacher (seb128) wrote :

(ignore the nm one, copied a bit too much)

Revision history for this message
Barry Warsaw (barry) wrote :

Is it possible that the u/i is calling something other than CheckForUpdate() when using the --testing=no-update? That's the only method (and UpdateAvailableStatus is the only signal) that's supported by that testing mode. It will respond to other methods, but you should not count on it. This is true of all the testing modes; they only guarantee the behavior of the use cases defined on the wiki page: https://wiki.ubuntu.com/ImageBasedUpgrades/Client

If that's not the case, please paste the entire dbus dialog with the --testing=no-update server. I can't possibly see any other way this could be happening.

Revision history for this message
Barry Warsaw (barry) wrote :

You're getting a residual UpdateFailed probably because you called CancelUpdate.

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in ubuntu-system-settings:
importance: Undecided → Low
status: New → Confirmed
assignee: nobody → Didier Roche (didrocks)
summary: - _NoUpdate mock sends buggy UpdateFailed
+ _NoUpdate sends buggy UpdateFailed
Revision history for this message
Sebastien Bacher (seb128) wrote :

(that's not specific to the mock, updating the title)

the duplicate description states:

"System settings -> About phone -> Check for updates.
If you click the "Retry" button you briefly get a screen blink up which looks like it's about to start downloading, but then goes back to the previous screen with the retry button. The dialog has "download failed: cancelled" in it which is a bit alarming (and erroneous)

It would be a smoother experience if that dialog only appeared if there was actually an update to download.

See screenshot."

Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Ok, fixed.

@Barry: I still think that CancelUpdate shouldn't send an UpdateFail signal if there is no transaction in progress though.

Changed in ubuntu-system-settings:
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:ubuntu-system-settings at revision 370, scheduled for release in ubuntu-system-settings, milestone Unknown

Changed in ubuntu-system-settings:
status: In Progress → Fix Committed
Revision history for this message
Barry Warsaw (barry) wrote :

Re-opened due to comment #9

Changed in ubuntu-system-image:
status: Incomplete → New
Changed in ubuntu-system-settings (Ubuntu):
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-system-settings - 0.1+13.10.20130925.1-0ubuntu1

---------------
ubuntu-system-settings (0.1+13.10.20130925.1-0ubuntu1) saucy; urgency=low

  [ Ted Gould ]
  * Ask Upstart App Launch to make settings single instance. (LP:
    #1227111)

  [ Iain Lane ]
  * Reduce the height of the time/date pickers as they weren't fitting
    on mobile devices. (LP: #1228409). (LP: #1228409)
  * Use QMenuModel to hook up toggles for bluetooth and gps/location
    enabled/disabled in the battery and security-privacy panels.
    Location is hidden because the backend doesn't work yet.

  [ Lars Uebernickel ]
  * Fix the brightness slider in the battery panel.

  [ Charles Kerr ]
  * Add the bluetooth plugin.

  [ Ken VanDine ]
  * background: Use singleSelect on the transfer request and specify a
    persistent Content::Store for the transfer .

  [ Didier Roche ]
  * Only Cancel if there is anything to cancel. (LP: #1215946)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 378
 -- Ubuntu daily release <email address hidden> Wed, 25 Sep 2013 11:12:19 +0000

Changed in ubuntu-system-settings (Ubuntu):
status: Fix Committed → Fix Released
Changed in ubuntu-system-settings:
status: Fix Committed → Fix Released
Barry Warsaw (barry)
Changed in ubuntu-system-image:
status: New → In Progress
importance: Undecided → High
milestone: none → 1.8
Revision history for this message
Barry Warsaw (barry) wrote :

Fixed in s-i 1.8.

 * Only send the `UpdateFailed` signal in response to a `CancelUpdate()` call
   if a download is already in progress. No signal is sent if there's no
   download in progress. Getting the files to determine whether an update is
   available or not does not count as a "download in progress". (LP: #1215946)

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
Didier Roche-Tolomelli (didrocks) wrote :

Rocking!

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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