Introduce ExternalCeph boolean
Add explicit parameter for when external ceph is used. This parameter defaults to false but is true if the deployment uses -e environments/external-ceph.yaml. When external ceph is used with Ganesha, the ceph_mon group is empty but the ceph_nfs group is not. When internal ceph is used with Ganesha, both the ceph_mon and ceph_nfs groups are non-empty. Rather than solve the related bug by adding another condition based on these groups which is compatible existing logic, it's safer to have an explicit parameter for when external ceph is used. Change-Id: Id3e397d81dbca9a48d0456588784bcc20737093f Depends-On: I2651c2850debd8110da93df2adc5fd8768a00db0 Closes-Bug: #1986988
This commit is contained in:
parent
4513cb5985
commit
e031058520
@ -364,6 +364,12 @@ parameters:
|
||||
description: |
|
||||
Use the default continer defined in cephadm instead of
|
||||
the one defined in container_image_prepare_defaults.yaml.
|
||||
ExternalCeph:
|
||||
default: false
|
||||
type: boolean
|
||||
description: |
|
||||
If the Ceph cluster has been deployed outside of TripleO.
|
||||
DeployedCeph and ExternalCeph are mutually exclusive.
|
||||
|
||||
parameter_groups:
|
||||
- label: deprecated
|
||||
@ -570,7 +576,9 @@ outputs:
|
||||
include_role:
|
||||
name: tripleo_run_cephadm
|
||||
tasks_from: enable_ceph_admin_user.yml
|
||||
when: (not deployed_ceph and
|
||||
when:
|
||||
- not external_ceph
|
||||
- (not deployed_ceph and
|
||||
(groups['ceph_mon'] | default([]) | length > 0 or
|
||||
groups['ceph_nfs'] | default([]) | length > 0))
|
||||
or
|
||||
@ -592,20 +600,28 @@ outputs:
|
||||
groups['ceph_rbdmirror'] | default([]) | length > 0)))
|
||||
vars:
|
||||
deployed_ceph: {get_param: DeployedCeph}
|
||||
external_ceph: {get_param: ExternalCeph}
|
||||
- name: Deploy or configure the cephadm Ceph cluster
|
||||
include_role:
|
||||
name: tripleo_run_cephadm
|
||||
when: groups['ceph_mon'] | default([]) | length > 0 or
|
||||
groups['ceph_nfs'] | default([]) | length > 0
|
||||
when:
|
||||
- not external_ceph
|
||||
- groups['ceph_mon'] | default([]) | length > 0 or
|
||||
groups['ceph_nfs'] | default([]) | length > 0
|
||||
vars:
|
||||
external_ceph: {get_param: ExternalCeph}
|
||||
- name: ceph_base_external_deploy_task
|
||||
when:
|
||||
- (step | int) == 3
|
||||
- {get_param: DisableCephadm}
|
||||
- not external_ceph
|
||||
block:
|
||||
- name: Pause cephadm
|
||||
include_role:
|
||||
name: tripleo_run_cephadm
|
||||
tasks_from: disable_cephadm.yml
|
||||
vars:
|
||||
external_ceph: {get_param: ExternalCeph}
|
||||
post_upgrade_tasks:
|
||||
- name: Clean puppet-ceph package
|
||||
when:
|
||||
|
@ -148,6 +148,8 @@ outputs:
|
||||
when:
|
||||
- groups['ceph_mon'] | default([]) | length == 0
|
||||
- groups['ceph_nfs'] | default([]) | length > 0
|
||||
vars:
|
||||
tripleo_cephadm_config_home: {get_param: CephConfigPath}
|
||||
external_update_tasks: []
|
||||
external_upgrade_tasks: []
|
||||
config_settings: {}
|
||||
|
@ -6,6 +6,7 @@ parameter_defaults:
|
||||
#CephClusterFSID: '4b5c8c0a-ff60-454b-a1b4-9747aa737d19'
|
||||
#CephClientKey: 'AQDLOh1VgEp6FRAAFzT7Zw+Y9V6JJExQAsRnRQ=='
|
||||
#CephExternalMonHost: '172.16.1.7, 172.16.1.8'
|
||||
ExternalCeph: true
|
||||
|
||||
# the following parameters enable Ceph backends for Cinder, Glance, Gnocchi and Nova
|
||||
NovaEnableRbdBackend: true
|
||||
|
Loading…
Reference in New Issue
Block a user