Revert "Fix the problem with ceph deployment on scale lab"

This reverts commit 43b25e4b20.

Closes-bug: #1466075

Change-Id: Ib44cf45fb90dca1c8512048d89ceba2b2d47c35b
This commit is contained in:
Ryan Moe 2015-06-17 15:29:41 -07:00 committed by Vladimir Kuklin
parent 1698c27d80
commit 2e7a08ad97
8 changed files with 55 additions and 146 deletions

View File

@ -115,8 +115,28 @@ class ceph (
'primary-controller', 'controller', 'ceph-mon': {
include ceph::mon
# DO NOT SPLIT ceph auth command lines! See http://tracker.ceph.com/issues/3279
ceph::pool {$glance_pool:
user => $glance_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${glance_pool}'",
keyring_owner => 'glance',
}
ceph::pool {$cinder_pool:
user => $cinder_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${cinder_pool}, allow rx pool=${glance_pool}'",
keyring_owner => 'cinder',
}
ceph::pool {$cinder_backup_pool:
user => $cinder_backup_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${cinder_backup_pool}, allow rx pool=${cinder_pool}'",
keyring_owner => 'cinder',
}
Class['ceph::conf'] -> Class['ceph::mon'] ->
Service['ceph']
Ceph::Pool[$glance_pool] -> Ceph::Pool[$cinder_pool] ->
Ceph::Pool[$cinder_backup_pool] -> Service['ceph']
if ($::ceph::use_rgw) {
include ceph::radosgw
@ -136,6 +156,27 @@ class ceph (
}
}
'compute': {
ceph::pool {$compute_pool:
user => $compute_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${cinder_pool}, allow rx pool=${glance_pool}, allow rwx pool=${compute_pool}'",
keyring_owner => 'nova',
}
include ceph::nova_compute
if ($ephemeral_ceph) {
include ceph::ephemeral
Class['ceph::conf'] -> Class['ceph::ephemeral'] ~>
Service[$::ceph::params::service_nova_compute]
}
Class['ceph::conf'] ->
Ceph::Pool[$compute_pool] ->
Class['ceph::nova_compute'] ~>
Service[$::ceph::params::service_nova_compute]
}
'ceph-mds': { include ceph::mds }
default: {}

View File

@ -1,91 +0,0 @@
notice('MODULAR: ceph/ceph_pools')
$storage_hash = hiera('storage', {})
$osd_pool_default_pg_num = $storage_hash['pg_num']
$osd_pool_default_pgp_num = $storage_hash['pg_num']
# Cinder settings
$cinder_user = 'volumes'
$cinder_pool = 'volumes'
# Cinder Backup settings
$cinder_backup_user = 'backups'
$cinder_backup_pool = 'backups'
# Glance settings
$glance_user = 'images'
$glance_pool = 'images'
#Nova Compute settings
$compute_user = 'compute'
$compute_pool = 'compute'
Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ],
cwd => '/root',
}
# DO NOT SPLIT ceph auth command lines! See http://tracker.ceph.com/issues/3279
ceph::pool {$glance_pool:
user => $glance_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${glance_pool}'",
keyring_owner => 'glance',
pg_num => $osd_pool_default_pg_num,
pgp_num => $osd_pool_default_pg_num,
}
ceph::pool {$cinder_pool:
user => $cinder_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${cinder_pool}, allow rx pool=${glance_pool}'",
keyring_owner => 'cinder',
pg_num => $osd_pool_default_pg_num,
pgp_num => $osd_pool_default_pg_num,
}
ceph::pool {$cinder_backup_pool:
user => $cinder_backup_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${cinder_backup_pool}, allow rx pool=${cinder_pool}'",
keyring_owner => 'cinder',
pg_num => $osd_pool_default_pg_num,
pgp_num => $osd_pool_default_pg_num,
}
ceph::pool {$compute_pool:
user => $compute_user,
acl => "mon 'allow r' osd 'allow class-read object_prefix rbd_children, allow rwx pool=${cinder_pool}, allow rx pool=${glance_pool}, allow rwx pool=${compute_pool}'",
keyring_owner => 'nova',
pg_num => $osd_pool_default_pg_num,
pgp_num => $osd_pool_default_pg_num,
}
Ceph::Pool[$glance_pool] -> Ceph::Pool[$cinder_pool] -> Ceph::Pool[$cinder_backup_pool] -> Ceph::Pool[$compute_pool]
if ($storage_hash['volumes_ceph']) {
include ::cinder::params
service { 'cinder-volume':
ensure => 'running',
name => $::cinder::params::volume_service,
hasstatus => true,
hasrestart => true,
}
Ceph::Pool[$cinder_pool] ~> Service['cinder-volume']
service { 'cinder-backup':
ensure => 'running',
name => $::cinder::params::backup_service,
hasstatus => true,
hasrestart => true,
}
Ceph::Pool[$cinder_backup_pool] ~> Service['cinder-backup']
}
if ($storage_hash['images_ceph']) {
include ::glance::params
service { 'glance-api':
ensure => 'running',
name => $::glance::params::api_service_name,
hasstatus => true,
hasrestart => true,
}
Ceph::Pool[$glance_pool] ~> Service['glance-api']
}

View File

@ -8,32 +8,6 @@
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/astute/enable_quorum.rb
timeout: 180
- id: ceph-compute
type: puppet
role: [compute]
requires: [ceph_create_pools]
required_for: [post_deployment_end]
condition: "settings:storage.objects_ceph.value == true or settings:storage.images_ceph.value == true or settings:storage.volumes_ceph.value == true or settings:storage.ephemeral_ceph.value == true"
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/astute/ceph_compute.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
cwd: /
test_post:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/astute/ceph_compute_post.rb
- id: ceph_create_pools
type: puppet
role: [primary-controller, controller]
requires: [post_deployment_start]
required_for: [ceph_ready_check]
condition: "settings:storage.objects_ceph.value == true or settings:storage.images_ceph.value == true or settings:storage.volumes_ceph.value == true or settings:storage.ephemeral_ceph.value == true"
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/astute/ceph_pools.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
cwd: /
- id: ceph_ready_check
type: shell
role: [primary-controller]

View File

@ -1,4 +1,4 @@
notice('MODULAR: astute/ceph_compute.pp')
notice('MODULAR: ceph/compute.pp')
$storage_hash = hiera('storage', {})
$controllers = hiera('controllers')
@ -66,24 +66,6 @@ if $use_ceph {
ephemeral_ceph => $storage_hash['ephemeral_ceph']
}
service { $::ceph::params::service_nova_compute :}
include ceph::nova_compute
if ($ephemeral_ceph) {
include ceph::ephemeral
Class['ceph::conf'] -> Class['ceph::ephemeral'] ~>
Service[$::ceph::params::service_nova_compute]
}
Class['ceph::conf'] ->
Class['ceph::nova_compute'] ~>
Service[$::ceph::params::service_nova_compute]
Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ],
cwd => '/root',
}
}

View File

@ -22,4 +22,14 @@
puppet_modules: /etc/puppet/modules
timeout: 3600
- id: ceph-compute
type: puppet
groups: [compute]
required_for: [deploy_end]
requires: [top-role-compute]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/ceph/compute.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
test_post:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/ceph/compute_post.rb

View File

@ -1,7 +0,0 @@
require 'spec_helper'
require 'shared-examples'
manifest = 'astute/ceph_compute.pp'
describe manifest do
test_ubuntu_and_centos manifest
end

View File

@ -1,6 +1,6 @@
require 'spec_helper'
require 'shared-examples'
manifest = 'astute/ceph_pools.pp'
manifest = 'ceph/compute.pp'
describe manifest do
test_ubuntu_and_centos manifest