[Bug 1771914] Re: release-upgrade-motd can't update message via apt proxy

Kaneg Gong gzkaneg at gmail.com
Fri Jul 6 02:26:21 UTC 2018


I have tested the proposed packages as below:
  ii  python3-update-manager            1:18.04.11.3                       all          python 3.x module for update-manager
  ii  update-manager-core               1:18.04.11.3                       all          manage release upgrades


Before applying the new packages, the below command reports:

$ /usr/lib/ubuntu-release-upgrader/check-new-release
Checking for a new Ubuntu release
Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings
No new release found.

After applying the patch, it says:

$ /usr/lib/ubuntu-release-upgrader/check-new-release
Checking for a new Ubuntu release
No new release found.

There is no error message anymore. It seems the patch works.


** Tags removed: verification-needed-bionic
** Tags added: verification-done-bionic

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

Title:
  release-upgrade-motd can't update message via apt proxy

Status in update-manager package in Ubuntu:
  Fix Released
Status in update-manager source package in Bionic:
  Fix Committed

Bug description:
  [Impact]
  apt proxy settings are not applied to https urls, and thus the release-upgrade-motd script fails, and upgrades from bionic to new versions won't be detected either, if you need to use a proxy. This is a regression from the 1:18.04.6 upload which switched changelogs.ubuntu.com from http to https.

  [Test case]
  Set acquire::http::proxy to a non-existing host, e.g. http://invalid.invalid/, and check that the tool fails.

  Do the same with acquire::https::proxy.

  (Kind of a reverse check, since I don't have a proxy setup to test
  against. If there's an actual proxy and otherwise, no internet, it can
  be verified by setting the actual proxy and checking that it works
  with it).

  [Regression potential]
  The fix changes the API of init_proxy() in UpdateManager/Core/utils.py to make it return a dict with 'http' and 'https' members rather than just a string. It seems the return value is only used by the test case, though, so that should be fine.

  Apart from that, it also allows https proxies now, since we're doing
  https anyway, which means that a proxy setting ignored before now is
  not. The same applies to the the new proxy variables used - they were
  not used before, so things might fail that used to work - like you
  specify an invalid https proxy but don't actually need one. Low risk,
  though.

  [Original bug report]
  I have configured apt proxy in apt.conf.d and apt update and apt install can work correctly. However, when I logged in system everyday, in the login message, it says:

  Failed to connect to https://changelogs.ubuntu.com/meta-release-lts.
  Check your Internet connection or proxy settings

  After further investigation, I found the the issue is caused in
  package python3-update-manager:

  python3-update-manager: /usr/lib/python3/dist-
  packages/UpdateManager/Core/utils.py

  In the init_proxy function of the python script, it only set a http
  proxy by below code:

  proxy_support = ProxyHandler({"http": proxy})

  after changing the line to add https proxy, it can work:

  proxy_support = ProxyHandler({"http": proxy, "https":proxy})

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1771914/+subscriptions



More information about the foundations-bugs mailing list