Remove nova_volume

nova_volume has been depreciated, in favour of cinder.

Now that we are working on the Havana branch,
it seems like an appropriate time to remove it.

Change-Id: Ief063f92a719f950507d2ad8e21eb2cc44691bd0
This commit is contained in:
Logan McNaughton
2013-08-09 19:06:03 +00:00
parent 3f3ac56eb7
commit 13f8d8285e
10 changed files with 5 additions and 314 deletions

View File

@@ -6,18 +6,20 @@ class nova::keystone::auth(
$admin_address = '127.0.0.1',
$internal_address = '127.0.0.1',
$compute_port = '8774',
$volume_port = '8776',
$ec2_port = '8773',
$compute_version = 'v2',
$volume_version = 'v1',
$region = 'RegionOne',
$tenant = 'services',
$email = 'nova@localhost',
$configure_ec2_endpoint = true,
$cinder = false,
$cinder = undef,
$public_protocol = 'http'
) {
if $cinder != undef {
warning('cinder parameter is deprecated and has no effect.')
}
keystone_user { $auth_name:
ensure => present,
password => $password,
@@ -40,20 +42,6 @@ class nova::keystone::auth(
internal_url => "http://${internal_address}:${compute_port}/${compute_version}/%(tenant_id)s",
}
if $cinder == false {
keystone_service { "${auth_name}_volume":
ensure => present,
type => 'volume',
description => 'Volume Service',
}
keystone_endpoint { "${region}/${auth_name}_volume":
ensure => present,
public_url => "${public_protocol}://${public_address}:${volume_port}/${volume_version}/%(tenant_id)s",
admin_url => "http://${admin_address}:${volume_port}/${volume_version}/%(tenant_id)s",
internal_url => "http://${internal_address}:${volume_port}/${volume_version}/%(tenant_id)s",
}
}
if $configure_ec2_endpoint {
keystone_service { "${auth_name}_ec2":
ensure => present,

View File

@@ -18,7 +18,6 @@ class nova::params {
$objectstore_package_name = 'openstack-nova-objectstore'
$scheduler_package_name = 'openstack-nova-scheduler'
$tgt_package_name = 'scsi-target-utils'
$volume_package_name = 'openstack-nova-volume'
$vncproxy_package_name = 'openstack-nova-novncproxy'
$spicehtml5proxy_package_name = 'openstack-nova-console'
# service names
@@ -34,7 +33,6 @@ class nova::params {
$tgt_service_name = 'tgtd'
$vncproxy_service_name = 'openstack-nova-novncproxy'
$spicehtml5proxy_service_name = 'openstack-nova-spicehtml5proxy'
$volume_service_name = 'openstack-nova-volume'
# redhat specific config defaults
$root_helper = 'sudo nova-rootwrap'
$lock_path = '/var/lib/nova/tmp'
@@ -62,7 +60,6 @@ class nova::params {
$objectstore_package_name = 'nova-objectstore'
$scheduler_package_name = 'nova-scheduler'
$tgt_package_name = 'tgt'
$volume_package_name = 'nova-volume'
# service names
$api_service_name = 'nova-api'
$cert_service_name = 'nova-cert'
@@ -73,7 +70,6 @@ class nova::params {
$network_service_name = 'nova-network'
$objectstore_service_name = 'nova-objectstore'
$scheduler_service_name = 'nova-scheduler'
$volume_service_name = 'nova-volume'
$spicehtml5proxy_service_name = 'nova-spicehtml5proxy'
$tgt_service_name = 'tgt'
# debian specific nova config

View File

@@ -1,19 +0,0 @@
#
# configures nova::volume.
# This has been deprecated in favor of cinder
#
class nova::volume(
$enabled = false,
$ensure_package = 'present'
) {
include 'nova::params'
nova::generic_service { 'volume':
enabled => $enabled,
ensure_package => $ensure_package,
package_name => $::nova::params::volume_package_name,
service_name => $::nova::params::volume_service_name,
}
}

View File

@@ -1,82 +0,0 @@
# Class: nova::volume::iscsi
#
# iscsi is the default volume driver for OpenStack.
#
# [*Parameters*]
#
# [volume_group] Name of the volume group to use.
# Optional. Defaults to 'nova-volumes' - the OpenStack default.
#
# [iscsi_helper] Name of the iscsi helper to use.
# Optional. Defaults to 'tgtadm' - the OpenStack default.
#
# [iscsi_ip_address] IP address on the nova-volume server where
# compute nodes will connect to for volumes.
# Optional. Defaults to undef. OpenStack defaults to server IP.
#
# This class assumes that you have already configured your
# volume group - either by another module or during the server
# provisioning
#
class nova::volume::iscsi (
$volume_group = 'nova-volumes',
$iscsi_helper = 'tgtadm',
$iscsi_ip_address = undef
) {
include 'nova::params'
nova_config { 'DEFAULT/volume_group': value => $volume_group }
if $iscsi_ip_address {
nova_config { 'DEFAULT/iscsi_ip_address': value => $iscsi_ip_address }
}
case $iscsi_helper {
'tgtadm': {
package { 'tgt':
ensure => present,
name => $::nova::params::tgt_package_name,
}
service { 'tgtd':
ensure => running,
name => $::nova::params::tgt_service_name,
provider => $::nova::params::special_service_provider,
enable => true,
require => [Nova::Generic_service['volume'], Package['tgt']],
}
# This is the default, but might as well be verbose
nova_config { 'DEFAULT/iscsi_helper': value => 'tgtadm' }
}
'iscsitarget': {
package { 'iscsitarget':
ensure => present,
}
service { 'iscsitarget':
ensure => running,
enable => true,
require => [Nova::Generic_service['volume'], Package['iscsitarget']],
}
service { 'open-iscsi':
ensure => running,
enable => true,
require => Service['iscsitarget'],
}
package { 'iscsitarget-dkms':
ensure => present,
}
file { '/etc/default/iscsitarget':
content => "ISCSITARGET_ENABLE=true\n",
}
}
default: {
fail("Unsupported iscsi helper: ${iscsi_helper}. The supported iscsi helper are tgtadm, iscsitarget.")
}
}
}

View File

@@ -1,37 +0,0 @@
# Class: nova::volume::san
#
# This class assumes that you have already configured your
# volume group - either by another module or during the server
# provisioning
#
# SanISCSIDriver(nova.volume.driver.ISCSIDriver):
# SolarisISCSIDriver(SanISCSIDriver):
# HpSanISCSIDriver(SanISCSIDriver):
# SolidFireSanISCSIDriver(SanISCSIDriver):
#
class nova::volume::san (
$volume_driver = 'nova.volume.san.SolarisISCSIDriver',
$san_ip = '127.0.0.1',
$san_login = 'cluster_operator',
$san_password = '007',
$san_private_key = undef,
$san_clustername = 'storage_cluster'
) {
if $san_private_key {
nova_config { 'DEFAULT/san_private_key': value => $san_private_key }
} else {
nova_config {
'DEFAULT/san_login': value => $san_login;
'DEFAULT/san_password': value => $san_password, secret => true;
}
}
nova_config {
'DEFAULT/volume_driver': value => $volume_driver;
'DEFAULT/san_ip': value => $san_ip;
'DEFAULT/san_clustername': value => $san_clustername;
}
}

View File

@@ -24,12 +24,6 @@ describe 'nova::keystone::auth' do
:description => 'Openstack Compute Service'
)}
it { should contain_keystone_service('nova_volume').with(
:ensure => 'present',
:type => 'volume',
:description => 'Volume Service'
)}
it { should contain_keystone_service('nova_ec2').with(
:ensure => 'present',
:type => 'ec2',
@@ -43,13 +37,6 @@ describe 'nova::keystone::auth' do
:internal_url => 'http://127.0.0.1:8774/v2/%(tenant_id)s'
)}
it { should contain_keystone_endpoint('RegionOne/nova_volume').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
:admin_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s',
:internal_url => 'http://127.0.0.1:8776/v1/%(tenant_id)s'
)}
it { should contain_keystone_endpoint('RegionOne/nova_ec2').with(
:ensure => 'present',
:public_url => 'http://127.0.0.1:8773/services/Cloud',
@@ -80,12 +67,6 @@ describe 'nova::keystone::auth' do
:description => 'Openstack Compute Service'
)}
it { should contain_keystone_service('foo_volume').with(
:ensure => 'present',
:type => 'volume',
:description => 'Volume Service'
)}
it { should contain_keystone_service('foo_ec2').with(
:ensure => 'present',
:type => 'ec2',
@@ -101,9 +82,7 @@ describe 'nova::keystone::auth' do
:admin_address => '10.0.0.2',
:internal_address => '10.0.0.3',
:compute_port => '9774',
:volume_port => '9776',
:ec2_port => '9773',
:volume_version => 'v2.1',
:compute_version => 'v2.2',
:region => 'RegionTwo'
)
@@ -116,13 +95,6 @@ describe 'nova::keystone::auth' do
:internal_url => 'http://10.0.0.3:9774/v2.2/%(tenant_id)s'
)}
it { should contain_keystone_endpoint('RegionTwo/nova_volume').with(
:ensure => 'present',
:public_url => 'http://10.0.0.1:9776/v2.1/%(tenant_id)s',
:admin_url => 'http://10.0.0.2:9776/v2.1/%(tenant_id)s',
:internal_url => 'http://10.0.0.3:9776/v2.1/%(tenant_id)s'
)}
it { should contain_keystone_endpoint('RegionTwo/nova_ec2').with(
:ensure => 'present',
:public_url => 'http://10.0.0.1:9773/services/Cloud',

View File

@@ -1,59 +0,0 @@
require 'spec_helper'
describe 'nova::volume::iscsi' do
describe 'on debian platforms' do
let :facts do
{ :osfamily => 'Debian' }
end
it { should contain_service('tgtd').with(
'name' => 'tgt',
'provider' => 'upstart',
# FIXME(fc): rspec complains this value is 'nil' in the catalog
#'ensure' => 'stopped',
'enable' => true
)}
it { should contain_package('tgt').with_name('tgt') }
describe 'and more specifically on debian os' do
let :facts do
{ :osfamily => 'Debian', :operatingsystem => 'Debian' }
end
it { should contain_service('tgtd').with(
'provider' => nil
)}
end
describe 'and more specifically on debian os with iscsitarget helper' do
let :facts do
{ :osfamily => 'Debian', :operatingsystem => 'Debian' }
end
let :params do
{:iscsi_helper => 'iscsitarget'}
end
it { should contain_package('iscsitarget') }
it { should contain_service('iscsitarget').with_enable(true) }
it { should contain_service('open-iscsi').with_enable(true) }
it { should contain_package('iscsitarget-dkms') }
it { should contain_file('/etc/default/iscsitarget') }
end
it { should contain_nova_config('DEFAULT/volume_group').with_value('nova-volumes') }
it { should_not contain_nova_config('DEFAULT/iscsi_ip_address') }
end
describe 'on rhel' do
let :facts do
{ :osfamily => 'RedHat' }
end
it { should contain_service('tgtd').with(
'name' => 'tgtd',
# FIXME(fc): rspec complains this value is 'nil' in the catalog
#'ensure' => 'stopped',
'enable' => true
)}
it { should contain_package('tgt').with_name('scsi-target-utils')}
end
end

View File

@@ -1,56 +0,0 @@
require 'spec_helper'
describe 'nova::volume' do
let :pre_condition do
'include nova'
end
describe 'on debian platforms' do
let :facts do
{ :osfamily => 'Debian' }
end
it { should contain_service('nova-volume').with(
'name' => 'nova-volume',
'ensure' => 'stopped',
'hasstatus' => true,
'enable' => false
)}
it { should contain_package('nova-volume').with(
'name' => 'nova-volume',
'ensure' => 'present',
'notify' => 'Service[nova-volume]'
)}
describe 'with enabled as true' do
let :params do
{:enabled => true}
end
it { should contain_service('nova-volume').with(
'name' => 'nova-volume',
'ensure' => 'running',
'hasstatus' => true,
'enable' => true
)}
end
describe 'with package version' do
let :params do
{:ensure_package => '2012.1-2'}
end
it { should contain_package('nova-volume').with(
'ensure' => '2012.1-2'
)}
end
end
describe 'on rhel' do
let :facts do
{ :osfamily => 'RedHat' }
end
it { should contain_service('nova-volume').with(
'name' => 'openstack-nova-volume',
'ensure' => 'stopped',
'hasstatus' => true,
'enable' => false
)}
it { should contain_package('nova-volume').with_name('openstack-nova-volume') }
end
end

View File

@@ -157,12 +157,6 @@ class { 'nova::objectstore':
enabled => true
}
class { 'nova::volume':
enabled => true
}
class { 'nova::volume::iscsi': }
class { 'nova::cert':
enabled => true
}

View File

@@ -180,12 +180,6 @@ node /controller/ {
enabled => true
}
class { 'nova::volume':
enabled => true,
}
class { 'nova::volume::iscsi': }
######## Horizon ########
class { 'memcached':