On some servers with larger hard drives (500GB) I've started running into the following error from IPA during deployment:
2015-08-28 20:10:57.432 31429 ERROR ironic.drivers.modules.agent [-] node 80f0910f-aca6-41b4-8abc-b61a488ce054 command status errored: {u'message': u'Error writing image to device: Writing image to device /dev/sda failed with exit code 1. stdout: write_image.sh: Erasing existing mbr from /dev/sda\nwrite_image.sh: Imaging /tmp/bce2c558-4ca6-49ca-aac0-307b79cce194 to /dev/sda\n. stderr: 10+0 records in\n10+0 records out\n5120 bytes (5.1 kB) copied, 0.000467005 s, 11.0 MB/s\nqemu-img: error writing zeroes at sector 0: Invalid argument\n', u'code': 500, u'type': u'ImageWriteError', u'details': u'Writing image to device /dev/sda failed with exit code 1. stdout: write_image.sh: Erasing existing mbr from /dev/sda\nwrite_image.sh: Imaging /tmp/bce2c558-4ca6-49ca-aac0-307b79cce194 to /dev/sda\n. stderr: 10+0 records in\n10+0 records out\n5120 bytes (5.1 kB) copied, 0.000467005 s, 11.0 MB/s\nqemu-img: error writing zeroes at sector 0: Invalid argument\n'}
Not sure if this is related to https://bugzilla.redhat.com/show_bug.cgi?id=1196688? Will trying creating an IPA with a more update-to-date qemu-utils package.
So, I did actually already create a new IPA with updated qemu-utils packages (from "testing", debian stretch). And it seems to have addressed my issue. I'll submit a patch with what I did on Monday but will outline here as well in case others have thoughts on how to perhaps better address the issue.
What I did was modify the Dockerfile (https:/ /github. com/openstack/ ironic- python- agent/blob/ master/ Dockerfile) and added sources for testing. I then upgrade qemu-utils from testing (apt-get --only-upgrade -t testing install -y qemu-utils). There are some other minor changes made to have the above command work but that is the main 'fix' part of it.
Not sure if it's proper to use packages from testing ... but unfortunately it seems a newer version of qemu-img is needed.