qemu-img "-t none" parameter fails image conversion on tmpfs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
High
|
John Griffith |
Bug Description
I ran into this running the "test_snapshot_
We pass "-t none" to qemu_img which enables O_DIRECT on the output file. If the file system does not support this, the image convert operation fails.
On my machine, the output is in /tmp/ which is mounted with tmpfs, and removing "-t none" allows conversion to work.
We should not pass this option if it is not supported by the destination. (Similar to how we test for O_DIRECT support with dd commands in copy_volume.)
strace will show:
28785 open("/
when this happens, resulting in the error:
ImageCopyFailure: Failed to copy image to volume: qemu-img: Could not open '/tmp/tmpzP2s8_': Invalid argument
Introduced in Juno by:
https:/
5c5f3c0 Avoid using the disk cache on volume initialisation
tags: | added: juno-rc-potential |
Changed in cinder: | |
milestone: | none → juno-rc2 |
importance: | Undecided → High |
Changed in cinder: | |
milestone: | juno-rc2 → 2014.2 |
Why not remove the use of O_DIRECT, unless someone has a supporting benchmark (which I doubt), there's likely to be no measurable performance gain. If we're worried about efficient page cache management, then we have other options besides O_DIRECT.