Moving glance mount nfs block to puppet glance-api template

Moving nfs mount task from Docker glance-api template to
host_prep_tasks of Puppet glance-api template which would be
common place for both containerized & baremetal case.

Since, all the nfs related puppet-tripleo parameters are no
longer needed after this cleanup, removing those too.

Change-Id: I232577643c26d7eb0162c09b3c394b7f3e161154
This commit is contained in:
Pranali Deore 2018-06-18 11:34:35 +05:30 committed by PranaliD
parent ed26bd7165
commit 2664ddd5b7
3 changed files with 17 additions and 41 deletions

View File

@ -51,31 +51,6 @@ parameters:
type: string
constraints:
- allowed_values: ['swift', 'file', 'rbd', 'cinder']
GlanceNfsEnabled:
default: false
description: >
When using GlanceBackend 'file', mount NFS share for image storage.
type: boolean
GlanceNfsShare:
default: ''
description: >
NFS share to mount for image storage (when GlanceNfsEnabled is true)
type: string
GlanceNfsOptions:
default: '_netdev,bg,intr,context=system_u:object_r:glance_var_lib_t:s0'
description: >
NFS mount options for image storage (when GlanceNfsEnabled is true)
type: string
GlanceNetappNfsEnabled:
default: false
description: >
When using GlanceBackend 'file', Netapp mount NFS share for image storage.
type: boolean
NetappShareLocation:
default: ''
description: >
Netapp share to mount for image storage (when GlanceNetappNfsEnabled is true)
type: string
UpgradeRemoveUnusedPackages:
default: false
description: Remove package if the service is being disabled during upgrade
@ -100,8 +75,6 @@ parameters:
conditions:
internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
nfs_backend_enabled: {equals: [{get_param: GlanceNfsEnabled}, true]}
netapp_nfs_backend_enabled: {equals: [{get_param: GlanceNetappNfsEnabled}, true]}
cinder_backend_enabled: {equals: [{get_param: GlanceBackend}, cinder]}
@ -136,7 +109,6 @@ outputs:
- get_attr: [GlanceApiPuppetBase, role_data, config_settings]
- get_attr: [GlanceLogging, config_settings]
- glance::api::sync_db: false
- tripleo::glance::nfs_mount::edit_fstab: false
logging_source: {get_attr: [GlanceApiPuppetBase, role_data, logging_source]}
logging_groups: {get_attr: [GlanceApiPuppetBase, role_data, logging_groups]}
service_config_settings:
@ -254,16 +226,7 @@ outputs:
list_concat:
- {get_attr: [GlanceLogging, host_prep_tasks]}
- {get_attr: [GlanceApiPuppetBase, role_data, host_prep_tasks]}
- - name: Mount NFS on host
vars:
nfs_backend_enable: {get_param: GlanceNfsEnabled}
mount: name=/var/lib/glance/images src="{{item.NFS_SHARE}}" fstype=nfs4 opts="{{item.NFS_OPTIONS}}" state=mounted
with_items:
- NFS_SHARE: {get_param: GlanceNfsShare}
NFS_OPTIONS: {get_param: GlanceNfsOptions}
when:
- nfs_backend_enable
- name: ensure ceph configurations exist
- - name: ensure ceph configurations exist
file:
path: /etc/ceph
state: directory

View File

@ -313,9 +313,6 @@ outputs:
glance::notify::rabbitmq::rabbit_password: {get_param: RpcPassword}
glance::notify::rabbitmq::rabbit_use_ssl: {get_param: RpcUseSSL}
glance::notify::rabbitmq::notification_driver: {get_param: NotificationDriver}
tripleo::profile::base::glance::api::glance_nfs_enabled: {get_param: GlanceNfsEnabled}
tripleo::glance::nfs_mount::share: {get_param: GlanceNfsShare}
tripleo::glance::nfs_mount::options: {get_param: GlanceNfsOptions}
-
if:
- glance_workers_unset
@ -372,6 +369,13 @@ outputs:
- NETAPP_SHARE: {get_param: NetappShareLocation}
NFS_OPTIONS: {get_param: GlanceNfsOptions}
when: netapp_nfs_backend_enable
- name: Mount NFS on host
vars:
nfs_backend_enabled: {get_param: GlanceNfsEnabled}
nfs_share: {get_param: GlanceNfsShare}
nfs_options: {get_param: GlanceNfsOptions}
mount: name=/var/lib/glance/images src="{{nfs_share}}" fstype=nfs opts="{{nfs_options}}" state=mounted
when: nfs_backend_enabled
- name: Mount Node Staging Location
vars:
glance_node_staging_uri: {get_param: GlanceNodeStagingUri}

View File

@ -0,0 +1,9 @@
---
other:
- |
Moved glance nfs mount task to puppet/services under
host_prep_tasks instead of having it seperately for puppet
& docker services.
This is just refactoring cleanup, so there will be no functional
change & upgrade impact.