diff --git a/docker/services/glance-api.yaml b/docker/services/glance-api.yaml index c67f423212..28a011b0f4 100644 --- a/docker/services/glance-api.yaml +++ b/docker/services/glance-api.yaml @@ -202,16 +202,7 @@ outputs: - /var/lib/kolla/config_files/glance_api.json:/var/lib/kolla/config_files/config.json - /var/lib/config-data/puppet-generated/glance_api/:/var/lib/kolla/config_files/src:ro - /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro - - - if: - - nfs_backend_enabled - - /var/lib/glance:/var/lib/glance - - '' - - - if: - - netapp_nfs_backend_enabled - - /var/lib/glance:/var/lib/glance - - '' + - /var/lib/glance:/var/lib/glance:slave - if: - cinder_backend_enabled diff --git a/environments/storage/glance-nfs.yaml b/environments/storage/glance-nfs.yaml index d4f63964c2..e22e27357c 100644 --- a/environments/storage/glance-nfs.yaml +++ b/environments/storage/glance-nfs.yaml @@ -9,6 +9,10 @@ # Configure and include this environment to enable the use of an NFS # share as the backend for Glance. parameter_defaults: + # List of enabled Image Import Methods. Valid values in the list are 'glance-direct' and 'web-download' + # Type: comma_delimited_list + GlanceEnabledImportMethods: web-download + # When using GlanceBackend 'file', Netapp mount NFS share for image storage. # Type: boolean GlanceNetappNfsEnabled: False @@ -21,6 +25,18 @@ parameter_defaults: # Type: string GlanceNfsShare: '' + # URI that specifies the staging location to use when importing images + # Type: string + GlanceNodeStagingUri: file:///var/lib/glance/staging + + # NFS mount options for NFS image import staging + # Type: string + GlanceStagingNfsOptions: _netdev,bg,intr,context=system_u:object_r:glance_var_lib_t:s0 + + # NFS share to mount for image import staging + # Type: string + GlanceStagingNfsShare: '' + # Netapp share to mount for image storage (when GlanceNetappNfsEnabled is true) # Type: string NetappShareLocation: '' diff --git a/puppet/services/glance-api.yaml b/puppet/services/glance-api.yaml index a4ba764ef6..fc3eb737d1 100644 --- a/puppet/services/glance-api.yaml +++ b/puppet/services/glance-api.yaml @@ -137,6 +137,21 @@ parameters: List of enabled Image Import Methods. Valid values in the list are 'glance-direct' and 'web-download' type: comma_delimited_list + GlanceStagingNfsShare: + default: '' + description: > + NFS share to mount for image import staging + type: string + GlanceNodeStagingUri: + default: 'file:///var/lib/glance/staging' + description: > + URI that specifies the staging location to use when importing images + type: string + GlanceStagingNfsOptions: + default: '_netdev,bg,intr,context=system_u:object_r:glance_var_lib_t:s0' + description: > + NFS mount options for NFS image import staging + type: string KeystoneRegion: type: string default: 'regionOne' @@ -244,6 +259,7 @@ outputs: glance::api::os_region_name: {get_param: KeystoneRegion} glance::api::image_member_quota: {get_param: GlanceImageMemberQuota} glance::api::enabled_import_methods: {get_param: GlanceEnabledImportMethods} + glance::api::node_staging_uri: {get_param: GlanceNodeStagingUri} # NOTE: bind IP is found in hiera replacing the network name with the # local node IP for the given network; replacement examples # (eg. for internal_api): @@ -356,6 +372,14 @@ outputs: - NETAPP_SHARE: {get_param: NetappShareLocation} NFS_OPTIONS: {get_param: GlanceNfsOptions} when: netapp_nfs_backend_enable + - name: Mount Node Staging Location + vars: + glance_node_staging_uri: {get_param: GlanceNodeStagingUri} + glance_staging_nfs_share: {get_param: GlanceStagingNfsShare} + glance_nfs_options: {get_param: GlanceStagingNfsOptions} + # Gleaning mount point by stripping "file://" prefix from staging uri + mount: name="{{glance_node_staging_uri[7:]}}" src="{{glance_staging_nfs_share}}" fstype=nfs opts="{{glance_nfs_options}}" state=mounted + when: glance_staging_nfs_share upgrade_tasks: - name: Check if glance_api is deployed diff --git a/sample-env-generator/storage.yaml b/sample-env-generator/storage.yaml index 61b492c2fa..9be0abbdb9 100644 --- a/sample-env-generator/storage.yaml +++ b/sample-env-generator/storage.yaml @@ -28,6 +28,10 @@ environments: - GlanceNfsOptions - GlanceNetappNfsEnabled - NetappShareLocation + - GlanceEnabledImportMethods + - GlanceStagingNfsShare + - GlanceNodeStagingUri + - GlanceStagingNfsOptions sample_values: GlanceBackend: file GlanceNfsEnabled: True