Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update only Puppet Modules from Stackforge (Master) #264

Merged
merged 12 commits into from
Feb 26, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update cinder to 8cc6d0e60ee6d9d0c1ebcf3523b07c3024c47064
8cc6d0e60ee6d9d0c1ebcf3523b07c3024c47064 Merge "Adds ability to override service name for service catalog"
e7830879336d5cae338567e41f121ee15628b9ac Adds ability to override service name for service catalog
abdc513f32476ba8f7cf7696529befd8bcfca3be Merge "Don't add a new line if the rbd_user changes"
3641ea9547e2ba9fb5107e160e76b57d576a5cb3 Don't add a new line if the rbd_user changes

Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
strider committed Feb 19, 2015
commit dae89d0f19860170fc327a027d420c37f15d810c
2 changes: 1 addition & 1 deletion Puppetfile
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ mod 'certmonger',
:git => 'https://github.com/rcritten/puppet-certmonger.git'

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

mod 'common',
3 changes: 3 additions & 0 deletions cinder/manifests/backend/rbd.pp
Original file line number Diff line number Diff line change
@@ -76,9 +76,11 @@
case $::osfamily {
'Debian': {
$override_line = "env CEPH_ARGS=\"--id ${rbd_user}\""
$override_match = '^env CEPH_ARGS='
}
'RedHat': {
$override_line = "export CEPH_ARGS=\"--id ${rbd_user}\""
$override_match = '^export CEPH_ARGS='
}
default: {
fail("unsuported osfamily ${::osfamily}, currently Debian and Redhat are the only supported platforms")
@@ -91,6 +93,7 @@
ensure_resource('file_line', 'set initscript env', {
line => $override_line,
path => $::cinder::params::ceph_init_override,
match => $override_match,
notify => Service['cinder-volume']
})

36 changes: 31 additions & 5 deletions cinder/manifests/keystone/auth.pp
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
# Username for Cinder service. Optional. Defaults to 'cinder'.
#
# [*auth_name_v2*]
# Username for Cinder v2 service. Optional. Defaults to 'cinder2'.
# Username for Cinder v2 service. Optional. Defaults to 'cinderv2'.
#
# [*configure_endpoint*]
# Should Cinder endpoint be configured? Optional. Defaults to 'true'.
@@ -30,6 +30,16 @@
# Should the admin role be configured for the service user?
# Optional. Defaults to 'true'.
#
# [*service_name*]
# (optional) Name of the service.
# Defaults to the value of auth_name, but must differ from the value
# of service_name_v2.
#
# [*service_name_v2*]
# (optional) Name of the v2 service.
# Defaults to the value of auth_name_v2, but must differ from the value
# of service_name.
#
# [*service_type*]
# Type of service. Optional. Defaults to 'volume'.
#
@@ -76,6 +86,8 @@
$configure_endpoint_v2 = true,
$configure_user = true,
$configure_user_role = true,
$service_name = undef,
$service_name_v2 = undef,
$service_type = 'volume',
$service_type_v2 = 'volumev2',
$public_address = '127.0.0.1',
@@ -88,15 +100,29 @@
$admin_protocol = 'http',
$internal_protocol = 'http'
) {
if $service_name {
$real_service_name = $service_name
} else {
$real_service_name = $auth_name
}
if $service_name_v2 {
$real_service_name_v2 = $service_name_v2
} else {
$real_service_name_v2 = $auth_name_v2
}

keystone::resource::service_identity { $auth_name:
if $real_service_name == $real_service_name_v2 {
fail('cinder::keystone::auth parameters service_name and service_name_v2 must be different.')
}
keystone::resource::service_identity { 'cinder':
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
service_type => $service_type,
service_description => 'Cinder Service',
service_name => $auth_name,
service_name => $real_service_name,
region => $region,
auth_name => $auth_name,
password => $password,
email => $email,
tenant => $tenant,
@@ -105,13 +131,13 @@
internal_url => "${internal_protocol}://${internal_address}:${port}/${volume_version}/%(tenant_id)s",
}

keystone::resource::service_identity { $auth_name_v2:
keystone::resource::service_identity { 'cinderv2':
configure_user => false,
configure_user_role => false,
configure_endpoint => $configure_endpoint_v2,
service_type => $service_type_v2,
service_description => 'Cinder Service v2',
service_name => $auth_name_v2,
service_name => $real_service_name_v2,
region => $region,
public_url => "${public_protocol}://${public_address}:${port}/v2/%(tenant_id)s",
admin_url => "${admin_protocol}://${admin_address}:${port}/v2/%(tenant_id)s",
18 changes: 18 additions & 0 deletions cinder/spec/classes/cinder_keystone_auth_spec.rb
Original file line number Diff line number Diff line change
@@ -132,4 +132,22 @@

end

describe 'when overriding service names' do

let :params do
req_params.merge(
:service_name => 'cinder_service',
:service_name_v2 => 'cinder_service_v2',
)
end

it { should contain_keystone_user('cinder') }
it { should contain_keystone_user_role('cinder@services') }
it { should contain_keystone_service('cinder_service') }
it { should contain_keystone_service('cinder_service_v2') }
it { should contain_keystone_endpoint('RegionOne/cinder_service') }
it { should contain_keystone_endpoint('RegionOne/cinder_service_v2') }

end

end