Allow NovaNfs parameters to be role specific
Currently, TripleO does not support to have an NFS backend as Nova Ephemeral storage on selected roles. An admin should be allowed to create Compute role(s) for InstanceHA having NFS shared storage used then by selected workloads while leaving the majority of the workloads on standard compute nodes without InstanceHA and shared storage. Closes-Bug: 1823712 Change-Id: I2702a022565a130ab339d165cb2252ad67d1162e
This commit is contained in:
parent
20631bf449
commit
1295868ddd
@ -92,14 +92,20 @@ parameters:
|
||||
default: false
|
||||
description: Whether to enable or not the NFS backend for Nova
|
||||
type: boolean
|
||||
tags:
|
||||
- role_specific
|
||||
NovaNfsShare:
|
||||
default: ''
|
||||
description: NFS share to mount for nova storage (when NovaNfsEnabled is true)
|
||||
type: string
|
||||
tags:
|
||||
- role_specific
|
||||
NovaNfsOptions:
|
||||
default: 'context=system_u:object_r:nfs_t:s0'
|
||||
description: NFS mount options for nova storage (when NovaNfsEnabled is true)
|
||||
type: string
|
||||
tags:
|
||||
- role_specific
|
||||
NovaNfsVersion:
|
||||
default: '4'
|
||||
description: >
|
||||
@ -110,6 +116,8 @@ parameters:
|
||||
type: string
|
||||
constraints:
|
||||
- allowed_pattern: "^4.?[0-9]?"
|
||||
tags:
|
||||
- role_specific
|
||||
CinderEnableRbdBackend:
|
||||
default: false
|
||||
description: Whether to enable or not the Rbd backend for Cinder
|
||||
@ -320,6 +328,10 @@ resources:
|
||||
nova::compute::libvirt::libvirt_hw_machine_type: NovaHWMachineType
|
||||
compute_enable_ksm: NovaComputeEnableKsm
|
||||
nova::compute::rbd::libvirt_images_rbd_pool: NovaRbdPoolName
|
||||
tripleo::profile::base::nova::compute::nova_nfs_enabled: NovaNfsEnabled
|
||||
nfs_share: NovaNfsShare
|
||||
nfs_options: NovaNfsOptions
|
||||
nfs_vers: NovaNfsVersion
|
||||
- values: {get_param: [RoleParameters]}
|
||||
- values:
|
||||
NovaVcpuPinSet: {get_param: NovaVcpuPinSet}
|
||||
@ -335,6 +347,10 @@ resources:
|
||||
NovaHWMachineType: {get_param: NovaHWMachineType}
|
||||
NovaComputeEnableKsm: {get_param: NovaComputeEnableKsm}
|
||||
NovaRbdPoolName: {get_param: NovaRbdPoolName}
|
||||
NovaNfsEnabled: {get_param: NovaNfsEnabled}
|
||||
NovaNfsShare: {get_param: NovaNfsShare}
|
||||
NovaNfsOptions: {get_param: NovaNfsOptions}
|
||||
NovaNfsVersion: {get_param: NovaNfsVersion}
|
||||
|
||||
conditions:
|
||||
enable_instance_ha: {equals: [{get_param: EnableInstanceHA}, true]}
|
||||
@ -342,6 +358,7 @@ conditions:
|
||||
enable_live_migration_tunnelled:
|
||||
or:
|
||||
- equals: [{get_param: NovaNfsEnabled}, true]
|
||||
- equals: [{get_param: [RoleParameters, NovaNfsEnabled]}, true]
|
||||
- equals: [{get_param: NovaEnableRbdBackend}, true]
|
||||
|
||||
libvirt_file_backed_memory_enabled:
|
||||
@ -394,7 +411,6 @@ outputs:
|
||||
- - 'client'
|
||||
- {get_param: CephClientUserName}
|
||||
tripleo::profile::base::nova::compute::cinder_nfs_backend: {get_param: CinderEnableNfsBackend}
|
||||
tripleo::profile::base::nova::compute::nova_nfs_enabled: {get_param: NovaNfsEnabled}
|
||||
rbd_persistent_storage: {get_param: CinderEnableRbdBackend}
|
||||
nova::compute::rbd::libvirt_rbd_secret_key: {get_param: CephClientKey}
|
||||
nova::compute::rbd::libvirt_rbd_secret_uuid: {get_param: CephClusterFSID}
|
||||
@ -595,10 +611,10 @@ outputs:
|
||||
- {get_attr: [NovaLogging, host_prep_tasks]}
|
||||
- - name: Mount Nova NFS Share
|
||||
vars:
|
||||
nfs_backend_enable: {get_param: NovaNfsEnabled}
|
||||
nfs_share: {get_param: NovaNfsShare}
|
||||
nfs_options: {get_param: NovaNfsOptions}
|
||||
nfs_vers: {get_param: NovaNfsVersion}
|
||||
nfs_backend_enable: {get_attr: [RoleParametersValue, value, nfs_backend_enable]}
|
||||
nfs_share: {get_attr: [RoleParametersValue, value, nfs_share]}
|
||||
nfs_options: {get_attr: [RoleParametersValue, value, nfs_options]}
|
||||
nfs_vers: {get_attr: [RoleParametersValue, value, nfs_vers]}
|
||||
mount: name=/var/lib/nova/instances src="{{nfs_share}}" fstype=nfs4 opts="_netdev,bg,{{nfs_options}},vers={{nfs_vers}},nfsvers={{nfs_vers}}" state=mounted
|
||||
when: nfs_backend_enable|bool
|
||||
- name: is Nova Resume Guests State On Host Boot enabled
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The parameters ``NovaNfsEnabled``, ``NovaNfsShare``, ``NovaNfsOptions``,
|
||||
``NovaNfsVersion`` are changed to be role specific. This requires the
|
||||
usage of host aggregates as otherwise it will break live migration of
|
||||
instances as we can not do this with different storage backends.
|
Loading…
Reference in New Issue
Block a user