autopkgtest failures on 1:5.0.3-2ubuntu3 (Noble)

Bug #2059550 reported by Aleksandr Mikhalitsyn
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

We can see autopkgtest failures on Noble:
https://autopkgtest.ubuntu.com/packages/lxc
1:5.0.3-2ubuntu2 from noble-proposed/universe

Details from log (https://autopkgtest.ubuntu.com/results/autopkgtest-noble/noble/amd64/l/lxc/20240327_203000_ce7d4@/log.gz):
=====================
3266s Removing autopkgtest-satdep (0) ...
3269s autopkgtest [20:29:48]: test no-devel: [-----------------------
3269s + grep LXC_DEVEL /usr/include/lxc/version.h
3269s + grep 0
3269s #define LXC_DEVEL 0
3269s autopkgtest [20:29:48]: test no-devel: -----------------------]
3269s autopkgtest [20:29:48]: test no-devel: - - - - - - - - - - results - - - - - - - - - -
3269s no-devel PASS
3269s autopkgtest [20:29:48]: @@@@@@@@@@@@@@@@@@@@ summary
3269s exercise FAIL non-zero exit status 1
3269s unprivileged-containers FAIL non-zero exit status 1
3269s basics-create-destroy PASS (superficial)
3269s no-devel PASS
=====================

unprivileged-containers
=====================
1896s Unpacking the rootfs
1900s
1900s ---
1900s You just created an Ubuntu mantic amd64 (20240326_07:42) container.
1900s
1900s To enable SSH, run: apt install openssh-server
1900s No default root or user password are set by LXC.
1900s + systemd-run --scope --quiet --user --property=Delegate=yes lxc-start -n mycontainer
1900s Failed to connect to bus: No medium found

=====================

exercise
=====================
1113s FAIL: lxc-tests: /usr/bin/lxc-test-unpriv
1113s ---
1113s Name: c1
1113s State: RUNNING
1113s PID: 52927
1113s Link: veth1001_HZ75
1113s TX bytes: 0 bytes
1113s RX bytes: 0 bytes
1113s Total bytes: 0 bytes
1113s Name: c1
1113s State: RUNNING
1113s PID: 52994
1113s Link: veth1001_ujGT
1113s TX bytes: 0 bytes
1113s RX bytes: 0 bytes
1113s Total bytes: 0 bytes
1113s lxc-copy: c1: ../src/lxc/utils.c: lxc_drop_groups: 1365 Operation not permitted - Failed to drop supplimentary groups
<...>
1113s info: Removing crontab ...
1113s info: Removing user `lxcunpriv' ...
1113s FAIL
1113s ---
1114s PASS: lxc-tests: /usr/bin/lxc-test-usernic
1114s PASS: lxc-tests: /usr/bin/lxc-test-usernsexec
1114s PASS: lxc-tests: /usr/bin/lxc-test-utils
1114s
1114s SUMMARY: pass=55, fail=1, ignored=0
1115s autopkgtest [19:53:54]: test exercise: -----------------------]
1115s autopkgtest [19:53:54]: test exercise: - - - - - - - - - - results - - - - - - - - - -
1115s exercise FAIL non-zero exit status 1
=====================

In the previous version we had no unprivileged-containers testsuite because it was inherited from Debian.

lxc-test-unpriv was a skipped test too because we had this piece of code:
https://git.launchpad.net/ubuntu/+source/lxc/tree/debian/tests/exercise?h=applied/ubuntu/noble#n129
=====================
    # Skip some tests due to cgroup v2 incompatibility
    if [ -e /sys/fs/cgroup/system.slice/memory.current ]; then

        [ "$testbin" = "lxc-test-apparmor-mount" ] && \
            ignore "$STRING" && continue

        [ "$testbin" = "lxc-test-autostart" ] && \
            ignore "$STRING" && continue

        [ "$testbin" = "lxc-test-no-new-privs" ] && \
            ignore "$STRING" && continue

        [ "$testbin" = "lxc-test-unpriv" ] && \
            ignore "$STRING" && continue

    fi
=====================

Just compare:
https://git.launchpad.net/ubuntu/+source/lxc/tree/debian/tests/control?h=applied/ubuntu/noble
and
https://git.launchpad.net/ubuntu/+source/lxc/tree/debian/tests/control?h=applied/ubuntu/noble-devel

We want to fix all of this for sure, but it would be awesome to get an updated and actual version of LXC in the upcoming Ubuntu Noble release too. So, may be it makes sense to skip this tests for the sake of having LXC updated.

What I found in Debian, is that autopkgtests are skipped too:
https://ci.debian.net/packages/l/lxc/unstable/amd64/

Taking this into account it (probably) reasonable to skip this tests too for now.

Revision history for this message
Aleksandr Mikhalitsyn (mihalicyn) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff.diff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Aleksandr Mikhalitsyn (mihalicyn) wrote :

It's worth mentioning that this debdiff includes not only tests disabling but also fix that allows to build source package on Ubuntu.

If you do:

pull-lp-source liblxc-dev noble-proposed
cd lxc-5.0.3
debuild -S -d

you will see something like this:

 dpkg-source -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building lxc using existing ./lxc_5.0.3.orig.tar.gz
dpkg-source: info: building lxc using existing ./lxc_5.0.3.orig.tar.gz.asc
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: info: local changes detected, the modified files are:
 lxc-5.0.3/config/apparmor/abstractions/start-container.in
 lxc-5.0.3/config/apparmor/usr.bin.lxc-copy
 lxc-5.0.3/config/apparmor/usr.bin.lxc-start
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/lxc_5.0.3-2ubuntu3.diff.21HvOc
dpkg-source: info: Hint: make sure the version in debian/changelog matches the unpacked source tree
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -S -d failed

It's because of the way how we apply custom Ubuntu patches.

This debian diff file contains fix for this too.

summary: - autopkgtest failures on 1:5.0.3-2ubuntu2 (Noble)
+ autopkgtest failures on 1:5.0.3-2ubuntu3 (Noble)
Revision history for this message
Julian Andres Klode (juliank) wrote :

Sponsored, thanks

Changed in lxc (Ubuntu):
status: New → Fix Committed
Revision history for this message
Aleksandr Mikhalitsyn (mihalicyn) wrote :

Thanks, Julian!

Once this version pass all tests and reach archives I'll prepare PRs for https://salsa.debian.org/lxc-team/lxc to be in sync with Debian.

Nick Rosbrook (enr0n)
tags: added: update-excuse
Revision history for this message
Aleksandr Mikhalitsyn (mihalicyn) wrote :

Ok, lxc/1:5.0.3-2ubuntu4 was uploaded and it's getting better but, unfortunately, "lxc-test-unpriv" test wasn't skipped really.

Despite this bug (https://bugs.launchpad.net/ubuntu/+source/autopkgtest/+bug/2056461) I was able to make my local autopkgtest environment to work:

autopkgtest \
  --apt-upgrade \
  --shell-fail \
  --output-dir dep8-lxc-pkg-ubuntu \
    lxc-5.0.3/ \
  -- lxd --vm ubuntu-daily:noble -c limits.cpu=10 -c limits.memory=15GiB

==========================================================
PASS: lxc-tests: /usr/bin/lxc-test-snapshot
PASS: lxc-tests: /usr/bin/lxc-test-startone
PASS: lxc-tests: /usr/bin/lxc-test-state-server
PASS: lxc-tests: /usr/bin/lxc-test-symlink
PASS: lxc-tests: /usr/bin/lxc-test-sys-mixed
PASS: lxc-tests: /usr/bin/lxc-test-sysctls
IGNORED: lxc-tests: /usr/bin/lxc-test-unpriv
PASS: lxc-tests: /usr/bin/lxc-test-usernic
PASS: lxc-tests: /usr/bin/lxc-test-usernsexec
PASS: lxc-tests: /usr/bin/lxc-test-utils

SUMMARY: pass=55, fail=0, ignored=1
autopkgtest [17:46:01]: test exercise: -----------------------]
autopkgtest [17:46:02]: test exercise: - - - - - - - - - - results - - - - - - - - - -
exercise PASS
autopkgtest [17:46:02]: test basics-create-destroy: preparing testbed

....
Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
(Reading database ... 69249 files and directories currently installed.)
Removing autopkgtest-satdep (0) ...
autopkgtest [17:50:16]: test no-devel: [-----------------------
+ grep LXC_DEVEL /usr/include/lxc/version.h
+ grep 0
#define LXC_DEVEL 0
autopkgtest [17:50:17]: test no-devel: -----------------------]
no-devel PASS
autopkgtest [17:50:17]: test no-devel: - - - - - - - - - - results - - - - - - - - - -
autopkgtest [17:50:18]: @@@@@@@@@@@@@@@@@@@@ summary
exercise PASS
basics-create-destroy PASS (superficial)
no-devel PASS
==========================================================

Revision history for this message
Aleksandr Mikhalitsyn (mihalicyn) wrote :
Revision history for this message
Aleksandr Mikhalitsyn (mihalicyn) wrote (last edit ):

https://autopkgtest.ubuntu.com/packages/l/lxc

all tests are green, except i386 (which is broken for years :-( and this should not block a migration).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1:5.0.3-2ubuntu5

---------------
lxc (1:5.0.3-2ubuntu5) noble; urgency=medium

  * Temporarily skip some buggy tests (LP: #2059550)
    - debian/tests/exercise: skip "lxc-test-unpriv" test (attempt #2)

 -- Alexander Mikhalitsyn <email address hidden> Wed, 10 Apr 2024 17:23:26 +0200

Changed in lxc (Ubuntu):
status: Fix Committed → Fix Released
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.