Fix glance config generation when using NFS

This commit sets the 'tripleo::glance::nfs_mount::edit_fstab' variable
to false to prevent the glance_api to write to /etc/fstab and fail in
the case we're using an NFS backend.

This also updates the NFS mount option and mount point to align with
the config from the puppet-tripleo module at:

https://github.com/openstack/puppet-tripleo/blob/master/manifests/glance/nfs_mount.pp

Change-Id: Ied27fac67d28b3104441ada469942a19e3c07a89
Closes-Bug: #1732928
This commit is contained in:
Martin André 2017-11-17 16:16:13 +01:00 committed by Alan Bishop
parent da2167ea00
commit 64854af783
3 changed files with 5 additions and 4 deletions

View File

@ -57,7 +57,7 @@ parameters:
NFS share to mount for image storage (when GlanceNfsEnabled is true)
type: string
GlanceNfsOptions:
default: 'intr,context=system_u:object_r:glance_var_lib_t:s0'
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
@ -104,6 +104,7 @@ 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: {get_attr: [GlanceApiPuppetBase, role_data, service_config_settings]}
@ -211,7 +212,7 @@ outputs:
- - name: Mount NFS on host
vars:
nfs_backend_enable: {get_param: GlanceNfsEnabled}
mount: name=/var/lib/glance src="{{item.NFS_SHARE}}" fstype=nfs4 opts="{{item.NFS_OPTIONS}}" state=mounted
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}

View File

@ -11,7 +11,7 @@
parameter_defaults:
# NFS mount options for image storage (when GlanceNfsEnabled is true)
# Type: string
GlanceNfsOptions: intr,context=system_u:object_r:glance_var_lib_t:s0
GlanceNfsOptions: _netdev,bg,intr,context=system_u:object_r:glance_var_lib_t:s0
# NFS share to mount for image storage (when GlanceNfsEnabled is true)
# Type: string

View File

@ -101,7 +101,7 @@ parameters:
NFS share to mount for image storage (when GlanceNfsEnabled is true)
type: string
GlanceNfsOptions:
default: 'intr,context=system_u:object_r:glance_var_lib_t:s0'
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