1 In-house patch to force Nova to always use our driver's snapshot |
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 |
2 method. This is required until we can support Image <--> Volume |
3 transforms. |
3 transforms. |
4 |
4 |
5 --- nova-2015.1.2/nova/api/openstack/compute/servers.py.orig 2015-11-10 14:29:33.597682730 -0700 |
5 --- nova-13.1.0/nova/api/openstack/compute/servers.py.~1~ 2016-06-14 08:45:49.000000000 -0700 |
6 +++ nova-2015.1.2/nova/api/openstack/compute/servers.py 2015-11-10 14:30:21.231062292 -0700 |
6 +++ nova-13.1.0/nova/api/openstack/compute/servers.py 2016-07-06 17:53:50.593003090 -0700 |
7 @@ -1072,8 +1072,10 @@ class Controller(wsgi.Controller): |
7 @@ -1097,8 +1097,10 @@ class ServersController(wsgi.Controller) |
8 context, instance.uuid) |
8 context, instance.uuid) |
9 |
9 |
10 try: |
10 try: |
11 - if self.compute_api.is_volume_backed_instance(context, instance, |
11 - if self.compute_api.is_volume_backed_instance(context, instance, |
12 - bdms): |
12 - bdms): |
13 + hypervisor = instance.system_metadata['image_hypervisor_type'] |
13 + hypervisor = instance.system_metadata['image_hypervisor_type'] |
14 + if hypervisor != 'solariszones' and \ |
14 + if hypervisor != 'solariszones' and \ |
15 + self.compute_api.is_volume_backed_instance(context, |
15 + self.compute_api.is_volume_backed_instance(context, |
16 + instance, bdms): |
16 + instance, bdms): |
17 img = instance.image_ref |
17 authorize(context, action="create_image:allow_volume_backed") |
18 if not img: |
18 image = self.compute_api.snapshot_volume_backed( |
19 properties = bdms.root_metadata( |
19 context, |