summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-02 12:23:56 +0000
committerGerrit Code Review <review@openstack.org>2015-11-02 12:23:56 +0000
commit619ea4cf90b42b5654982bda96d4f3e7183aa3b5 (patch)
tree47b96345a0877a27c42fe6f42641be6a8b2c6005
parentd9e24c15b1485ed7fe025b987f7fad75f1109454 (diff)
parent3729e63b59b36615180e64ffdab9e1f6fd66796e (diff)
Merge "Support NFS backend for Glance (via Pacemaker)"
-rw-r--r--environments/storage-environment.yaml2
-rw-r--r--puppet/controller.yaml32
-rw-r--r--puppet/hieradata/controller.yaml1
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp10
4 files changed, 44 insertions, 1 deletions
diff --git a/environments/storage-environment.yaml b/environments/storage-environment.yaml
index 535ec6fe..5ccfa58e 100644
--- a/environments/storage-environment.yaml
+++ b/environments/storage-environment.yaml
@@ -1,7 +1,7 @@
## A Heat environment file which can be used to set up storage
## backends. Defaults to Ceph used as a backend for Cinder, Glance and
## Nova ephemeral storage.
-parameters:
+parameter_defaults:
#### BACKEND SELECTION ####
diff --git a/puppet/controller.yaml b/puppet/controller.yaml
index dc6c338d..98c7ba00 100644
--- a/puppet/controller.yaml
+++ b/puppet/controller.yaml
@@ -180,6 +180,30 @@ parameters:
type: string
constraints:
- allowed_values: ['swift', 'file', 'rbd']
+ GlanceFilePcmkDevice:
+ default: ''
+ description: >
+ An exported storage device that should be mounted by Pacemaker
+ as Glance storage. Effective when GlanceFilePcmkManage is true.
+ type: string
+ GlanceFilePcmkFstype:
+ default: 'nfs'
+ description: >
+ Filesystem type for Pacemaker mount used as Glance storage.
+ Effective when GlanceFilePcmkManage is true.
+ type: string
+ GlanceFilePcmkManage:
+ default: false
+ description: >
+ Whether to make Glance file backend a mount managed by Pacemaker.
+ Effective when GlanceBackend is 'file'.
+ type: boolean
+ GlanceFilePcmkOptions:
+ default: ''
+ description: >
+ Mount options for Pacemaker mount used as Glance storage.
+ Effective when GlanceFilePcmkManage is true.
+ type: string
HAProxySyslogAddress:
default: /dev/log
description: Syslog address where HAproxy will send its log
@@ -728,6 +752,10 @@ resources:
glance_port: {get_param: GlancePort}
glance_password: {get_param: GlancePassword}
glance_backend: {get_param: GlanceBackend}
+ glance_file_pcmk_device: {get_param: GlanceFilePcmkDevice}
+ glance_file_pcmk_fstype: {get_param: GlanceFilePcmkFstype}
+ glance_file_pcmk_manage: {get_param: GlanceFilePcmkManage}
+ glance_file_pcmk_options: {get_param: GlanceFilePcmkOptions}
glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
glance_log_file: {get_param: GlanceLogFile}
glance_dsn:
@@ -1083,6 +1111,10 @@ resources:
glance::backend::swift::swift_store_key: {get_input: glance_password}
glance_backend: {get_input: glance_backend}
glance::db::mysql::password: {get_input: glance_password}
+ glance_file_pcmk_device: {get_input: glance_file_pcmk_device}
+ glance_file_pcmk_fstype: {get_input: glance_file_pcmk_fstype}
+ glance_file_pcmk_manage: {get_input: glance_file_pcmk_manage}
+ glance_file_pcmk_options: {get_input: glance_file_pcmk_options}
# Heat
heat_stack_domain_admin_password: {get_input: heat_stack_domain_admin_password}
diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml
index 7b46e853..bc135260 100644
--- a/puppet/hieradata/controller.yaml
+++ b/puppet/hieradata/controller.yaml
@@ -64,6 +64,7 @@ glance::api::pipeline: 'keystone'
glance::registry::pipeline: 'keystone'
glance::backend::swift::swift_store_create_container_on_put: true
glance::backend::rbd::rbd_store_user: 'openstack'
+glance_file_pcmk_directory: '/var/lib/glance/images'
# neutron
neutron::server::sync_db: true
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index 645ad6ed..0b082e6c 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -525,6 +525,16 @@ if hiera('step') >= 3 {
$http_store = ['glance.store.http.Store']
$glance_store = concat($http_store, $backend_store)
+ if $glance_backend == 'file' and hiera('glance_file_pcmk_manage', false) {
+ pacemaker::resource::filesystem { "glance-fs":
+ device => hiera('glance_file_pcmk_device'),
+ directory => hiera('glance_file_pcmk_directory'),
+ fstype => hiera('glance_file_pcmk_fstype'),
+ fsoptions => hiera('glance_file_pcmk_options', ''),
+ clone_params => '',
+ }
+ }
+
# TODO: notifications, scrubber, etc.
include ::glance
class { 'glance::api':