focal: autopkgtests: d/t/mount fails with 'error: cannot download snap "dragonboard-kernel": no snap revision available as specified'

Bug #2044508 reported by Mauricio Faria de Oliveira
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-image (Ubuntu)
Invalid
Undecided
Unassigned
Focal
Fix Committed
Low
Mauricio Faria de Oliveira

Bug Description

[Impact]

The autopkgtests for Focal are failing due to d/t/mount,
because (un)specified snap revisisions aren't available:

  error: cannot download snap "dragonboard-kernel": no snap revision available as specified

  error: cannot download: no snap revision available as specified: "pc", "pc-kernel"

This isn't a big deal, but might report false-negatives
for autopkgtests regressions for dependencies (example:
SRU for, multipath-tools bug 2039719 comment #12), which
takes some time to check and handle.

The fix is to specify the snap revisions used by model
.assertion files, which match those in the last stable
ubuntu-core 16 (16.04.5) image [1], using its .manifest
files:

https://cdimage.ubuntu.com/ubuntu-core/16/stable/current/

[Test Plan]

Check that autopkgtests (specifically, d/t/mount test)
passes for ubuntu-image on Focal.

Expected:

    2185s autopkgtest [08:55:55]: @@@@@@@@@@@@@@@@@@@@ summary
    ...
    2185s mount PASS

Actual:

    4393s autopkgtest [18:40:46]: @@@@@@@@@@@@@@@@@@@@ summary
    ...
    4393s mount FAIL non-zero exit status 1

[Regression Potential]

The changes are limited to `d/t/mount` before running `ubuntu-image`,
and providing downloaded snap files to it, so any regressions would
likely manifest in the test (which is already broken) probably with
snap-related error messages.

[Other Info]

The fix is not required / does not apply to Jammy and later, since
the autopkgtests changed there, and `d/t/mount` is no longer available.

...

The focal git branch in LP/GH is well ahead of the Ubuntu Archive,
and no longer matches the `debian/tests` structure with `d/t/mount`,
thus the package is being directly uploaded to Ubuntu without a MR.

...

Autopkgtests results against a PPA with the fix:

https://autopkgtest.ubuntu.com/results/autopkgtest-focal-mfo-ubuntu-image-focal-dep8-v2/?format=plain

[Original Error Log]

2690s autopkgtest [18:12:23]: test mount: [-----------------------
2690s ==========> dragonboard-model.assertion
2690s Warning: for backwards compatibility, `ubuntu-image` falls back to `ubuntu-image snap` if no subcommand is given
2690s DEBUG:ubuntu-image:-> [ 0] make_temporary_directories
2690s DEBUG:ubuntu-image:-> [ 1] prepare_gadget_tree
2690s DEBUG:ubuntu-image:-> [ 2] prepare_image
2691s WARNING: proceeding to download snaps ignoring validations, this default will change in the future. For now use --validation=enforce for validations to be taken into account, pass instead --validation=ignore to preserve current behavior going forward
2691s 2023/11/16 18:12:23.373431 store_download.go:142: no host system xdelta3 available to use deltas
2691s error: cannot download snap "dragonboard-kernel": no snap revision available as specified
2691s ERROR:ubuntu-image:COMMAND FAILED: snap prepare-image --channel=stable /tmp/autopkgtest.hdThZq/build.Bhc/src/debian/tests/models/dragonboard-model.assertion /tmp/autopkgtest.hdThZq/autopkgtest_tmp/dragonboard-model/unpack
2691s ERROR:ubuntu-image:Full debug traceback follows
2691s Traceback (most recent call last):
2691s File "/tmp/autopkgtest.hdThZq/build.Bhc/src/ubuntu_image/assertion_builder.py", line 26, in prepare_image
2691s snap(self.args.model_assertion, self.unpackdir,
2691s File "/tmp/autopkgtest.hdThZq/build.Bhc/src/ubuntu_image/helpers.py", line 142, in snap
2691s run(cmd, stdout=None, stderr=None, env=os.environ)
2691s File "/tmp/autopkgtest.hdThZq/build.Bhc/src/ubuntu_image/helpers.py", line 123, in run
2691s proc.check_returncode()
2691s File "/usr/lib/python3.8/subprocess.py", line 448, in check_returncode
2691s raise CalledProcessError(self.returncode, self.args, self.stdout,
2691s subprocess.CalledProcessError: Command '['snap', 'prepare-image', '--channel=stable', '/tmp/autopkgtest.hdThZq/build.Bhc/src/debian/tests/models/dragonboard-model.assertion', '/tmp/autopkgtest.hdThZq/autopkgtest_tmp/dragonboard-model/unpack']' returned non-zero exit status 1.
2691s Traceback (most recent call last):
2691s File "/tmp/autopkgtest.hdThZq/build.Bhc/src/debian/tests/mount", line 50, in <module>
2691s with open(image_file_list, 'r', encoding='utf-8') as fp:
2691s FileNotFoundError: [Errno 2] No such file or directory: '/tmp/autopkgtest.hdThZq/autopkgtest_tmp/dragonboard-model/image-list.txt'
2691s autopkgtest [18:12:24]: test mount: -----------------------]

Changed in ubuntu-image (Ubuntu):
status: New → Invalid
Changed in ubuntu-image (Ubuntu Focal):
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Mauricio Faria de Oliveira (mfo)
description: updated
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Adding the block-proposed-focal tag in case this is accepted.

tags: added: block-proposed-focal
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Mauricio, or anyone else affected,

Accepted ubuntu-image into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-image/1.11+20.04ubuntu1.1 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, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. 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-image (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Verification done on Focal.

The autopkgtests now pass on amd64, arm64, armhf, ppc64el, s390x (i386 fails since 2019-12-05).

@ https://autopkgtest.ubuntu.com/packages/u/ubuntu-image
- links under focal:

ubuntu-image [focal/amd64]
1.11+20.04ubuntu1.1 ubuntu-image/1.11+20.04ubuntu1.1 2023-12-08 17:37:33 UTC 0h 50m 28s - pass log   artifacts

ubuntu-image [focal/arm64]
1.11+20.04ubuntu1.1 ubuntu-image/1.11+20.04ubuntu1.1 2023-12-08 18:33:21 UTC 1h 46m 13s - pass log   artifacts

ubuntu-image [focal/armhf]
1.11+20.04ubuntu1.1 ubuntu-image/1.11+20.04ubuntu1.1 2023-12-08 17:28:48 UTC 0h 40m 22s - pass log   artifacts

ubuntu-image [focal/ppc64el]
1.11+20.04ubuntu1.1 ubuntu-image/1.11+20.04ubuntu1.1 2023-12-08 17:36:39 UTC 0h 49m 33s - pass log   artifacts

ubuntu-image [focal/s390x]
1.11+20.04ubuntu1.1 ubuntu-image/1.11+20.04ubuntu1.1 2023-12-08 17:31:18 UTC 0h 44m 11s - pass log   artifacts

---

ubuntu-image [focal/i386]
1.11+20.04ubuntu1.1 ubuntu-image/1.11+20.04ubuntu1.1 2023-12-08 17:19:10 UTC 0h 32m 06s - fail log   artifacts   ♻
...
1.8+20.04ubuntu1 requests/2.22.0-2 2019-12-05 23:56:16 UTC 0h 26m 46s - fail log   artifacts   ♻

tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
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.