Use Cinder multibackend by default
authorYanis Guenane <yanis.guenane@enovance.com>
Mon, 9 Mar 2015 11:17:31 +0000 (12:17 +0100)
committerYanis Guenane <yanis.guenane@enovance.com>
Thu, 12 Mar 2015 11:05:51 +0000 (07:05 -0400)
Currently Cinder iscsi backend is configured within the DEFAULT section.
Since we aim to support multibackend, this commit puts the iscsi backend
in its own section and enable it by default configuring it properly.
Also adds a parameter which can be used to disable the default backend.

Co-Authored-By: Giulio Fidente <gfidente@redhat.com>
Change-Id: I05fb44b59829c0afa8a6588956a48320f2f65159

cinder-storage.yaml
controller.yaml
overcloud-without-mergepy.yaml
puppet/cinder-storage-puppet.yaml
puppet/controller-puppet.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_volume.pp

index 0f12223..895b9d5 100644 (file)
@@ -4,6 +4,10 @@ parameters:
   Image:
     default: overcloud-cinder-volume
     type: string
+  CinderEnableIscsiBackend:
+    default: true
+    description: Whether to enable or not the Iscsi backend for Cinder
+    type: boolean
   CinderISCSIHelper:
     default: tgtadm
     description: The iSCSI helper to use with cinder.
index a5ebab4..52efa31 100644 (file)
@@ -24,6 +24,10 @@ parameters:
     description: The password for the ceilometer service account.
     type: string
     hidden: true
+  CinderEnableIscsiBackend:
+    default: true
+    description: Whether to enable or not the Iscsi backend for Cinder
+    type: boolean
   CinderISCSIHelper:
     default: tgtadm
     description: The iSCSI helper to use with cinder.
index c311a47..10e8336 100644 (file)
@@ -38,6 +38,10 @@ parameters:
     default: ''
     description: The Ceph admin client key.
     type: string
+  CinderEnableIscsiBackend:
+    default: true
+    description: Whether to enable or not the Iscsi backend for Cinder
+    type: boolean
   CloudName:
     default: ''
     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
@@ -510,6 +514,7 @@ resources:
           CinderLVMLoopDeviceSize: {get_param: CinderLVMLoopDeviceSize}
           CinderPassword: {get_param: CinderPassword}
           CinderISCSIHelper: {get_param: CinderISCSIHelper}
+          CinderEnableIscsiBackend: {get_param: CinderEnableIscsiBackend}
           CloudName: {get_param: CloudName}
           ControlVirtualInterface: {get_param: ControlVirtualInterface}
           ControllerExtraConfig: {get_param: controllerExtraConfig}
@@ -632,6 +637,8 @@ resources:
           Image: {get_param: BlockStorageImage}
           CinderISCSIHelper: {get_param: CinderISCSIHelper}
           CinderLVMLoopDeviceSize: {get_param: CinderLVMLoopDeviceSize}
+          # Purpose of the dedicated BlockStorage nodes should be to use their local LVM
+          CinderEnableIscsiBackend: {get_param: CinderEnableIscsiBackend}
           VirtualIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
           KeyName: {get_param: KeyName}
           Flavor: {get_param: OvercloudBlockStorageFlavor}
@@ -837,7 +844,7 @@ resources:
 
   BlockStorageNodesPostDeployment:
     type: OS::TripleO::BlockStoragePostDeployment
-    depends_on: BlockStorageAllNodesDeployment
+    depends_on: [ControllerNodesPostDeployment, BlockStorageAllNodesDeployment]
     properties:
       servers: {get_attr: [BlockStorage, attributes, nova_server_resource]}
 
index 6ad4d34..2f7a04c 100644 (file)
@@ -4,6 +4,10 @@ parameters:
   Image:
     default: overcloud-cinder-volume
     type: string
+  CinderEnableIscsiBackend:
+    default: true
+    description: Whether to enable or not the Iscsi backend for Cinder
+    type: boolean
   CinderISCSIHelper:
     default: tgtadm
     description: The iSCSI helper to use with cinder.
@@ -115,6 +119,7 @@ resources:
             template: sizeM
             params:
               size: {get_param: CinderLVMLoopDeviceSize}
+        cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
         rabbit_hosts:
           str_replace:
@@ -148,17 +153,20 @@ resources:
             volume:
               raw_data: {get_file: hieradata/volume.yaml}
               oac_data:
-                cinder::volume::iscsi::iscsi_ip_address: local-ipv4
+                cinder_iscsi_ip_address: local-ipv4
               mapped_data:
                 # Cinder
                 cinder::setup_test_volume::size: {get_input: cinder_lvm_loop_device_size}
-                cinder::volume::iscsi::iscsi_helper: {get_input: cinder_iscsi_helper}
+                cinder_iscsi_helper: {get_input: cinder_iscsi_helper}
                 cinder::database_connection: {get_input: cinder_dsn}
                 cinder::rabbit_hosts: {get_input: rabbit_hosts}
                 cinder::rabbit_userid: {get_input: rabbit_username}
                 cinder::rabbit_password: {get_input: rabbit_password}
+                cinder_enable_iscsi_backend: {get_input: cinder_enable_iscsi_backend}
                 ntp::servers: {get_input: ntp_servers}
                 enable_package_install: {get_input: enable_package_install}
+                snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
+                snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
 
 outputs:
   hosts_entry:
@@ -168,3 +176,7 @@ outputs:
         params:
           IP: {get_attr: [BlockStorage, networks, ctlplane, 0]}
           HOST: {get_attr: [BlockStorage, name]}
+  nova_server_resource:
+    description: Heat resource handle for the block storage server
+    value:
+      {get_resource: BlockStorage}
index 3e2957f..798596f 100644 (file)
@@ -24,6 +24,10 @@ parameters:
     description: The password for the ceilometer service account.
     type: string
     hidden: true
+  CinderEnableIscsiBackend:
+    default: true
+    description: Whether to enable or not the Iscsi backend for Cinder
+    type: boolean
   CinderISCSIHelper:
     default: tgtadm
     description: The iSCSI helper to use with cinder.
@@ -439,6 +443,7 @@ resources:
         debug: {get_param: Debug}
         cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
         cinder_password: {get_param: CinderPassword}
+        cinder_enable_iscsi_backend: {get_param: CinderEnableIscsiBackend}
         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
         cinder_dsn:
           list_join:
@@ -602,14 +607,15 @@ resources:
                 tripleo::ringbuilder::build_ring: True
                 # Cinder
                 cinder_lvm_loop_device_size: {get_input: cinder_lvm_loop_device_size}
-                cinder::volume::iscsi::iscsi_helper: {get_input: cinder_iscsi_helper}
-                cinder::volume::iscsi::iscsi_ip_address: {get_input: controller_host}
+                cinder_iscsi_helper: {get_input: cinder_iscsi_helper}
+                cinder_iscsi_ip_address: {get_input: controller_host}
                 cinder::database_connection: {get_input: cinder_dsn}
                 cinder::api::keystone_password: {get_input: cinder_password}
                 cinder::api::keystone_auth_host: {get_input: controller_virtual_ip}
                 cinder::api::bind_host: {get_input: controller_host}
                 cinder::rabbit_userid: {get_input: rabbit_username}
                 cinder::rabbit_password: {get_input: rabbit_password}
+                cinder_enable_iscsi_backend: {get_input: cinder_enable_iscsi_backend}
                 #cinder::debug: {get_input: debug}
                 # Glance
                 glance::api::bind_port: {get_input: glance_port}
index fef749c..c9af578 100644 (file)
@@ -258,11 +258,25 @@ if hiera('step') >= 2 {
   include ::cinder::glance
   include ::cinder::scheduler
   include ::cinder::volume
-  include ::cinder::volume::iscsi
   class {'cinder::setup_test_volume':
     size => join([hiera('cinder_lvm_loop_device_size'), 'M']),
   }
 
+  $cinder_enable_iscsi = hiera('cinder_enable_iscsi_backend', true)
+  if $cinder_enable_iscsi {
+    $cinder_iscsi_backend = 'tripleo_iscsi'
+
+    cinder::backend::iscsi { $cinder_iscsi_backend :
+      iscsi_ip_address => hiera('cinder_iscsi_ip_address'),
+      iscsi_helper     => hiera('cinder_iscsi_helper'),
+    }
+  }
+
+  $cinder_enabled_backends = any2array($cinder_iscsi_backend)
+  class { '::cinder::backends' :
+    enabled_backends => $cinder_enabled_backends,
+  }
+
   # swift proxy
   include ::memcached
   include ::swift::proxy
index b433321..3d7cb49 100644 (file)
@@ -30,9 +30,23 @@ if count(hiera('ntp::servers')) > 0 {
 
 include ::cinder
 include ::cinder::volume
-include ::cinder::volume::iscsi
 include ::cinder::setup_test_volume
 
+$cinder_enable_iscsi = hiera('cinder_enable_iscsi_backend', true)
+if $cinder_enable_iscsi {
+  $cinder_iscsi_backend = 'tripleo_iscsi'
+
+  cinder::backend::iscsi { $cinder_iscsi_backend :
+    iscsi_ip_address => hiera('cinder_iscsi_ip_address'),
+    iscsi_helper     => hiera('cinder_iscsi_helper'),
+  }
+}
+
+$cinder_enabled_backends = any2array($cinder_iscsi_backend)
+class { '::cinder::backends' :
+  enabled_backends => $cinder_enabled_backends,
+}
+
 $snmpd_user = hiera('snmpd_readonly_user_name')
 snmp::snmpv3_user { $snmpd_user:
   authtype => 'MD5',