g2p / blocks

Enable bcache or LVM on existing block devices
GNU General Public License v3.0
376 stars 43 forks source link

blocks.maintboot is not working :( #13

Open ghost opened 10 years ago

ghost commented 10 years ago
~mindcat » ls /sys/fs/bcache
45208259-3a8e-4325-9f55-b1f1879af9b4  register  register_quiet
~mindcat » sudo blocks to-bcache --maintboot /dev/sdb2 --join 45208259-3a8e-4325-9f55-b1f1879af9b4
supermin: *** error: This is supermin version 5.
supermin: *** It looks like you are looking for supermin version 4.

This version of supermin will not work.  You need to find the old version
or upgrade to libguestfs >= 1.26.

Traceback (most recent call last):
  File "/usr/bin/maintboot", line 86, in <module>
    script_main()
  File "/usr/bin/maintboot", line 82, in script_main
    sys.exit(main())
  File "/usr/bin/maintboot", line 53, in main
    [sm_cmd] + '--names --use-installed -o'.split() + [smd] + args.pkgs)
  File "/usr/lib/python3.4/subprocess.py", line 559, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['supermin', '--names', '--use-installed', '-o', '/tmp/maintboot.5d5ksuwn/supermin.d', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools']' returned non-zero exit status 1
Traceback (most recent call last):
  File "/usr/bin/blocks", line 9, in <module>
    load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')()
  File "/home/mindcat/src/blocks/blocks/__main__.py", line 2012, in script_main
    sys.exit(main())
  File "/home/mindcat/src/blocks/blocks/__main__.py", line 1678, in main
    return args.action(args)
  File "/home/mindcat/src/blocks/blocks/__main__.py", line 1758, in cmd_to_bcache
    device, 'to-bcache', debug=args.debug, join=args.join)
  File "/home/mindcat/src/blocks/blocks/__main__.py", line 1780, in call_maintboot
    + ['--append', 'BLOCKS_ARGS=' + encoded])
  File "/usr/lib/python3.4/subprocess.py", line 559, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['maintboot', '--pkgs', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools', '--initscript', '/home/mindcat/src/blocks/blocks/maintboot.init', '--append', 'BLOCKS_ARGS=%7B%22device%22%3A%20%22e90af4aa-942c-4eef-b319-a1ec527c3068%22%2C%20%22join%22%3A%20%2245208259-3a8e-4325-9f55-b1f1879af9b4%22%2C%20%22command%22%3A%20%22to-bcache%22%2C%20%22debug%22%3A%20false%7D']' returned non-zero exit status 1
~mindcat » supermin --version
supermin 5.1.6
~mindcat » 
jani-matti commented 10 years ago

Same problem here. Running Debian sid and the following package versions: python3-blocks 0.1.5-1 python3-maintboot 0.1.0-1 supermin 5.1.7-1 libguestfs 1:1.26.0-1 libguestfs-tools 1:1.26.0-1

And the error message: supermin: * error: This is supermin version 5. supermin: * It looks like you are looking for supermin version 4.

This version of supermin will not work. You need to find the old version or upgrade to libguestfs >= 1.26.

Traceback (most recent call last): File "/usr/bin/maintboot", line 86, in script_main() File "/usr/bin/maintboot", line 82, in script_main sys.exit(main()) File "/usr/bin/maintboot", line 53, in main [sm_cmd] + '--names --use-installed -o'.split() + [smd] + args.pkgs) File "/usr/lib/python3.3/subprocess.py", line 547, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['supermin', '--names', '--use-installed', '-o', '/tmp/maintboot.ee9_sn/supermin.d', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools']' returned non-zero exit status 1 Traceback (most recent call last): File "/usr/bin/blocks", line 9, in load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')() File "/usr/lib/python3/dist-packages/blocks/main.py", line 2002, in script_main sys.exit(main()) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1668, in main return args.action(args) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1748, in cmd_to_bcache device, 'to-bcache', debug=args.debug, join=args.join) File "/usr/lib/python3/dist-packages/blocks/main.py", line 1770, in call_maintboot

mator commented 9 years ago

tried on fedora 22 today, received same error, since fedora does not have supermin 4, but version 5.1.12 currently.

tried with source compiled supermin-4.1.6 version, but it does not work as well, since it don't like "--use-installed" in its arguments (yum was replaced with dnf in fedora):

[root@localhost mator]# which supermin
/opt/supermin4/bin/supermin
[root@localhost mator]# supermin --version
supermin 4.1.6
[root@localhost mator]# supermin --names --use-installed -o /tmp/maintboot.k_54tbh1/supermin.d python3-blocks util-linux dash mount base-files libc-bin nilfs-tools reiserfsprogs xfsprogs e2fsprogs btrfs-tools lvm2 cryptsetup-bin bcache-tools
Fatal error: exception Failure("yum_rpm driver doesn't support --use-installed")

[root@localhost mator]# bin/blocks to-bcache --maintboot /dev/fedora/root --join `cat bcache-uuid.txt`
Fatal error: exception Failure("yum_rpm driver doesn't support --use-installed")
Traceback (most recent call last):
  File "/home/mator/bin/maintboot", line 86, in <module>
    script_main()
  File "/home/mator/bin/maintboot", line 82, in script_main
    sys.exit(main())
  File "/home/mator/bin/maintboot", line 53, in main
    [sm_cmd] + '--names --use-installed -o'.split() + [smd] + args.pkgs)
  File "/usr/lib64/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['supermin', '--names', '--use-installed', '-o', '/tmp/maintboot.2acrhp6p/supermin.d', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools']' returned non-zero exit status 2
Traceback (most recent call last):
  File "bin/blocks", line 9, in <module>
    load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')()
  File "/home/mator/src/blocks/blocks/__main__.py", line 2012, in script_main
    sys.exit(main())
  File "/home/mator/src/blocks/blocks/__main__.py", line 1678, in main
    return args.action(args)
  File "/home/mator/src/blocks/blocks/__main__.py", line 1758, in cmd_to_bcache
    device, 'to-bcache', debug=args.debug, join=args.join)
  File "/home/mator/src/blocks/blocks/__main__.py", line 1780, in call_maintboot
    + ['--append', 'BLOCKS_ARGS=' + encoded])
  File "/usr/lib64/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['maintboot', '--pkgs', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools', '--initscript', '/home/mator/src/blocks/blocks/maintboot.init', '--append', 'BLOCKS_ARGS=%7B%22device%22%3A%20%22e899d2e0-b7a0-41e2-b051-56d6f418118c%22%2C%20%22join%22%3A%20%226f6fc12e-1495-4f92-9657-eae38ed991a2%22%2C%20%22command%22%3A%20%22to-bcache%22%2C%20%22debug%22%3A%20false%7D']' returned non-zero exit status 1
jean commented 9 years ago

I'm hitting a similar error on Ubuntu 15.04:

blocks to-bcache --maintboot /dev/mapper/ubuntu--vg-root --join 7ab408f9-6cc6-43de-9fe7-fbfccf3f26af
supermin: *** error: This is supermin version 5.
supermin: *** It looks like you are looking for supermin version 4.

This version of supermin will not work.  You need to find the old version
or upgrade to libguestfs >= 1.26.

Traceback (most recent call last):
  File "/home/john/bin/maintboot", line 86, in <module>
    script_main()
  File "/home/john/bin/maintboot", line 82, in script_main
    sys.exit(main())
  File "/home/john/bin/maintboot", line 53, in main
    [sm_cmd] + '--names --use-installed -o'.split() + [smd] + args.pkgs)
  File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['supermin', '--names', '--use-installed', '-o', '/tmp/maintboot.menrtbzg/supermin.d', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools']' returned non-zero exit status 1
Traceback (most recent call last):
  File "/home/john/bin/blocks", line 9, in <module>
    load_entry_point('blocks==0.1.4', 'console_scripts', 'blocks')()
  File "/home/john/src/blocks/blocks/__main__.py", line 2012, in script_main
    sys.exit(main())
  File "/home/john/src/blocks/blocks/__main__.py", line 1678, in main
    return args.action(args)
  File "/home/john/src/blocks/blocks/__main__.py", line 1758, in cmd_to_bcache
    device, 'to-bcache', debug=args.debug, join=args.join)
  File "/home/john/src/blocks/blocks/__main__.py", line 1780, in call_maintboot
    + ['--append', 'BLOCKS_ARGS=' + encoded])
  File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['maintboot', '--pkgs', 'python3-blocks', 'util-linux', 'dash', 'mount', 'base-files', 'libc-bin', 'nilfs-tools', 'reiserfsprogs', 'xfsprogs', 'e2fsprogs', 'btrfs-tools', 'lvm2', 'cryptsetup-bin', 'bcache-tools', '--initscript', '/home/john/src/blocks/blocks/maintboot.init', '--append', 'BLOCKS_ARGS=%7B%22join%22%3A%20%228ac408f9-6cc6-43de-9fe7-fbfccf3f26bf%22%2C%20%22command%22%3A%20%22to-bcache%22%2C%20%22debug%22%3A%20false%2C%20%22device%22%3A%20%228771a3c7-b989-4c0b-9f81-cbd41110e375%22%7D']' returned non-zero exit status 1

For libguestfs: guestfish 1.28.6