From f3a00d219c303fee43f7cb64e4def6604ee54421 Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Wed, 8 Jan 2014 03:12:59 +0100 Subject: [PATCH] storage: remove journal/pools (managed upstream) now --- manifests/storage/rbd/journal.pp | 39 ----------------- manifests/storage/rbd/pools.pp | 73 -------------------------------- 2 files changed, 112 deletions(-) delete mode 100644 manifests/storage/rbd/journal.pp delete mode 100644 manifests/storage/rbd/pools.pp diff --git a/manifests/storage/rbd/journal.pp b/manifests/storage/rbd/journal.pp deleted file mode 100644 index 31f0e523..00000000 --- a/manifests/storage/rbd/journal.pp +++ /dev/null @@ -1,39 +0,0 @@ -# -# Copyright (C) 2014 eNovance SAS -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# -# -# -define privatecloud::storage::rbd::journal ( - $ceph_osd_device = $name -) { - - $osd_id_fact = "ceph_osd_id_${ceph_osd_device}1" - $osd_id = inline_template('<%= scope.lookupvar(osd_id_fact) or "undefined" %>') - - if $osd_id != 'undefined' { - $osd_data = regsubst($::ceph::conf::osd_data, '\$id', $osd_id) - - file { "${osd_data}/journal": - ensure => link, - target => "/dev/mapper/rootfs-journal--${ceph_osd_device}1", - owner => 'root', - group => 'root', - mode => '0660', - require => Mount[$osd_data], - before => Service["ceph-osd.${osd_id}"] - } - } - -} diff --git a/manifests/storage/rbd/pools.pp b/manifests/storage/rbd/pools.pp deleted file mode 100644 index 5a94afaa..00000000 --- a/manifests/storage/rbd/pools.pp +++ /dev/null @@ -1,73 +0,0 @@ -# -# Copyright (C) 2014 eNovance SAS -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. -# Class:: privatecloud::storage::pools() -# -# -class privatecloud::storage::rbd::pools( - $setup_pools = false, - $glance_pool = 'ceph_glance', - $glance_user = 'glance', - $cinder_pool = 'ceph_cinder', - $cinder_user = 'cinder', - $cinder_backup_user = 'cinder', - $cinder_backup_pool = 'ceph_backup_cinder') { - - if $setup_pools { - - exec { 'create_glance_images_pool': - # TODO(leseb): point PG num with a cluster variable + keyring - command => "ceph osd pool create ${::glance_pool} 128 128", - unless => "rados lspools | grep -sq ${::glance_pool}", - require => Ceph::Key['admin']; - } - - exec { 'create_glance_images_user_and_key': - # TODO(leseb): point PG num with a cluster variable + keyring - command => "\ -ceph auth get-or-create client.${::glance_user} mon 'allow r' \ -osd 'allow class-read object_prefix rbd_children, allow rwx pool=images'", - unless => "ceph auth list | egrep '^${::glance_pool}$'", - require => Exec['create_glance_images_pool']; - } - - - exec { 'create_cinder_volumes_pool': - # TODO(leseb): point PG num with a cluster variable + keyring - command => "/usr/bin/ceph osd pool create ${::cinder_pool} 128 128", - unless => "/usr/bin/rados lspools | grep -sq ${::cinder_pool}", - require => Ceph::Key['admin']; - } - - exec { 'create_cinder_volumes_user_and_key': - # TODO(leseb): point PG num with a cluster variable + keyring - command => "ceph auth get-or-create client.${::cinder_user} mon 'allow r' \ -osd 'allow class-read object_prefix rbd_children, allow rwx pool=${::glance_pool}, allow rx pool=${::cinder_pool}'", - unless => "ceph auth list | egrep '^${::cinder_pool}$'", - require => Exec['create_cinder_volumes_pool']; - } - -# exec { "create cinder backup pool": -# # TODO(leseb): point PG num with a cluster variable + keyring -# command => "/usr/bin/ceph osd pool create ${::cinder_backup_pool} 128 128", -# command => "\ -#ceph auth get-or-create client.${::cinder_backup_user} mon 'allow r' \ -#osd 'allow class-read object_prefix rbd_children, allow rwx pool=${::cinder_backup_pool}'", -# unless => "/usr/bin/rados lspools | grep -sq ${::cinder_backup_pool}", -# unless => "ceph auth list | egrep '^${::cinder_backup_pool}$'", -# require => Ceph::Key['admin'], -# } - } - -}