From 33f7868d551745ed4cbd219ab82128940acb99b8 Mon Sep 17 00:00:00 2001 From: Francesco Pantano Date: Mon, 14 Jun 2021 15:54:08 +0200 Subject: [PATCH] Set tripleo_cephadm rbd mirror vars This patch introduces the logic of adding and setting the rbd mirror parameters required, later in the process, by cephadm. By doing this we can not only deploy the rbd-mirror daemon (via the cephadm spec file), but also run a set of ceph commands to properly configure mirroring on a given pool. Depends-On: I0d1ce33270ccf8636925c3534812c3b1cf650103 Change-Id: I7b20399d55c3de82c8aeddc3317c9972409217da --- deployment/cephadm/ceph-rbdmirror.yaml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/deployment/cephadm/ceph-rbdmirror.yaml b/deployment/cephadm/ceph-rbdmirror.yaml index 5aebeec53e..779c5e045f 100644 --- a/deployment/cephadm/ceph-rbdmirror.yaml +++ b/deployment/cephadm/ceph-rbdmirror.yaml @@ -54,6 +54,16 @@ parameters: /etc/ceph/.client..keyring type: string +resources: + CephBase: + type: ./ceph-base.yaml + properties: + ServiceData: {get_param: ServiceData} + ServiceNetMap: {get_param: ServiceNetMap} + EndpointMap: {get_param: EndpointMap} + RoleName: {get_param: RoleName} + RoleParameters: {get_param: RoleParameters} + outputs: role_data: description: Role data for the Ceph RBD Mirror service. @@ -66,4 +76,17 @@ outputs: upgrade_tasks: [] puppet_config: {} docker_config: {} - external_deploy_tasks: [] + external_deploy_tasks: + list_concat: + - {get_attr: [CephBase, role_data, external_deploy_tasks]} + - - name: ceph_rbdmirror_external_deploy_init + when: step|int == 1 + tags: + - ceph + block: + - name: set cephadm rbdmirror vars + set_fact: + cephadm_rbdmirror: + tripleo_cephadm_rbd_mirror_pool: {get_param: CephRbdMirrorPool} + tripleo_cephadm_rbd_mirror_remote_cluster: {get_param: CephRbdMirrorRemoteCluster} + tripleo_cephadm_rbd_mirror_remote_user: {get_param: CephRbdMirrorRemoteUser}