More details should be provided than v2/snaps/refresh: context canceled

Bug #2104066 reported by Nobuto Murata
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snap Store Server
New
Undecided
Unassigned
snapd
Fix Committed
Undecided
Unassigned

Bug Description

I started to see the following error frequently in Canonical's CI infrastructure. However, it's hard to tell what's wrong from the output. It would be nice if more use facing message is surfaced. e.g. if it's about rate limiting, getting something like Too Many Requests message would be helpful.

$ sudo snap install openstack --channel 2024.1/edge
error: cannot install "openstack": Post
       "https://api.snapcraft.io/v2/snaps/refresh": context canceled
Command exited with non-zero status 1

Revision history for this message
Ernest Lotter (ernestl) wrote :

Snapd fix: https://bugs.launchpad.net/snapstore-server/+bug/2104066
This fix will be part of snapd 2.69.1 , the release process started already on 21 April, this fix will be cherry picked.

Changed in snapd:
milestone: none → 2.69.1
Revision history for this message
Peter Jose De Sousa (pjds) wrote :

Seeing this now with a proxy based sunbeam deployment. If the connection is dropped during the juju-db snap this will result in the juju controller failing to bootstrap.

Fetching Juju agent version 3.6.5 for amd64
Attempt 1 to download agent binaries from 'https://streams.canonical.com/juju/tools/agent/3.6.5/juju-3.6.5-linux-amd64.tgz'...\n
Agent binaries downloaded successfully.
14cbb3af27fc41910e0d0d04454a37a4c6526b6ff86016138dba1cc79c6e3b67 /var/lib/juju/tools/3.6.5-ubuntu-amd64/tools.tar.gz
Installing Juju machine agent
2025-05-20 21:13:10 INFO juju.cmd supercommand.go:56 running jujud [3.6.5 33b026f4ab2a4fe371764b9c41993d3e1e90ddef gc go1.24.1]
2025-05-20 21:13:11 INFO juju.agent identity.go:22 writing system identity file
2025-05-20 21:13:11 INFO juju.mongo mongo.go:242 Ensuring mongo server is running; data directory /var/snap/juju-db/common; port 37017
2025-05-20 21:13:11 INFO juju.packaging manager.go:81 installing "juju-db" via "snap"
2025-05-20 21:13:11 INFO juju.packaging.manager run.go:88 Running: snap install --channel 4.4/stable juju-db
2025-05-20 21:13:11 ERROR juju.packaging.manager run.go:145 packaging command failed: exit status 1; cmd: "snap install --channel 4.4/stable juju-db"; output: error: cannot install "juju-db": Post
       "https://api.snapcraft.io/v2/snaps/refresh": context canceled

ERROR failed to start mongo: cannot install mongod: installing package "juju-db" via "snap": packaging command failed: exit status 1
ERROR failed to bootstrap model: subprocess encountered error code 1

Error: Command '['/snap/openstack/727/juju/bin/juju', 'bootstrap', '--bootstrap-constraints', 'tags=juju-controller', '--bootstrap-base', 'ubuntu@24.04', '--controller-charm-path', '/home/ubuntu/snap/openstack/common/downloads/juju-controller.charm', '--to', 'system-id=4k'mycloud-controller', '--config', '/tmp/tmpol5u7dz1']' returned non-zero exit status 1.

Revision history for this message
Nobuto Murata (nobuto) wrote :
Ernest Lotter (ernestl)
Changed in snapd:
milestone: 2.69.1 → 2.70
status: New → Fix Committed
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.