The patch is to fix the issue of linuxy devices names on Solaris
instance recorded in the bugs (19987962 and 19277019).
--- nova-13.0.0.0rc2/nova/compute/utils.py.~6~ 2016-03-31 01:46:45.489880535 -0800
+++ nova-13.0.0.0rc2/nova/compute/utils.py 2016-03-31 02:19:05.040013477 -0800
@@ -137,6 +137,24 @@ def get_next_device_name(instance, devic
name will be converted to the appropriate format.
"""
+ if (CONF.compute_driver and
+ prefix = 'c1d'
+ if device_name_list == []:
+ # Return the root device (c1d0)
+ return 'c1d0'
+
+ # Remove non-Solaris devices names (like, /dev/sda, sdb, ...)
+ # if they exist in the instance.
+ device_name_list = \
+ [dev for dev in device_name_list if prefix in dev]
+
+ # find the least unused number from '0' (root device)
+ used_nums = [int(dev.rsplit('d')[-1]) for dev in device_name_list]
+ diff = [i for i in range(len(used_nums) + 1) if i not in used_nums]
+ return prefix + str(min(diff))
+
req_prefix = None
req_letter = None