Public bug reported: All attempts to build non disk-image targets 'directory' 'tar' 'subvolume' (lightweight containers) fail with the same error. The only fix appears to be to upgrade to latest mainline code (mkosi version 9). Example:
root@elloe000:~# mkosi -t directory DISTRIBUTION: Distribution: ubuntu Release: focal Mirror: http://archive.ubuntu.com/ubuntu OUTPUT: Output Format: directory Output: /root/image Output Checksum: n/a Output Signature: n/a Output Bmap: n/a Output nspawn Settings: n/a Incremental: no Read-only: no FS Compression: no XZ Compression: no Encryption: no Verity: no PACKAGES: Packages: none Package Cache: none Extra Trees: none Skeleton Trees: none Build Script: none Build Sources: /root Source File Transfer: none Build Directory: none Build Packages: none Postinstall Script: none Finalize Script: none Scripts with network: no nspawn Settings: none HOST CONFIGURATION: Extra search paths: none ‣ Detaching namespace... ‣ Detaching namespace complete. ‣ Setting up package cache... ‣ Setting up package cache /root/.mkosi-w5vbxui5 complete. ‣ Setting up temporary workspace. ‣ Temporary workspace in /root/.mkosi-4ayq5hqy is now set up. ‣ Mounting image... Traceback (most recent call last): File "/usr/bin/mkosi", line 4539, in <module> main() File "/usr/bin/mkosi", line 4535, in main run_verb(args) File "/usr/bin/mkosi", line 4507, in run_verb build_stuff(args) File "/usr/bin/mkosi", line 4333, in build_stuff raw, tar, root_hash = build_image(args, workspace, do_run_build_script=False, cleanup=True) File "/usr/bin/mkosi", line 4147, in build_image with mount_image(args, workspace.name, loopdev, encrypted_root, encrypted_home, encrypted_srv): File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/usr/bin/mkosi", line 961, in mount_image if args.xbootldr_partno is not None: AttributeError: 'CommandLineArguments' object has no attribute 'xbootldr_partno' Traceback (most recent call last): File "/usr/lib/python3.8/weakref.py", line 642, in _exitfunc f() File "/usr/lib/python3.8/weakref.py", line 566, in __call__ return info.func(*info.args, **(info.kwargs or {})) File "/usr/lib/python3.8/tempfile.py", line 957, in _cleanup cls._rmtree(name) File "/usr/lib/python3.8/tempfile.py", line 953, in _rmtree _rmtree(name, onerror=onerror) File "/usr/lib/python3.8/shutil.py", line 715, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.8/shutil.py", line 656, in _rmtree_safe_fd onerror(os.rmdir, fullname, sys.exc_info()) File "/usr/lib/python3.8/shutil.py", line 654, in _rmtree_safe_fd os.rmdir(entry.name, dir_fd=topfd) OSError: [Errno 16] Device or resource busy: 'root' ** Affects: mkosi (Ubuntu) Importance: Undecided Status: Confirmed ** Description changed: - All attempts to build non disk-image targets fail with the same error. - The only fix appears to be to upgrade to latest mainline code (mkosi - version 9). Example: + All attempts to build non disk-image targets (lightweight containers) + fail with the same error. The only fix appears to be to upgrade to + latest mainline code (mkosi version 9). Example: - root@elloe000:~# mkosi -t directory - DISTRIBUTION: - Distribution: ubuntu - Release: focal - Mirror: http://archive.ubuntu.com/ubuntu - - OUTPUT: - Output Format: directory - Output: /root/image - Output Checksum: n/a - Output Signature: n/a - Output Bmap: n/a - Output nspawn Settings: n/a - Incremental: no - Read-only: no - FS Compression: no - XZ Compression: no - Encryption: no - Verity: no - - PACKAGES: - Packages: none - Package Cache: none - Extra Trees: none - Skeleton Trees: none - Build Script: none - Build Sources: /root - Source File Transfer: none - Build Directory: none - Build Packages: none - Postinstall Script: none - Finalize Script: none - Scripts with network: no - nspawn Settings: none + root@elloe000:~# mkosi -t directory + DISTRIBUTION: + Distribution: ubuntu + Release: focal + Mirror: http://archive.ubuntu.com/ubuntu + + OUTPUT: + Output Format: directory + Output: /root/image + Output Checksum: n/a + Output Signature: n/a + Output Bmap: n/a + Output nspawn Settings: n/a + Incremental: no + Read-only: no + FS Compression: no + XZ Compression: no + Encryption: no + Verity: no + + PACKAGES: + Packages: none + Package Cache: none + Extra Trees: none + Skeleton Trees: none + Build Script: none + Build Sources: /root + Source File Transfer: none + Build Directory: none + Build Packages: none + Postinstall Script: none + Finalize Script: none + Scripts with network: no + nspawn Settings: none HOST CONFIGURATION: - Extra search paths: none + Extra search paths: none ‣ Detaching namespace... ‣ Detaching namespace complete. ‣ Setting up package cache... ‣ Setting up package cache /root/.mkosi-w5vbxui5 complete. ‣ Setting up temporary workspace. ‣ Temporary workspace in /root/.mkosi-4ayq5hqy is now set up. ‣ Mounting image... Traceback (most recent call last): - File "/usr/bin/mkosi", line 4539, in <module> - main() - File "/usr/bin/mkosi", line 4535, in main - run_verb(args) - File "/usr/bin/mkosi", line 4507, in run_verb - build_stuff(args) - File "/usr/bin/mkosi", line 4333, in build_stuff - raw, tar, root_hash = build_image(args, workspace, do_run_build_script=False, cleanup=True) - File "/usr/bin/mkosi", line 4147, in build_image - with mount_image(args, workspace.name, loopdev, encrypted_root, encrypted_home, encrypted_srv): - File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ - return next(self.gen) - File "/usr/bin/mkosi", line 961, in mount_image - if args.xbootldr_partno is not None: + File "/usr/bin/mkosi", line 4539, in <module> + main() + File "/usr/bin/mkosi", line 4535, in main + run_verb(args) + File "/usr/bin/mkosi", line 4507, in run_verb + build_stuff(args) + File "/usr/bin/mkosi", line 4333, in build_stuff + raw, tar, root_hash = build_image(args, workspace, do_run_build_script=False, cleanup=True) + File "/usr/bin/mkosi", line 4147, in build_image + with mount_image(args, workspace.name, loopdev, encrypted_root, encrypted_home, encrypted_srv): + File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ + return next(self.gen) + File "/usr/bin/mkosi", line 961, in mount_image + if args.xbootldr_partno is not None: AttributeError: 'CommandLineArguments' object has no attribute 'xbootldr_partno' Traceback (most recent call last): - File "/usr/lib/python3.8/weakref.py", line 642, in _exitfunc - f() - File "/usr/lib/python3.8/weakref.py", line 566, in __call__ - return info.func(*info.args, **(info.kwargs or {})) - File "/usr/lib/python3.8/tempfile.py", line 957, in _cleanup - cls._rmtree(name) - File "/usr/lib/python3.8/tempfile.py", line 953, in _rmtree - _rmtree(name, onerror=onerror) - File "/usr/lib/python3.8/shutil.py", line 715, in rmtree - _rmtree_safe_fd(fd, path, onerror) - File "/usr/lib/python3.8/shutil.py", line 656, in _rmtree_safe_fd - onerror(os.rmdir, fullname, sys.exc_info()) - File "/usr/lib/python3.8/shutil.py", line 654, in _rmtree_safe_fd - os.rmdir(entry.name, dir_fd=topfd) + File "/usr/lib/python3.8/weakref.py", line 642, in _exitfunc + f() + File "/usr/lib/python3.8/weakref.py", line 566, in __call__ + return info.func(*info.args, **(info.kwargs or {})) + File "/usr/lib/python3.8/tempfile.py", line 957, in _cleanup + cls._rmtree(name) + File "/usr/lib/python3.8/tempfile.py", line 953, in _rmtree + _rmtree(name, onerror=onerror) + File "/usr/lib/python3.8/shutil.py", line 715, in rmtree + _rmtree_safe_fd(fd, path, onerror) + File "/usr/lib/python3.8/shutil.py", line 656, in _rmtree_safe_fd + onerror(os.rmdir, fullname, sys.exc_info()) + File "/usr/lib/python3.8/shutil.py", line 654, in _rmtree_safe_fd + os.rmdir(entry.name, dir_fd=topfd) OSError: [Errno 16] Device or resource busy: 'root' ** Description changed: - All attempts to build non disk-image targets (lightweight containers) - fail with the same error. The only fix appears to be to upgrade to - latest mainline code (mkosi version 9). Example: + All attempts to build non disk-image targets 'directory' 'tar' + 'subvolume' (lightweight containers) fail with the same error. The only + fix appears to be to upgrade to latest mainline code (mkosi version 9). + Example: root@elloe000:~# mkosi -t directory DISTRIBUTION: Distribution: ubuntu Release: focal Mirror: http://archive.ubuntu.com/ubuntu OUTPUT: Output Format: directory Output: /root/image Output Checksum: n/a Output Signature: n/a Output Bmap: n/a Output nspawn Settings: n/a Incremental: no Read-only: no FS Compression: no XZ Compression: no Encryption: no Verity: no PACKAGES: Packages: none Package Cache: none Extra Trees: none Skeleton Trees: none Build Script: none Build Sources: /root Source File Transfer: none Build Directory: none Build Packages: none Postinstall Script: none Finalize Script: none Scripts with network: no nspawn Settings: none HOST CONFIGURATION: Extra search paths: none ‣ Detaching namespace... ‣ Detaching namespace complete. ‣ Setting up package cache... ‣ Setting up package cache /root/.mkosi-w5vbxui5 complete. ‣ Setting up temporary workspace. ‣ Temporary workspace in /root/.mkosi-4ayq5hqy is now set up. ‣ Mounting image... Traceback (most recent call last): File "/usr/bin/mkosi", line 4539, in <module> main() File "/usr/bin/mkosi", line 4535, in main run_verb(args) File "/usr/bin/mkosi", line 4507, in run_verb build_stuff(args) File "/usr/bin/mkosi", line 4333, in build_stuff raw, tar, root_hash = build_image(args, workspace, do_run_build_script=False, cleanup=True) File "/usr/bin/mkosi", line 4147, in build_image with mount_image(args, workspace.name, loopdev, encrypted_root, encrypted_home, encrypted_srv): File "/usr/lib/python3.8/contextlib.py", line 113, in __enter__ return next(self.gen) File "/usr/bin/mkosi", line 961, in mount_image if args.xbootldr_partno is not None: AttributeError: 'CommandLineArguments' object has no attribute 'xbootldr_partno' Traceback (most recent call last): File "/usr/lib/python3.8/weakref.py", line 642, in _exitfunc f() File "/usr/lib/python3.8/weakref.py", line 566, in __call__ return info.func(*info.args, **(info.kwargs or {})) File "/usr/lib/python3.8/tempfile.py", line 957, in _cleanup cls._rmtree(name) File "/usr/lib/python3.8/tempfile.py", line 953, in _rmtree _rmtree(name, onerror=onerror) File "/usr/lib/python3.8/shutil.py", line 715, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.8/shutil.py", line 656, in _rmtree_safe_fd onerror(os.rmdir, fullname, sys.exc_info()) File "/usr/lib/python3.8/shutil.py", line 654, in _rmtree_safe_fd os.rmdir(entry.name, dir_fd=topfd) OSError: [Errno 16] Device or resource busy: 'root' ** Changed in: mkosi (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1923202 Title: Fails to build directory, tar or btrfs subvolumes To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mkosi/+bug/1923202/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs