Skip to content

Commit

Permalink
Update cinder to 59f9e2c07f2a2fe981322e77b12d4862fe599a57
Browse files Browse the repository at this point in the history
59f9e2c07f2a2fe981322e77b12d4862fe599a57 Merge "Cinder should use lioadm on Fedora"
8234d4471898339388d8550cacacb5dbaede1acd Merge "Support the enable_v*_api settings"
39b28be81733f2dfe899df63739dec6a2dc98cb9 Cinder should use lioadm on Fedora
709a2b7e3ed490747efbd7df4417ed05a8e34edd Support the enable_v*_api settings
6c47d9f4bc09a24e8ed7f2e5a1f906e047c143b0 Add Puppet 4.x lint checks
  • Loading branch information
xbezdick committed Mar 3, 2015
1 parent 402a16a commit d6cf2bb
Show file tree
Hide file tree
Showing 19 changed files with 63 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mod 'certmonger',
:git => 'https://github.com/rcritten/puppet-certmonger.git'

mod 'cinder',
:commit => '8cc6d0e60ee6d9d0c1ebcf3523b07c3024c47064',
:commit => '59f9e2c07f2a2fe981322e77b12d4862fe599a57',
:git => 'https://github.com/stackforge/puppet-cinder.git'

mod 'common',
Expand Down
12 changes: 11 additions & 1 deletion cinder/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,19 @@ source 'https://rubygems.org'

group :development, :test do
gem 'puppetlabs_spec_helper', :require => false

gem 'puppet-lint', '~> 1.1'
gem 'rspec-puppet', '~> 1.0.1'
gem 'puppet-lint-param-docs', '1.1.0'
gem 'puppet-lint-absolute_classname-check'
gem 'puppet-lint-absolute_template_path'
gem 'puppet-lint-trailing_newline-check'
# Puppet 4.x related lint checks
gem 'puppet-lint-unquoted_string-check'
gem 'puppet-lint-leading_zero-check'
gem 'puppet-lint-variable_contains_upcase'
gem 'puppet-lint-numericvariable'

gem 'rspec-puppet', '~> 1.0.1'
gem 'rake', '10.1.1'
gem 'rspec', '< 2.99'
gem 'json'
Expand Down
6 changes: 3 additions & 3 deletions cinder/examples/cinder_volume_with_pacemaker.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@
#
# sudo pcs constraint colocation add cinder_api_service with cinder_vip

class { 'cinder':
class { '::cinder':
database_connection => 'mysql://cinder:[email protected]/cinder',
}

class { 'cinder::api':
class { '::cinder::api':
keystone_password => 'CINDER_PW',
keystone_user => 'cinder',
enabled => false,
manage_service => false,
}

class { 'cinder::scheduler':
class { '::cinder::scheduler':
scheduler_driver => 'cinder.scheduler.simple.SimpleScheduler',
enabled => false,
manage_service => false,
Expand Down
4 changes: 2 additions & 2 deletions cinder/manifests/api.pp
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
$validation_options = {},
) {

include cinder::params
include cinder::policy
include ::cinder::params
include ::cinder::policy

Cinder_config<||> ~> Service['cinder-api']
Cinder_api_paste_ini<||> ~> Service['cinder-api']
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/backend/emc_vnx.pp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
$volume_backend_name = $name,
) {

include cinder::params
include ::cinder::params

cinder_config {
"${name}/default_timeout": value => $default_timeout;
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/backend/iscsi.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
$iscsi_helper = $::cinder::params::iscsi_helper,
) {

include cinder::params
include ::cinder::params

cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/backend/rbd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
$rbd_max_clone_depth = '5',
) {

include cinder::params
include ::cinder::params

cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/backup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
$backup_name_template = 'backup-%s'
) {

include cinder::params
include ::cinder::params

Cinder_config<||> ~> Service['cinder-backup']
Exec<| title == 'cinder-manage db_sync' |> ~> Service['cinder-backup']
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
$package_ensure = 'present'
) {

include cinder::params
include ::cinder::params

package { 'python-cinderclient':
ensure => $package_ensure,
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/db/sync.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
class cinder::db::sync {

include cinder::params
include ::cinder::params

exec { 'cinder-manage db_sync':
command => $::cinder::params::db_sync_command,
Expand Down
19 changes: 18 additions & 1 deletion cinder/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@
# (Optional)
# Defaults to '/etc/cinder/api-paste.ini',
#
# [*enable_v1_api*]
# (Optional) Whether to enable the v1 API (true/false).
# This will be deprecated in Kilo.
# Defaults to 'true'.
#
# [*enable_v2_api*]
# (Optional) Whether to enable the v1 API (true/false).
# Defaults to 'true'.
#
# === Deprecated Parameters
#
# [*mysql_module*]
Expand Down Expand Up @@ -250,11 +259,13 @@
$debug = false,
$storage_availability_zone = 'nova',
$default_availability_zone = false,
$enable_v1_api = true,
$enable_v2_api = true,
# DEPRECATED PARAMETERS
$mysql_module = undef,
) {

include cinder::params
include ::cinder::params

Package['cinder'] -> Cinder_config<||>
Package['cinder'] -> Cinder_api_paste_ini<||>
Expand Down Expand Up @@ -489,4 +500,10 @@
}
}

# V1/V2 APIs
cinder_config {
'DEFAULT/enable_v1_api': value => $enable_v1_api;
'DEFAULT/enable_v2_api': value => $enable_v2_api;
}

}
2 changes: 1 addition & 1 deletion cinder/manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
}
}
default: {
$iscsi_helper = 'tgtadm'
$iscsi_helper = 'lioadm'
}
}

Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/qpid.pp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
$service_ensure = 'stopped'
}

class { 'qpid::server':
class { '::qpid::server':
service_ensure => $service_ensure
}

Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/scheduler.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
$manage_service = true
) {

include cinder::params
include ::cinder::params

Cinder_config<||> ~> Service['cinder-scheduler']
Cinder_api_paste_ini<||> ~> Service['cinder-scheduler']
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/type_set.pp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
exec {"cinder type-key ${type} set ${key}=${name}":
path => ['/usr/bin', '/bin'],
command => "cinder type-key ${type} set ${key}=${name}",
unless => "cinder extra-specs-list | grep -Eq '\b${type}\b.*\b${key}\b.*\b${name}\b'",
unless => "cinder extra-specs-list | grep -Eq '\\b${type}\\b.*\\b${key}\\b.*\\b${name}\\b'",
environment => concat($cinder_env, $region_env),
require => Package['python-cinderclient']
}
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/volume.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
$manage_service = true
) {

include cinder::params
include ::cinder::params

Cinder_config<||> ~> Service['cinder-volume']
Cinder_api_paste_ini<||> ~> Service['cinder-volume']
Expand Down
2 changes: 1 addition & 1 deletion cinder/manifests/volume/iscsi.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
$iscsi_helper = $::cinder::params::iscsi_helper,
) {

include cinder::params
include ::cinder::params

cinder::backend::iscsi { 'DEFAULT':
iscsi_ip_address => $iscsi_ip_address,
Expand Down
13 changes: 13 additions & 0 deletions cinder/spec/classes/cinder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -379,4 +379,17 @@
end
end

describe 'with APIs set for Kilo (proposed)' do
let :params do
{
:enable_v1_api => false,
:enable_v2_api => true,
:rabbit_password => 'guest',
}
end

it { should contain_cinder_config('DEFAULT/enable_v1_api').with_value(false) }
it { should contain_cinder_config('DEFAULT/enable_v2_api').with_value(true) }

end
end
4 changes: 3 additions & 1 deletion cinder/spec/classes/cinder_volume_iscsi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
end

let :facts do
{:osfamily => 'RedHat'}
{:osfamily => 'RedHat',
:operatingsystem => 'RedHat',
:operatingsystemmajrelease => '6'}
end

it { should contain_file_line('cinder include').with(
Expand Down

0 comments on commit d6cf2bb

Please sign in to comment.