For other reasons we stopped using this path for file injection by default. This bug is sufficiently old that I assume it is no longer in progress.
** Changed in: nova Status: In Progress => Invalid -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1024586 Title: avoid the use of kpartx in file injection Status in OpenStack Compute (Nova): Invalid Bug description: kpartx has various problems... 1. The git repo on kernel.org is no longer available. 2. kpartx -l had side effects: $ kpartx -l /bin/ls $ ls text file busy To fix you need to run losetup -a to find the assigned loopback device and then losetup -d /dev/loop... 3. On an unconnected loop device we get warnings, but an EXIT_SUCCESS ? # kpartx -a /dev/loop1 && echo EXIT_SUCCESS read error, sector 0 llseek error llseek error llseek error EXIT_SUCCESS 4. Also for a loop device that is connected, I get a "failed" warning, but the EXIT_SUCCESS is appropriate in that case as the mapped device is present and usable # kpartx -a /dev/loop0 /dev/mapper/loop0p1: mknod for loop0p1 failed: File exists 5. There are issues with qcow2 encoded cirros images # qemu-img info cirros-0.3.0-x86_64-disk.img image: cirros-0.3.0-x86_64-disk.img file format: qcow2 virtual size: 39M (41126400 bytes) disk size: 9.3M cluster_size: 65536 # qemu-nbd -c /dev/nbd15 $PWD/cirros-0.3.0-x86_64-disk.img # ls -la /sys/block/nbd15/pid -r--r--r--. 1 root root 4096 Jun 8 10:19 /sys/block/nbd15/pid # kpartx -a /dev/nbd15 device-mapper: resume ioctl on nbd15p1 failed: Invalid argument create/reload failed on nbd15p1 6. There was a report that `kpartx -[ad]` were not synchronous with the creation/deletion of /dev/mapper/nbdXXpX requiring sleep calls to avoid failures. The best way to avoid the need for kpartx is to use the newer kernel auto partition mapping feature available since kernel 3.2 and only fallback to kpartx if not exists ... '%sp%s' % (self.device, self.partition) Note the nbd module must be mounted with param max_part=16 etc. so that would need documentation. Also we would need to test the same applies for raw loopback images as well as nbd To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1024586/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp