Several more comments from my side in order of importance, and I agree with all the stuff Stanislaw said.
* We really should not be creating the instance_path dir like you are doing in get_set_driver_format. We use libvirt_utils.get_instance_path, and ensure_tree - for inspiration, check the libvirt driver's _create_image method. Also - we really should not be creating the instance directory in imagebackend classes ever, this is really not it's responsibility but this is just IMHO.
* Why not have a disks.info file per instance? The code here creates one for all the instances. Currently we can have only one image really per instance but that might change in the future (see https://blueprints.launchpad.net/nova/+spec/libvirt-image-to-local-bdm), and this seems like a more natural place to keep it, plus we need only per instance locking. There may be something I'm missing here so feel free to let me know :)
Several more comments from my side in order of importance, and I agree with all the stuff Stanislaw said.
* We really should not be creating the instance_path dir like you are doing in get_set_ driver_ format. We use libvirt_ utils.get_ instance_ path, and ensure_tree - for inspiration, check the libvirt driver's _create_image method. Also - we really should not be creating the instance directory in imagebackend classes ever, this is really not it's responsibility but this is just IMHO.
* Why not have a disks.info file per instance? The code here creates one for all the instances. Currently we can have only one image really per instance but that might change in the future (see https:/ /blueprints. launchpad. net/nova/ +spec/libvirt- image-to- local-bdm), and this seems like a more natural place to keep it, plus we need only per instance locking. There may be something I'm missing here so feel free to let me know :)
* get_set_ driver_ format is not a good name IMHO.