Puppet Class: cinder::volume
- Defined in:
- manifests/volume.pp
Overview
Class: cinder::volume
Parameters
- package_ensure
- 
(Optional) The state of the package. Defaults to ‘present’. 
- enabled
- 
(Optional) The state of the service (boolean value) Defaults to true. 
- manage_service
- 
(Optional) Whether to start/stop the service (boolean value) Defaults to true. 
- cluster
- 
(Optional) Cluster name when running in active/active mode. Defaults to $facts. 
- volume_clear
- 
(Optional) Method used to wipe old volumes. Defaults to $facts. 
- volume_clear_size
- 
(Optional) Size in MiB to wipe at start of old volumes. Set to ‘0’ means all. Defaults to $facts. 
- volume_clear_ionice
- 
(Optional) The flag to pass to ionice to alter the i/o priority of the process used to zero a volume after deletion, for example “-c3” for idle only priority. Defaults to $facts. 
- migration_create_volume_timeout_secs
- 
(Optional) Timeout for creating the volume to migrate to when performing volume migration (seconds). Defaults to $facts. 
- volume_service_inithost_offload
- 
(Optional) Offload pending volume delete during volume service startup. Defaults to $facts. 
- reinit_driver_count
- 
(Optional) Maximum times to reinitialize the driver if volume initialization fails. Defaults to $facts. 
- init_host_max_objects_retrieval
- 
(Optional) Max number of volumes and snapshots to be retrieved per batch during volume manager host initialization. Defaults to $facts. 
- backend_stats_polling_interval
- 
(Optional) Time in seconds between requests for usage statistics from the backend. Defaults to $facts. 
| 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | # File 'manifests/volume.pp', line 60
class cinder::volume (
  $package_ensure                       = 'present',
  $enabled                              = true,
  $manage_service                       = true,
  $cluster                              = $facts['os_service_default'],
  $volume_clear                         = $facts['os_service_default'],
  $volume_clear_size                    = $facts['os_service_default'],
  $volume_clear_ionice                  = $facts['os_service_default'],
  $migration_create_volume_timeout_secs = $facts['os_service_default'],
  $volume_service_inithost_offload      = $facts['os_service_default'],
  $reinit_driver_count                  = $facts['os_service_default'],
  $init_host_max_objects_retrieval      = $facts['os_service_default'],
  $backend_stats_polling_interval       = $facts['os_service_default'],
) {
  include cinder::deps
  include cinder::params
  validate_legacy(Boolean, 'validate_bool', $manage_service)
  validate_legacy(Boolean, 'validate_bool', $enabled)
  if $::cinder::params::volume_package {
    package { 'cinder-volume':
      ensure => $package_ensure,
      name   => $::cinder::params::volume_package,
      tag    => ['openstack', 'cinder-package'],
    }
  }
  if $manage_service {
    if $enabled {
      $ensure = 'running'
    } else {
      $ensure = 'stopped'
    }
    service { 'cinder-volume':
      ensure    => $ensure,
      name      => $::cinder::params::volume_service,
      enable    => $enabled,
      hasstatus => true,
      tag       => 'cinder-service',
    }
  }
  cinder_config {
    'DEFAULT/cluster':                              value => $cluster;
    'DEFAULT/volume_clear':                         value => $volume_clear;
    'DEFAULT/volume_clear_size':                    value => $volume_clear_size;
    'DEFAULT/volume_clear_ionice':                  value => $volume_clear_ionice;
    'DEFAULT/migration_create_volume_timeout_secs': value => $migration_create_volume_timeout_secs;
    'DEFAULT/volume_service_inithost_offload':      value => $volume_service_inithost_offload;
    'DEFAULT/reinit_driver_count':                  value => $reinit_driver_count;
    'DEFAULT/init_host_max_objects_retrieval':      value => $init_host_max_objects_retrieval;
    'DEFAULT/backend_stats_polling_interval':       value => $backend_stats_polling_interval;
  }
} |