20867780 Nova should support LZR for block devices s11u3-sru
authorSean Wilcox <sean.wilcox@oracle.com>
Tue, 09 Feb 2016 16:26:27 -0800
branchs11u3-sru
changeset 5429 1ae4cfbadda9
parent 5424 a7324256f450
child 5430 b6b088be89d5
20867780 Nova should support LZR for block devices
components/openstack/nova/files/solariszones/driver.py
--- a/components/openstack/nova/files/solariszones/driver.py	Tue Feb 02 16:55:41 2016 -0800
+++ b/components/openstack/nova/files/solariszones/driver.py	Tue Feb 09 16:26:27 2016 -0800
@@ -170,6 +170,7 @@
     except Exception:
         raise
 
+
 def zonemgr_strerror(ex):
     """Format the payload from a zonemgr(3RAD) rad.client.ObjectError
     exception into a sensible error string that can be logged. Newlines
@@ -1559,7 +1560,7 @@
             if installed:
                 self._uninstall(instance)
             if configured:
-                 self._delete_config(instance)
+                self._delete_config(instance)
             if connection_info is not None:
                 self._volume_api.detach(context, volume_id)
                 self._volume_api.delete(context, volume_id)
@@ -1935,6 +1936,9 @@
         with ZoneConfig(zone) as zc:
             zc.addresource("device", [zonemgr.Property("storage", suri)])
 
+        # apply the configuration to the running zone
+        zone.apply()
+
     def detach_volume(self, connection_info, instance, mountpoint,
                       encryption=None):
         """Detach the disk attached to the instance."""
@@ -1963,6 +1967,9 @@
         with ZoneConfig(zone) as zc:
             zc.removeresources("device", [zonemgr.Property("storage", suri)])
 
+        # apply the configuration to the running zone
+        zone.apply()
+
     def swap_volume(self, old_connection_info, new_connection_info,
                     instance, mountpoint, resize_to):
         """Replace the disk attached to the instance.