"snapcraft cleanbuild" requires "connectivity"

Bug #1894656 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
Won't Fix
Medium
Sergio Schvezov

Bug Description

To build a snap reliably and reproducibly, I've adjusted snapcraft.yaml so that it doesn't require an Internet connection to random third parties, and am behind a firewall that enforces this.

Recently this started failing.

It appears that you've been requiring a "connectivity check" for a while that was to start.ubuntu.com (which happens to be allowed in my case), but this has recently changed to connectivity-check.ubuntu.com (which is not allowed in my case).

It doesn't make sense to ask for the firewall to be permitted to access connectivity-check.ubuntu.com. This machine has never had general access to the Internet, so making that change would produce a false result anyway.

Expected results: "snapcraft cleanbuild" is capable of building without Internet access when such Internet access isn't required by the build.

Actual results:

$ snapcraft cleanbuild
Creating snapcraft-whorishly-unaging-linwood
Starting snapcraft-whorishly-unaging-linwood
Waiting for a network connection...
Failed to open 'http://connectivity-check.ubuntu.com/': timed out
Failed to open 'http://connectivity-check.ubuntu.com/': timed out
Failed to open 'http://connectivity-check.ubuntu.com/': timed out
Failed to open 'http://connectivity-check.ubuntu.com/': timed out
Failed to open 'http://connectivity-check.ubuntu.com/': timed out
Stopping local:snapcraft-whorishly-unaging-linwood
Sorry, an error occurred in Snapcraft:
Failed to get a network connection in the container: could not successfully ping 'start.ubuntu.com'.
If using a proxy, check its configuration. Refer to the documentation at https://linuxcontainers.org/lxd/getting-started-cli.

Note that the error message is also wrong now, referring to start.ubuntu.com when snapcraft is actually trying to reach connectivity-check.ubuntu.com. There is also no proxy configuration instructions at the linked linuxcontainers.org page.

Sample snapcraft.yaml that triggers this:

name: test-snap
version: '1'
summary: Test snap summary
description: |
  Test snap description

grade: devel
confinement: classic

parts:
  part1:
    plugin: nil
    source: .

Note that there is no base.

Revision history for this message
Robie Basak (racb) wrote :

Version:

installed: 4.2.post13+gitab04b216 (5447) 70MB classic

Revision history for this message
Robie Basak (racb) wrote :

Workaround: "sudo snap refresh --channel stable/4.1" reverts to the old start.ubuntu.com behaviour, for which my "connectivity check" happens to succeed.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

4.3 moved back to the previous endpoint but I will leave this task open to get rid of that dependency completely

Changed in snapcraft:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Sergio Schvezov (sergiusens)
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

cleanbuild is no longer supported, all builds by default now transparently "cleanbuild"

Changed in snapcraft:
status: Triaged → Won't Fix
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.