[Bug 1781183] Re: Skip updates on metered connections

Launchpad Bug Tracker 1781183 at bugs.launchpad.net
Thu Jul 19 09:45:34 UTC 2018


This bug was fixed in the package unattended-upgrades -
1.1ubuntu1.18.04.4

---------------
unattended-upgrades (1.1ubuntu1.18.04.4) bionic; urgency=medium

  * Redirect stderr output in upgrade-between-snapshots, too, otherwise it
    breaks the test sometimes (LP: #1781446)

unattended-upgrades (1.1ubuntu1.18.04.3) bionic; urgency=medium

  * Redirect stderr output in upgrade-all-security, otherwise it breaks the
    test (LP: #1781446)

unattended-upgrades (1.1ubuntu1.18.04.2) bionic; urgency=medium

  [ Balint Reczey ]
  * Clear cache when autoremoval is invalid for a package set marked for
    removal and clear cache after failed commits to return from a possibly
    invalid state (LP: #1779157)
  * Don't start or gracefully stop upgrade on battery (LP: #1773033)
  * Skip updates on metered connections (Closes: #855570) (LP: #1781183)
  * Add debian/tests/upgrade-all-security to install all current security updates.
    On development releases this tests latest stable, on stable releases it tests
    the release itself.
  * Speed up unattended-upgrade (Closes: #892028, #899366) (LP: #1396787)
    - Adjust candidates only for packages to be possibly installed
    - Filter out packages cheaper when they are not from allowed origins
    - Collect autoremovable packages, too, when looking for upgradable ones
    - Measure time of running with --dry-run in autopkgtests
  * Skip starting init.d script in debhelper-generated postinst part
    (LP: #1778800)

  [ Ivan Kurnosov ]
  * Fixed is_pkgname_in_blacklist to be side-effect free. (LP: #1781176)
    Otherwise 'is_pkgname_in_blacklist' mutates the 'pkgs_kept_back' and
    'unattended-upgrades' treats the package as a blacklisted candidate

 -- Balint Reczey <rbalint at ubuntu.com>  Fri, 13 Jul 2018 10:36:23 +0200

** Changed in: unattended-upgrades (Ubuntu Bionic)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to unattended-upgrades in Ubuntu.
https://bugs.launchpad.net/bugs/1781183

Title:
  Skip updates on metered connections

Status in unattended-upgrades package in Ubuntu:
  Fix Released
Status in unattended-upgrades source package in Bionic:
  Fix Released
Status in unattended-upgrades package in Debian:
  Fix Released

Bug description:
  [Impact]

   * Systems running unattended-upgrades may download updates over
  metered connections causing excessive data usage possibly making users
  being charged for the downloads.

   * Avoiding users being unexpectedly charged due to unattended-
  upgrades' activity warrants an SRU, IMO.

   * The fix uses
  NetworkMonitor.get_network_metered(NetworkMonitor.get_default()) for
  deciding if the connection is metered and skips or gracefully stops
  updates.

  [Test Case]

   * Run "unattended-upgrades --dry-run --verbose" on metered connection
     - The unfixed versions should provide the following output with default configuration:
  $ sudo unattended-upgrade --dry-run --verbose 
  Initial blacklisted packages: 
  Initial whitelisted packages: 
  Starting unattended upgrades script
  Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic
  No packages found that can be upgraded unattended and no pending auto-removals

     - The fixed versions should provide the following output with default configuration:
  Initial blacklisted packages: 
  Initial whitelisted packages: 
  Starting unattended upgrades script
  Allowed origins are: o=Ubuntu,a=bionic, o=Ubuntu,a=bionic-security, o=UbuntuESM,a=bionic
  System is on metered connection, stopping
   
    - You can check if the default route is on metered connection by running:
  nmcli -t -f GENERAL.DEVICE,GENERAL.METERED dev show `ip route list 0/0 | sed -r 's/.*dev (\S*).*/\1/g'`

    - Also run fixed u-u on not metered connection to check if it still works. U-u in lxc for example does not detect the connection to be metered.
    - Check if the following configuration can enable updates even on metered connections:
  $ cat /etc/apt/apt.conf.d/51unattended-upgrades-metered 
  Unattended-Upgrade::Skip-Updates-On-Metered-Connections "false";

  [Regression Potential]

   * Unattended-upgrades may skip updates even on not metered connections or crash, but those are not likely.
   * U-u also adds two new dependencies with the fix which can be seen as a regression, but those packages exist on most Ubuntu installations already. (The packages are: gir1.2-glib-2.0 and python3-gi)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unattended-upgrades/+bug/1781183/+subscriptions



More information about the foundations-bugs mailing list