Browse Source

Revert "nova shared storage: rbd is always shared storage"

This reverts commit 05b7f63a42.

The _is_storage_shared_with method is specifically checking if the
instance directory is shared. It is not checking if the actual instance
disks are shared and as a result assumptions cannot be made based on the
value of images_type.

Closes-Bug: 1824858
Change-Id: I52293b6ce3e1ce77fa31b382d0067fb3bc68b21f
(cherry picked from commit 404932f82130445472837095b3ad9089c75e2660)
(cherry picked from commit 890882ebbf74db14a7c1904cca96cd7f5907493b)
changes/62/726862/1
hutianhao27 10 months ago
committed by Lee Yarwood
parent
commit
a63c97fd2d
2 changed files with 0 additions and 5 deletions
  1. +0
    -1
      nova/tests/unit/virt/libvirt/test_driver.py
  2. +0
    -4
      nova/virt/libvirt/driver.py

+ 0
- 1
nova/tests/unit/virt/libvirt/test_driver.py View File

@@ -9658,7 +9658,6 @@ class LibvirtConnTestCase(test.NoDBTestCase,
self.assertTrue(drvr._is_shared_block_storage(instance, data,
block_device_info=bdi))
self.assertEqual(0, mock_get_instance_disk_info.call_count)
self.assertTrue(drvr._is_storage_shared_with('foo', 'bar'))

def test_is_shared_block_storage_lvm(self):
self.flags(images_type='lvm', group='libvirt')


+ 0
- 4
nova/virt/libvirt/driver.py View File

@@ -8746,10 +8746,6 @@ class LibvirtDriver(driver.ComputeDriver):
# on the same filesystem: the source and dest IP are the
# same, or we create a file on the dest system via SSH
# and check whether the source system can also see it.
# NOTE (drwahl): Actually, there is a 3rd way: if images_type is rbd,
# it will always be shared storage
if CONF.libvirt.images_type == 'rbd':
return True
shared_storage = (dest == self.get_host_ip_addr())
if not shared_storage:
tmp_file = uuidutils.generate_uuid(dashed=False) + '.tmp'


Loading…
Cancel
Save