Bug #10275
closedqemu task fails on rpm-based distros
0%
Description
It should use /usr/libexec/qemu-kvm instead of qemu for the command. I'm not sure if anything else needs to change.
An example of this failing: http://pulpito.ceph.com/teuthology-2014-12-06_10:51:36-rbd-next-distro-basic-multi/639671/
Updated by Andrew Schoen over 9 years ago
I've got a commit pushed that makes rpm based systems use qemu-kvm:
https://github.com/ceph/ceph-qa-suite/commit/c34dfd6d31e97bc50fb68286924c6f228f1e7405
I scheduled a test run using this branch, but the job still failed. I'm assuming there is some difference in the flags between qemu-kvm and qemu-system-x86_64. So far, I've noticed that the -drive flag looks to be different. Specifically, qemu-kvm doesn't have the 'format' option for -drive.
http://pulpito.front.sepia.ceph.com/ubuntu-2014-12-22_09:20:53-rbd-next-distro-basic-multi/672411/
Updated by Andrew Schoen over 9 years ago
- Status changed from New to Need More Info
Putting this in the 'needs info' status until Josh is back from vacation.
Updated by Andrew Schoen over 9 years ago
Actually, after more testing it does look like the command flags are the same between the two version of qemu. The command is still failing though.
Updated by Andrew Schoen over 9 years ago
This is the output I get when running this command directly on a node.
[ubuntu@magna107 ~]$ adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage daemon-helper term /usr/libexec/qemu-kvm -enable-kvm -nographic -m 4096 -drive file=/home/ubuntu/cephtest/qemu/base.client.0.qcow2,format=qcow2,if=virtio -cdrom /home/ubuntu/cephtest/qemu/client.0.iso -fsdev local,id=log,path=/home/ubuntu/cephtest/archive/qemu/client0,secu rity_model=none -device virtio-9p-pci,fsdev=log,mount_tag=test_log -drive file=rbd:rbd/client.0.0:id=0,format=raw,if=virtio,cache=none qemu-kvm: -drive file=rbd:rbd/client.0.0:id=0,format=raw,if=virtio,cache=none: could not open disk image rbd:rbd/client.0.0:id=0: Unknown protocol daemon-helper: command failed with exit status 1
I got this output by using interactive-on-error: true, modifying the task to abort and print the command before cleanup happens and then manually running the command on the node.
When I run `qemu-img -h` on magna107, it does not look like we're using a version of qemu-kvm with rbd support.
[ubuntu@magna107 ~]$ qemu-img -h qemu-img version 1.5.3, Copyright (c) 2004-2008 Fabrice Bellard usage: qemu-img command [command options] QEMU disk image utility Command syntax: check [-q] [-f fmt] [--output=ofmt] [-r [leaks | all]] filename create [-q] [-f fmt] [-o options] filename [size] commit [-q] [-f fmt] [-t cache] filename compare [-f fmt] [-F fmt] [-p] [-q] [-s] filename1 filename2 convert [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-O output_fmt] [-o options] [-s snapshot_name] [-S sparse_size] filename [filename2 [...]] output_filename info [-f fmt] [--output=ofmt] [--backing-chain] filename map [-f fmt] [--output=ofmt] filename snapshot [-q] [-l | -a snapshot | -c snapshot | -d snapshot] filename rebase [-q] [-f fmt] [-t cache] [-p] [-u] -b backing_file [-F backing_fmt] filename resize [-q] filename [+ | -]size amend [-q] [-f fmt] -o options filename Command parameters: 'filename' is a disk image filename 'fmt' is the disk image format. It is guessed automatically in most cases 'cache' is the cache mode used to write the output disk image, the valid options are: 'none', 'writeback' (default, except for convert), 'writethrough', 'directsync' and 'unsafe' (default for convert) 'size' is the disk image size in bytes. Optional suffixes 'k' or 'K' (kilobyte, 1024), 'M' (megabyte, 1024k), 'G' (gigabyte, 1024M) and T (terabyte, 1024G) are supported. 'b' is ignored. 'output_filename' is the destination disk image filename 'output_fmt' is the destination format 'options' is a comma separated list of format specific options in a name=value format. Use -o ? for an overview of the options supported by the used format '-c' indicates that target image must be compressed (qcow format only) '-u' enables unsafe rebasing. It is assumed that old and new backing file match exactly. The image doesn't need a working backing file before rebasing in this case (useful for renaming the backing file) '-h' with or without a command shows this help and lists the supported formats '-p' show progress of command (only certain commands) '-q' use Quiet mode - do not print any output (except errors) '-S' indicates the consecutive number of bytes (defaults to 4k) that must contain only zeros for qemu-img to create a sparse image during conversion. If the number of bytes is 0, the source will not be scanned for unallocated or zero sectors, and the destination image will always be fully allocated '--output' takes the format in which the output must be done (human or json) '-n' skips the target volume creation (useful if the volume is created prior to running qemu-img) Parameters to check subcommand: '-r' tries to repair any inconsistencies that are found during the check. '-r leaks' repairs only cluster leaks, whereas '-r all' fixes all kinds of errors, with a higher risk of choosing the wrong fix or hiding corruption that has already occurred. Parameters to snapshot subcommand: 'snapshot' is the name of the snapshot to create, apply or delete '-a' applies a snapshot (revert disk to saved state) '-c' creates a snapshot '-d' deletes a snapshot '-l' lists all snapshots in the given image Parameters to compare subcommand: '-f' first image format '-F' second image format '-s' run in Strict mode - fail on different image size or sector allocation Supported formats: vvfat vpc vmdk vhdx vdi sheepdog sheepdog sheepdog raw host_cdrom host_floppy host_device file qed qcow2 qcow parallels nbd nbd nbd iscsi gluster gluster gluster gluster dmg cow cloop bochs blkverify blkdebug
Updated by Andrew Schoen over 9 years ago
I believe we need to build qemu-kvm with the `--enable-rbd` flag.
Output from qemu-kvm shows it doesn't support rbd as a drive format either.
[ubuntu@magna107 ~]$ /usr/libexec/qemu-kvm -drive format=? Supported formats: vvfat vpc vmdk vhdx vdi sheepdog sheepdog sheepdog raw host_cdrom host_floppy host_device file qed qcow2 qcow parallels nbd nbd nbd iscsi gluster gluster gluster gluster dmg cow cloop bochs blkverify blkdebug
For posterity, here's a good reference: http://www.sebastien-han.fr/blog/2014/01/17/check-if-kvm-has-the-support-of-ceph/
Updated by Andrew Schoen over 9 years ago
Filed this ticket for the rbd support, http://tracker.ceph.com/issues/10480
Updated by Andrew Schoen over 9 years ago
Updated by Andrew Schoen over 9 years ago
- Status changed from Need More Info to Resolved