ARPA-SIMC / moncic-ci

Continuous integration tool and development helper.
GNU General Public License v2.0
2 stars 0 forks source link

monci remove fails when an image is not bootstrapped #79

Closed spanezz closed 1 year ago

spanezz commented 1 year ago
$ monci images
Name              Distro            Boostrapped   Path                             
test              fedora:34         no            /var/lib/machines/test
$ monci remove test
Traceback (most recent call last):
  File "/usr/bin/monci", line 41, in <module>
    cli.run_main(main)
  File "/usr/lib/python3/dist-packages/moncic/cli/base.py", line 67, in run_main
    sys.exit(func())
  File "/usr/bin/monci", line 37, in main
    return handler.run()
  File "/usr/lib/python3/dist-packages/moncic/cli/maint.py", line 116, in run
    images.remove_system(name)
  File "/usr/lib/python3/dist-packages/moncic/imagestorage.py", line 299, in remove_system
    subvolume.remove()
  File "/usr/lib/python3/dist-packages/moncic/utils/btrfs.py", line 99, in remove
    res = subprocess.run(
  File "/usr/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['btrfs', 'subvolume', 'list', '-o', '/var/lib/machines/test']' returned non-zero exit status 1.