components/openstack/nova/patches/05-force-driver-snapshot.patch
changeset 5405 66fd59fecd68
child 6854 52081f923019
equal deleted inserted replaced
5404:55e409ba4e72 5405:66fd59fecd68
       
     1 In-house patch to force Nova to always use our driver's snapshot
       
     2 method.  This is required until we can support Image <--> Volume
       
     3 transforms.
       
     4 
       
     5 --- nova-2015.1.2/nova/api/openstack/compute/servers.py.orig    2015-11-10 14:29:33.597682730 -0700
       
     6 +++ nova-2015.1.2/nova/api/openstack/compute/servers.py  2015-11-10 14:30:21.231062292 -0700
       
     7 @@ -1072,8 +1072,10 @@ class Controller(wsgi.Controller):
       
     8                      context, instance.uuid)
       
     9 
       
    10          try:
       
    11 -            if self.compute_api.is_volume_backed_instance(context, instance,
       
    12 -                                                          bdms):
       
    13 +            hypervisor = instance.system_metadata['image_hypervisor_type']
       
    14 +            if hypervisor != 'solariszones' and \
       
    15 +                    self.compute_api.is_volume_backed_instance(context,
       
    16 +                                                               instance, bdms):
       
    17                  img = instance.image_ref
       
    18                  if not img:
       
    19                      properties = bdms.root_metadata(