Fails to build directory, tar or btrfs subvolumes

Bug #1923202 reported by TJ
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mkosi (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

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'

TJ (tj)
description: updated
description: updated
Changed in mkosi (Ubuntu):
status: New → Confirmed
Luca Boccassi (bluca)
Changed in mkosi (Ubuntu):
status: Confirmed → Fix Committed
Luca Boccassi (bluca)
Changed in mkosi (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.