diff -Nru horizon-9.1.2/debian/changelog horizon-9.1.2/debian/changelog --- horizon-9.1.2/debian/changelog 2018-03-15 13:57:14.000000000 -0400 +++ horizon-9.1.2/debian/changelog 2019-04-16 10:51:42.000000000 -0400 @@ -1,3 +1,14 @@ +horizon (2:9.1.2-0ubuntu6) xenial; urgency=medium + + * d/p/drop-devicename-creating-server-with-image-boot-to-volume.patch: + When creating a server using an image boot source to new volume, + horizon specified device_name 'vda'. If for instance we use an image + with disk_bus type scsi, horizon will name the device_name as 'vda' + when it should be 'sda'. As per BDMv2 documentation, it's best to not + specify device_name. (LP: #1822129) + + -- Eric Desrochers Tue, 16 Apr 2019 10:51:42 -0400 + horizon (2:9.1.2-0ubuntu5) xenial; urgency=medium [ Seyeong Kim ] diff -Nru horizon-9.1.2/debian/patches/drop-devicename-creating-server-with-image-boot-to-volume.patch horizon-9.1.2/debian/patches/drop-devicename-creating-server-with-image-boot-to-volume.patch --- horizon-9.1.2/debian/patches/drop-devicename-creating-server-with-image-boot-to-volume.patch 1969-12-31 19:00:00.000000000 -0500 +++ horizon-9.1.2/debian/patches/drop-devicename-creating-server-with-image-boot-to-volume.patch 2019-04-16 10:51:25.000000000 -0400 @@ -0,0 +1,117 @@ +Description: Not implicitly set vol_device_name to vda + Using a scsi decorated image with: + hw_disk_bus='scsi' + hw_scsi_model='virtio-scsi' + + This solve the case where an instance is + launched with 'image' selected as boot + source with a new volume. This will result + in /dev/vda instead of /dev/sda as it + should. + + Not specifying device name in + setFinalSpecBootImageToVolume() leaves the + decision to nova to determine it. + + Example: + ------- + VM boot volume without scsi meta data decoration: + Attached To + 0a0cd660-7ce3-4033-9983-2e1099edc5f0 on /dev/vda + + VM boot volume with scsi meta data decoration: + Attached To + 91f50dbc-8bdf-4293-84ea-fc5df27b5ee4 on /dev/sda + -------- + + Note: This commit doesn't address cases for + where instances are launched using existing + volume and snapshot, this will involve more + work to migrate the code from BDMv1 to BDMv2. + + Closes-Bug #1560965 + + Change-Id: I9d114c2c2e6736a8f1a8092afa568f930b656f09 + +Author: Eric Desrochers +Origin: upstream, https://github.com/openstack/horizon/commit/4788c4d +Bug: https://launchpad.net/bugs/1560965 +Bug-Ubuntu: https://launchpad.net/bugs/1822129 +Index: horizon-9.1.2/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js +=================================================================== +--- horizon-9.1.2.orig/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js ++++ horizon-9.1.2/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.js +@@ -568,11 +568,9 @@ + function setFinalSpecBootImageToVolume(finalSpec) { + if (finalSpec.vol_create) { + // Specify null to get Autoselection (not empty string) +- var deviceName = finalSpec.vol_device_name ? finalSpec.vol_device_name : null; + finalSpec.block_device_mapping_v2 = []; + finalSpec.block_device_mapping_v2.push( + { +- 'device_name': deviceName, + 'source_type': SOURCE_TYPE_IMAGE, + 'destination_type': SOURCE_TYPE_VOLUME, + 'delete_on_termination': finalSpec.vol_delete_on_instance_delete, +Index: horizon-9.1.2/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js +=================================================================== +--- horizon-9.1.2.orig/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js ++++ horizon-9.1.2/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js +@@ -508,7 +508,6 @@ + + it('sets volume options appropriately', function() { + expect(model.newInstanceSpec.vol_create).toBe(false); +- expect(model.newInstanceSpec.vol_device_name).toBe('vda'); + expect(model.newInstanceSpec.vol_delete_on_instance_delete).toBe(false); + expect(model.newInstanceSpec.vol_size).toBe(1); + }); +@@ -530,7 +529,6 @@ + { id: 'demoId', name: 'demo' } ]; + model.newInstanceSpec.vol_create = true; + model.newInstanceSpec.vol_delete_on_instance_delete = true; +- model.newInstanceSpec.vol_device_name = "volTestName"; + model.newInstanceSpec.vol_size = 10; + + metadata = {'foo': 'bar'}; +@@ -558,7 +556,6 @@ + it('should set final spec in format required for Block Device Mapping v2', function() { + var finalSpec = model.createInstance(); + var expectedBlockDevice = [{ +- device_name: 'volTestName', + source_type: 'image', + destination_type: 'volume', + delete_on_termination: true, +@@ -590,8 +587,6 @@ + model.newInstanceSpec.vol_delete_on_instance_delete = 'yep'; + + var finalSpec = model.createInstance(); +- expect(finalSpec.block_device_mapping.volTestName) +- .toBe('imAnID:vol::yep'); + expect(finalSpec.source_id).toBe(''); + }); + +@@ -609,8 +604,6 @@ + model.newInstanceSpec.vol_delete_on_instance_delete = 'yep'; + + var finalSpec = model.createInstance(); +- expect(finalSpec.block_device_mapping.volTestName) +- .toBe('imAnID:snap::yep'); + expect(finalSpec.source_id).toBe(''); + }); + +@@ -667,15 +660,6 @@ + expect(finalSpec.nics).toEqual(finalNetworks); + }); + +- it('provides null for device_name when falsy', function() { +- model.newInstanceSpec.source_type.type = 'image'; +- model.newInstanceSpec.vol_device_name = false; +- model.newInstanceSpec.vol_create = true; +- +- var finalSpec = model.createInstance(); +- expect(finalSpec.block_device_mapping_v2[0].device_name).toBeNull(); +- }); +- + it('should not have meta property if no metadata specified', function() { + metadata = {}; + diff -Nru horizon-9.1.2/debian/patches/series horizon-9.1.2/debian/patches/series --- horizon-9.1.2/debian/patches/series 2018-03-15 13:45:43.000000000 -0400 +++ horizon-9.1.2/debian/patches/series 2019-04-16 10:45:32.000000000 -0400 @@ -7,3 +7,4 @@ fix_create_consistency_group_form_exception.patch let-nova-to-pick-availability-zone.patch hide-unused-consistency-groups.patch +drop-devicename-creating-server-with-image-boot-to-volume.patch