[Bug 1831933] Re: do-release-upgrade tries to install snaps even if it knows it can't reach the snapstore

Łukasz Zemczak 1831933 at bugs.launchpad.net
Mon Jun 24 14:34:19 UTC 2019


Hello Dan, or anyone else affected,

Accepted ubuntu-release-upgrader into bionic-proposed. The package will
build now and be available at https://launchpad.net/ubuntu/+source
/ubuntu-release-upgrader/1:18.04.34 in a few hours, and then in the
-proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-bionic to verification-done-bionic. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-bionic. In either case, without details of
your testing we will not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: ubuntu-release-upgrader (Ubuntu Bionic)
       Status: In Progress => Fix Committed

** Tags added: verification-needed-bionic

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

Title:
  do-release-upgrade tries to install snaps even if it knows it can't
  reach the snapstore

Status in ubuntu-release-upgrader package in Ubuntu:
  Fix Released
Status in ubuntu-release-upgrader source package in Bionic:
  Fix Committed
Status in ubuntu-release-upgrader source package in Cosmic:
  Fix Committed
Status in ubuntu-release-upgrader source package in Disco:
  Fix Committed
Status in ubuntu-release-upgrader source package in Eoan:
  Fix Released

Bug description:
  [impact]

  do-release-upgrade has a quirk that, if ubuntu-desktop and snapd are
  installed, tries to replace installed debs with snaps.  To do this, it
  first, early in the upgrade process, checks the connectivity to the
  snap store.  If that fails, it notifies the user and asks if upgrade
  should be aborted.  If the user says no (or if the user is upgrading
  in non-interactive mode) then upgrade continues.  At the end, the
  upgrade tries to replace some installed debs with snaps, even if it
  already knows that it can't connect to the snap store, from the
  earlier connectivity check.

  This results in a minor annoyance, of extra time trying to install
  snaps when there is no possibility of it working, as well as 'error'
  messages printed:

  Installing snap gnome-3-26-1604
  error: cannot install "gnome-3-26-1604": Post
  https://api.snapcraft.io/v2/snaps/refresh: dial tcp 91.189.92.38:443:
  connect: connection refused

  Installing snap gtk-common-themes
  error: cannot install "gtk-common-themes": Post
  https://api.snapcraft.io/v2/snaps/refresh: dial tcp 91.189.92.38:443:
  connect: connection refused

  Installing snap gnome-calculator
  error: cannot install "gnome-calculator": Post
  https://api.snapcraft.io/v2/snaps/refresh: dial tcp 91.189.92.19:443:
  connect: connection refused

  Installing snap gnome-characters
  error: cannot install "gnome-characters": Post
  https://api.snapcraft.io/v2/snaps/refresh: dial tcp 91.189.92.38:443:
  connect: connection refused

  Installing snap gnome-logs
  error: cannot install "gnome-logs": Post
  https://api.snapcraft.io/v2/snaps/refresh: dial tcp 91.189.92.19:443:
  connect: connection refused

  Installing snap gnome-system-monitor
  error: cannot install "gnome-system-monitor": Post
  https://api.snapcraft.io/v2/snaps/refresh: dial tcp 91.189.92.38:443:
  connect: connection refused

  [test case]

  install a xenial system in a VM and block (only) access to the snap
  store, e.g:

  $ virsh nwfilter-dumpxml block-snapstore
  <filter name='block-snapstore' chain='root'>
    <uuid>36dbe3e7-4085-4da8-bc9b-f56f2029431a</uuid>
    <rule action='reject' direction='inout' priority='0'>
      <ip dstipaddr='91.189.92.19'/>
    </rule>
    <rule action='reject' direction='inout' priority='0'>
      <ip dstipaddr='91.189.92.38'/>
    </rule>
    <rule action='reject' direction='inout' priority='0'>
      <ip dstipaddr='91.189.92.41'/>
    </rule>
    <rule action='reject' direction='inout' priority='0'>
      <ip dstipaddr='91.189.92.20'/>
    </rule>
    <rule action='reject' direction='inout' priority='0'>
      <ip srcipaddr='91.189.92.19'/>
    </rule>
    <rule action='reject' direction='inout' priority='0'>
      <ip srcipaddr='91.189.92.38'/>
    </rule>
    <rule action='reject' direction='inout' priority='0'>
      <ip srcipaddr='91.189.92.41'/>
    </rule>
    <rule action='reject' direction='inout' priority='0'>
      <ip srcipaddr='91.189.92.20'/>
    </rule>
  </filter>

  and add this inside a VM's <interface> xml:
        <filterref filter='block-snapstore'/>

  Then in the VM, make sure to install both ubuntu-desktop and snapd,
  and then run do-release-upgrade.  During the upgrade it should prompt
  due to the failed connectivity to the snapstore; tell it to continue
  the upgrade.  At the end, the above 'error' messages should print out,
  when the snaps are attempted to be installed.

  [regression potential]

  any regression would likely involve incorrectly not installing snaps.

  [other info]

  note that u-r-u usually contains extra changes not listed in the
  changelog, as before uploading the 'pre-build.sh' script should be
  run, which makes various changes and runs tests on the package.
  Specifically for these uploads, these files are changed in the upload
  but not mentioned in the changelog are:

  data/mirrors.cfg
  DistUpgrade/apt_btrfs_snapshot.py
  DistUpgrade/DistUpgradeVersion.py
  tests/data-sources-list-test/sources.list

  all these changes are expected from the current operation of the pre-build.sh script and existing policy is the changes do not need to be mentioned in the changelog, per bdmurray from irc:
  https://irclogs.ubuntu.com/2019/06/19/%23ubuntu-release.txt

  [17:06] <ddstreet> bdmurray for lp #1831933 would you prefer if i attach debdiffs (or open MPs) or just upload to the sru queues myself?
  [17:06] <ubot5> Launchpad bug 1831933 in ubuntu-release-upgrader (Ubuntu Disco) "do-release-upgrade tries to install snaps even if it knows it can't reach the snapstore" [Undecided,New] https://launchpad.net/bugs/1831933
  [17:15] <bdmurray> ddstreet: uploading to the queues themselves is fine with me but you'll also want to run pre-build.sh so mirrors.cfg, DistUpgradeVersion.py, and the demotions files get updated. Its not necessary to document those changes in the changelog though.
  [17:18] <ddstreet> ack, thanks will do

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1831933/+subscriptions



More information about the foundations-bugs mailing list