PSARC/2016/242 Nova boot volume placement
21678974 cinder volume for rpool should be possible to be placed on desired storage
--- a/components/openstack/nova/files/nova.conf Wed May 25 05:30:40 2016 -0700
+++ b/components/openstack/nova/files/nova.conf Wed Jun 01 11:04:21 2016 -0700
@@ -1828,6 +1828,14 @@
# Options defined in nova.virt.solariszones.driver
#
+# Cinder volume type solariszones driver will use for creation
+# of instance boot volumes
+#boot_volume_type=<None>
+
+# Cinder availability zone solariszones driver will use for
+# creation of instance boot volumes
+#boot_volume_az=<None>
+
# Default path to Glance cache for Solaris Zones. (string
# value)
#glancecache_dirname=/var/share/nova/images
--- a/components/openstack/nova/files/solariszones/driver.py Wed May 25 05:30:40 2016 -0700
+++ b/components/openstack/nova/files/solariszones/driver.py Wed Jun 01 11:04:21 2016 -0700
@@ -79,6 +79,12 @@
from nova.volume.cinder import _untranslate_volume_summary_view
solariszones_opts = [
+ cfg.StrOpt('boot_volume_type',
+ default=None,
+ help='Cinder volume type to use for boot volumes'),
+ cfg.StrOpt('boot_volume_az',
+ default=None,
+ help='Cinder availability zone to use for boot volumes'),
cfg.StrOpt('glancecache_dirname',
default='/var/share/nova/images',
help='Default path to Glance cache for Solaris Zones.'),
@@ -1162,13 +1168,17 @@
def _create_boot_volume(self, context, instance):
"""Create a (Cinder) volume service backed boot volume"""
+ boot_vol_az = CONF.boot_volume_az
+ boot_vol_type = CONF.boot_volume_type
try:
vol = self._volume_api.create(
context,
instance['root_gb'],
instance['hostname'] + "-" + self._rootzpool_suffix,
"Boot volume for instance '%s' (%s)"
- % (instance['name'], instance['uuid']))
+ % (instance['name'], instance['uuid']),
+ volume_type=boot_vol_type,
+ availability_zone=boot_vol_az)
# TODO(npower): Polling is what nova/compute/manager also does when
# creating a new volume, so we do likewise here.
while True: