Public bug reported:
The test d/t/initrd-boot has this part:
# Check if the architecture is armhf, and only attempt to enable swap if it's
not
if ! [ $(uname -m) = "armv7l" ]; then
# Allocate some swap
fallocate -l 2G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
else
echo "Skipping swap activation on armhf architecture"
fi
That was based on the assumption that only armhf was running in
containers, but nowadays that's no longer true.
The test should change that conditional to check for a container
instead, unless the swap file is a crucial part of the test, in which
case a isolation-machine restriction should be added.
The error:
227s autopkgtest [23:44:17]: test initrd-boot: [-----------------------
227s + TMPDIR=/tmp/autopkgtest.mB62Ws/autopkgtest_tmp
227s + OUTDIR=/tmp/autopkgtest.mB62Ws/initrd-boot-artifacts
227s + chmod a+rx /tmp/autopkgtest.mB62Ws/autopkgtest_tmp
227s ++ grep '^ID=' /etc/os-release
227s + eval ID=ubuntu
227s ++ ID=ubuntu
227s + '[' ubuntu = ubuntu ']'
227s + COMPONENTS=main,universe
227s + INCLUDES=e2fsprogs,zstd,openssh-server
227s + EXTRAS=--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg
227s + ssh-keygen -q -t rsa -f /tmp/autopkgtest.mB62Ws/autopkgtest_tmp/id_rsa
-N ''
228s + IMAGE=/tmp/autopkgtest.mB62Ws/autopkgtest_tmp/nbd.img
228s ++ uname -m
228s + '[' ppc64le = armv7l ']'
228s + fallocate -l 2G /swapfile
228s + chmod 600 /swapfile
228s + mkswap /swapfile
228s Setting up swapspace version 1, size = 2 GiB (2147418112 bytes)
228s no label, UUID=3e900e6d-2850-4882-9a67-a2d7acb25686
228s + swapon /swapfile
228s swapon: /swapfile: swapon failed: Operation not permitted
** Affects: nbd (Ubuntu)
Importance: Undecided
Assignee: Andreas Hasenack (ahasenack)
Status: In Progress
** Tags: dep8 server-todo update-excuse
** Description changed:
The test d/t/initrd-boot has this part:
# Check if the architecture is armhf, and only attempt to enable swap if it's
not
if ! [ $(uname -m) = "armv7l" ]; then
- # Allocate some swap
- fallocate -l 2G /swapfile
- chmod 600 /swapfile
- mkswap /swapfile
- swapon /swapfile
+ # Allocate some swap
+ fallocate -l 2G /swapfile
+ chmod 600 /swapfile
+ mkswap /swapfile
+ swapon /swapfile
else
- echo "Skipping swap activation on armhf architecture"
+ echo "Skipping swap activation on armhf architecture"
fi
That was based on the assumption that only armhf was running in
containers, but nowadays that's no longer true.
The test should change that conditional to check for a container
instead, unless the swap file is a crucial part of the test, in which
case a isolation-machine restriction should be added.
+
+
+ The error:
+ 227s autopkgtest [23:44:17]: test initrd-boot: [-----------------------
+ 227s + TMPDIR=/tmp/autopkgtest.mB62Ws/autopkgtest_tmp
+ 227s + OUTDIR=/tmp/autopkgtest.mB62Ws/initrd-boot-artifacts
+ 227s + chmod a+rx /tmp/autopkgtest.mB62Ws/autopkgtest_tmp
+ 227s ++ grep '^ID=' /etc/os-release
+ 227s + eval ID=ubuntu
+ 227s ++ ID=ubuntu
+ 227s + '[' ubuntu = ubuntu ']'
+ 227s + COMPONENTS=main,universe
+ 227s + INCLUDES=e2fsprogs,zstd,openssh-server
+ 227s + EXTRAS=--keyring=/usr/share/keyrings/ubuntu-archive-keyring.gpg
+ 227s + ssh-keygen -q -t rsa -f /tmp/autopkgtest.mB62Ws/autopkgtest_tmp/id_rsa
-N ''
+ 228s + IMAGE=/tmp/autopkgtest.mB62Ws/autopkgtest_tmp/nbd.img
+ 228s ++ uname -m
+ 228s + '[' ppc64le = armv7l ']'
+ 228s + fallocate -l 2G /swapfile
+ 228s + chmod 600 /swapfile
+ 228s + mkswap /swapfile
+ 228s Setting up swapspace version 1, size = 2 GiB (2147418112 bytes)
+ 228s no label, UUID=3e900e6d-2850-4882-9a67-a2d7acb25686
+ 228s + swapon /swapfile
+ 228s swapon: /swapfile: swapon failed: Operation not permitted
** Changed in: nbd (Ubuntu)
Assignee: (unassigned) => Andreas Hasenack (ahasenack)
** Changed in: nbd (Ubuntu)
Status: New => In Progress
** Tags added: server-todo
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2163156
Title:
autopkgtest failure in containers due to swap file
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nbd/+bug/2163156/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs