Your message dated Thu, 30 Nov 2023 01:33:59 +0000
with message-id <[email protected]>
and subject line Bug#1001713: fixed in lxc 1:5.0.3-2
has caused the Debian Bug report #1001713,
regarding lxc: lxc-copy --ephemeral always fails
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1001713: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001713
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lxc
Version: 1:5.0.2-1
Severity: normal

Dear Maintainer,

After the upgrade to bookworm starting ephemeral container with lxc-copy
command always fails with an error:

# lxc-copy -n autopkgtest-sid -e -l TRACE
Created autopkgtest-sid_uFBocY as clone of autopkgtest-sid
lxc-copy: autopkgtest-sid: ../src/lxc/lxccontainer.c: wait_on_daemonized_start: 
878 Received container state "ABORTING" instead of "RUNNING"
lxc-copy: autopkgtest-sid: ../src/lxc/af_unix.c: 
lxc_abstract_unix_recv_fds_iov: 218 Connection reset by peer - Failed to 
receive response
lxc-copy: autopkgtest-sid: ../src/lxc/commands.c: lxc_cmd_rsp_recv_fds: 128 
Failed to receive file descriptors for command "get_state"
lxc-copy: autopkgtest-sid: ../src/lxc/utils.c: _recursive_rmdir: 160 No such 
file or directory - Failed to delete 
"/var/lib/lxc/autopkgtest-sid_uFBocY/overlay/delta/etc"
lxc-copy: autopkgtest-sid: ../src/lxc/utils.c: _recursive_rmdir: 160 No such 
file or directory - Failed to delete 
"/var/lib/lxc/autopkgtest-sid_uFBocY/overlay/delta"
lxc-copy: autopkgtest-sid: ../src/lxc/lxccontainer.c: container_destroy: 3007 
Error destroying rootfs for autopkgtest-sid_uFBocY

The log contains some more information:

lxc-copy autopkgtest-sid 20230628192725.772 DEBUG    storage - 
../src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type 
"overlay"
lxc-copy autopkgtest-sid 20230628192725.772 ERROR    conf - 
../src/lxc/conf.c:lxc_rootfs_init:569 - Bad file descriptor - Failed to open 
"overlay:/var/lib/lxc/autopkgtest-sid/rootfs:/var/lib/lxc/autopkgtest-sid_uFBocY/overlay/delta"
lxc-copy autopkgtest-sid 20230628192725.772 ERROR    start - 
../src/lxc/start.c:__lxc_start:2079 - Failed to handle rootfs pinning for 
container "autopkgtest-sid_uFBocY"
lxc-copy autopkgtest-sid 20230628192725.772 TRACE    start - 
../src/lxc/start.c:lxc_serve_state_socket_pair:544 - Sent container state 
"ABORTING" to 5
lxc-copy autopkgtest-sid 20230628192725.772 TRACE    start - 
../src/lxc/start.c:lxc_serve_state_clients:483 - Set container state to ABORTING
lxc-copy autopkgtest-sid 20230628192725.772 TRACE    start - 
../src/lxc/start.c:lxc_serve_state_clients:486 - No state clients registered
lxc-copy autopkgtest-sid 20230628192725.772 TRACE    start - 
../src/lxc/start.c:lxc_serve_state_clients:483 - Set container state to STOPPING
lxc-copy autopkgtest-sid 20230628192725.772 TRACE    start - 
../src/lxc/start.c:lxc_serve_state_clients:486 - No state clients registered
lxc-copy autopkgtest-sid 20230628192725.772 ERROR    lxccontainer - 
../src/lxc/lxccontainer.c:wait_on_daemonized_start:878 - Received container 
state "ABORTING" instead of "RUNNING"
lxc-copy autopkgtest-sid 20230628192726.369 WARN     cgfsng - 
../src/lxc/cgroups/cgfsng.c:cgfsng_payload_destroy:555 - Uninitialized limit 
cgroup
lxc-copy autopkgtest-sid 20230628192726.643 TRACE    cgfsng - 
../src/lxc/cgroups/cgfsng.c:__cgroup_tree_create:727 - Created 10(lxc.pivot) 
cgroup
lxc-copy autopkgtest-sid 20230628192726.644 TRACE    cgfsng - 
../src/lxc/cgroups/cgfsng.c:__cgroup_tree_create:742 - Opened newly created 
cgroup lxc.pivot as 4
lxc-copy autopkgtest-sid 20230628192726.113 WARN     cgfsng - 
../src/lxc/cgroups/cgfsng.c:cgfsng_monitor_destroy:926 - Device or resource 
busy - Failed to destroy 10(lxc.monitor.autopkgtest-sid_uFBocY)
lxc-copy autopkgtest-sid 20230628192726.113 TRACE    start - 
../src/lxc/start.c:lxc_end:963 - Closed command socket
lxc-copy autopkgtest-sid 20230628192726.113 ERROR    af_unix - 
../src/lxc/af_unix.c:lxc_abstract_unix_recv_fds_iov:218 - Connection reset by 
peer - Failed to receive response
lxc-copy autopkgtest-sid 20230628192726.113 TRACE    start - 
../src/lxc/start.c:lxc_end:974 - Set container state to "STOPPED"
lxc-copy autopkgtest-sid 20230628192726.113 ERROR    commands - 
../src/lxc/commands.c:lxc_cmd_rsp_recv_fds:128 - Failed to receive file 
descriptors for command "get_state"
lxc-copy autopkgtest-sid 20230628192726.113 DEBUG    storage - 
../src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type 
"overlay"
lxc-copy autopkgtest-sid 20230628192726.113 TRACE    commands - 
../src/lxc/commands.c:lxc_cmd:521 - Opened new command socket connection fd 5 
for command "get_state"
lxc-copy autopkgtest-sid 20230628192726.113 DEBUG    storage - 
../src/lxc/storage/storage.c:get_storage_by_name:209 - Detected rootfs type 
"overlay"
lxc-copy autopkgtest-sid 20230628192726.113 ERROR    utils - 
../src/lxc/utils.c:_recursive_rmdir:118 - No such file or directory - Failed to 
stat "/var/lib/lxc/autopkgtest-sid_uFBocY/overlay/delta/etc/hosts"
lxc-copy autopkgtest-sid 20230628192726.113 ERROR    utils - 
../src/lxc/utils.c:_recursive_rmdir:160 - No such file or directory - Failed to 
delete "/var/lib/lxc/autopkgtest-sid_uFBocY/overlay/delta/etc"
lxc-copy autopkgtest-sid 20230628192726.113 ERROR    start - 
../src/lxc/start.c:lxc_destroy_container_on_signal:2236 - Error destroying 
rootfs for container "autopkgtest-sid_uFBocY"
lxc-copy autopkgtest-sid 20230628192726.113 ERROR    utils - 
../src/lxc/utils.c:_recursive_rmdir:160 - No such file or directory - Failed to 
delete "/var/lib/lxc/autopkgtest-sid_uFBocY/overlay/delta"
lxc-copy autopkgtest-sid 20230628192726.114 ERROR    lxccontainer - 
../src/lxc/lxccontainer.c:container_destroy:3007 - Error destroying rootfs for 
autopkgtest-sid_uFBocY

The problem seems to be in the container value of bdev_type that is not
initialized properly for the overlay case. The following simple patch is
probably not the correct fix but it shows that rootfs->bdev_type is NULL
and if initalized properly the container starts up correctly.

--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -555,6 +555,10 @@
        if (userns)
                return log_trace(0, "Not pinning because container runs in user 
namespace");
 
+       DEBUG("rootfs->bdev_type: %s", rootfs->bdev_type);
+       if (!rootfs->bdev_type && strstr(rootfs->path, "overlay:") == 
rootfs->path) {
+               rootfs->bdev_type = "overlay";
+       }
        if (rootfs->bdev_type) {
                if (strequal(rootfs->bdev_type, "overlay") ||
                   strequal(rootfs->bdev_type, "overlayfs"))

-- System Information:
Debian Release: 12.0
  APT prefers stable-security
  APT policy: (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-9-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lxc depends on:
ii  debconf [debconf-2.0]        1.5.82
ii  dnsmasq-base [dnsmasq-base]  2.89-1
ii  iproute2                     6.1.0-3
ii  iptables                     1.8.9-2
ii  libapparmor1                 3.0.8-3
ii  libc6                        2.36-9
ii  libcap2                      1:2.66-4
ii  libgcc-s1                    12.2.0-14
ii  liblxc-common                1:5.0.2-1
ii  liblxc1                      1:5.0.2-1
ii  libseccomp2                  2.5.4-1+b3
ii  libselinux1                  3.4-1+b6
ii  lsb-base                     11.6
ii  nftables                     1.0.6-2
ii  sysvinit-utils [lsb-base]    3.06-4

Versions of packages lxc recommends:
ii  apparmor       3.0.8-3
ii  debootstrap    1.0.128+nmu2
ii  dirmngr        2.2.40-1.1
ii  gnupg          2.2.40-1.1
pn  libpam-cgfs    <none>
ii  lxc-templates  3.0.4.48.g4765da8-1
pn  lxcfs          <none>
ii  openssl        3.0.9-1
ii  rsync          3.2.7-1
ii  uidmap         1:4.13+dfsg1-1+b1
ii  wget           1.21.3-1+b2

Versions of packages lxc suggests:
ii  btrfs-progs  6.2-1
ii  lvm2         2.03.16-2
ii  python3-lxc  1:5.0.0-1+b1

-- Configuration Files:
/etc/lxc/default.conf changed:
lxc.net.0.type = veth
lxc.net.0.link = virbr0
lxc.net.0.flags = up
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1


-- debconf information:
* lxc/auto_update_config: true

--- End Message ---
--- Begin Message ---
Source: lxc
Source-Version: 1:5.0.3-2
Done: Mathias Gibbens <[email protected]>

We believe that the bug you reported is fixed in the latest version of
lxc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mathias Gibbens <[email protected]> (supplier of updated lxc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 30 Nov 2023 01:04:13 +0000
Source: lxc
Architecture: source
Version: 1:5.0.3-2
Distribution: unstable
Urgency: medium
Maintainer: pkg-lxc <[email protected]>
Changed-By: Mathias Gibbens <[email protected]>
Closes: 947334 1001713
Changes:
 lxc (1:5.0.3-2) unstable; urgency=medium
 .
   * Switch default branch to debian/sid
   * Add criu as a Suggests for bin:lxc (Closes: #947334)
   * Cherry-pick upstream fix for creating ephemeral copies (Closes: #1001713)
Checksums-Sha1:
 bf2cb10918adbccdb63a1b93b676111752a22a50 2910 lxc_5.0.3-2.dsc
 64e90f94fbdf004516bfd59076422b279ec47ca0 975269 lxc_5.0.3.orig.tar.gz
 911dd538b5613bf8baa0078fbbf750d522d42464 833 lxc_5.0.3.orig.tar.gz.asc
 41d31a23211aed50e0d183293aec3584af3c4c49 53972 lxc_5.0.3-2.debian.tar.xz
 5b0d0b00b11dac3ff25ca6321c86b19c1cd6b53b 14116 lxc_5.0.3-2_amd64.buildinfo
Checksums-Sha256:
 88431fa6143ba91cad54f1ac376e53d3f939c27cb93dde64ecf35fc9f180f2b5 2910 
lxc_5.0.3-2.dsc
 2693a4c654dcfdafb3aa95c262051d8122afa1b6f5cef1920221ebbdee934d07 975269 
lxc_5.0.3.orig.tar.gz
 a25abe5b5b32b6ddb1313f3a8d0bba05c82b5f6bc96331687a792df0b1411c52 833 
lxc_5.0.3.orig.tar.gz.asc
 3ee0018deac6977818d0bf9ef202f04dbe760ee617f4fa5a98c4d947f28b511a 53972 
lxc_5.0.3-2.debian.tar.xz
 26fadfeb89e6112627067e816e8794d3a6fd72fd4db794b747b9b93b5bd36b3b 14116 
lxc_5.0.3-2_amd64.buildinfo
Files:
 99671d097a5194dc5051b0fce10b0ce0 2910 admin optional lxc_5.0.3-2.dsc
 142f197632bd44d25c37ae27db029fd8 975269 admin optional lxc_5.0.3.orig.tar.gz
 ae5dd94bc98708344e97653e93ffe7d1 833 admin optional lxc_5.0.3.orig.tar.gz.asc
 05ffe8eb2548ce541998473cfdcebac8 53972 admin optional lxc_5.0.3-2.debian.tar.xz
 8eec05af0776237f1981abf2642e0778 14116 admin optional 
lxc_5.0.3-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEE1Bp60H32xfynSJ8cKe7i1uz0QvkFAmVn4iwSHGdpYm1hdEBk
ZWJpYW4ub3JnAAoJECnu4tbs9EL5d3YP/3c4SSAjjvWBqBdIE8toOVxkYgHCgnxd
TczwmZ+qepXVwBezP8YZ+iEQNErYRJ40hdONJxKKpfl1+6Z3Iy5ShaF1FukMRSko
eEa6rqHAlYteOlOBxizaopqkl/cn+s1cDijH4kt/dSBW/bPf2uahBMP/aLKxZw33
il5dDGZZFqvgL3YXbaF6DZQ6vR9NEPRefcq7uUnJ10oWjZ/mDl+PLc/JVwuCH7gR
CVxhJNXhW4YfjH8we+xxnquh7I7sd7wkLydt1qThOkI1WCyCcaRqmOgawdar2JOW
metIvdGabfIXFqI1vH2XIP41M/kc4dZGZlJAk8R2llTpaKRTiJwy0olz2TPv2eIY
jSjRuIkVutiQnFGQovKPK9lEXVafG9RKDLrn5xMKItf+YpxQtQZPuWD3v33ASn6n
BMF6UAEaGSeIKw4wwgfaXTEmHNtpckAfVlSpvQkczy4RD+y3V8N8clb9B9uxxMvE
1jABQcewziYkOZb+gnwY7qUNF4yzX3D0oTEtw9/dnLg9Zqi4ZXJtPGVLM8CJdq4F
Z0g48l4ttNAmePQ4LMANDM9Vo3DxybNO5O9gysY4xfBSLKG7aNsBxx/YESub5H/X
OPc0qICRijyaQ3CQ3kybqGQLvmJUN9BSdcRrmXIblm6sQDneSgtfPEYHGPLltWw3
dSZwzXXNK+Wd
=c1L7
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to