Disable cephadm when ceph is deployed
After ceph is deployed, which means day1 operations are over
and the Ceph cluster daemons are up && running, cephadm can
be paused by running the 'disable_cephadm' playbook.
Change-Id: I5952bb8a7a327e37a39acc95751cd5746fd9a41d
(cherry picked from commit 3234029022
)
This commit is contained in:
parent
12242c7c68
commit
b1774f69f0
27
tripleo_ansible/playbooks/disable_cephadm.yml
Normal file
27
tripleo_ansible/playbooks/disable_cephadm.yml
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
# Copyright 2021 Red Hat, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# TODO: check the orchestrator is up
|
||||
|
||||
- name: Pause cephadm
|
||||
hosts: ceph_mon[0]
|
||||
tasks:
|
||||
- name: Pause cephadm
|
||||
import_role:
|
||||
name: tripleo_cephadm
|
||||
tasks_from: toggle_cephadm
|
||||
vars:
|
||||
backend: ''
|
||||
action: disable
|
@ -62,3 +62,5 @@ tripleo_cephadm_debug: false
|
||||
tripleo_cephadm_min_compat_client: mimic
|
||||
tripleo_cephadm_deployed_ceph: false
|
||||
tripleo_cephadm_deployed_ceph_tht_path: "/home/stack/deployed_ceph.yaml"
|
||||
tripleo_cephadm_backend: ''
|
||||
tripleo_cephadm_action: disable
|
||||
|
@ -0,0 +1,29 @@
|
||||
---
|
||||
# Copyright 2021 Red Hat, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
- name: Get ceph_cli
|
||||
include_tasks: ceph_cli.yaml
|
||||
|
||||
- name: Reset the Ceph backend
|
||||
command: "{{ tripleo_cephadm_ceph_cli }} orch set backend {{ tripleo_cephadm_backend|default('') }}"
|
||||
register: ceph_orch_backend
|
||||
become: true
|
||||
|
||||
- name: Start / Stop cephadm
|
||||
command: |
|
||||
{{ tripleo_cephadm_ceph_cli }} mgr module {{ tripleo_cephadm_action|default('disable') }} cephadm
|
||||
changed_when: false
|
||||
become: true
|
@ -0,0 +1,33 @@
|
||||
---
|
||||
# Copyright 2021 Red Hat, Inc.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
- name: Setup the disable_cephadm playbook command
|
||||
set_fact:
|
||||
cephadm_disable_cephadm_command:
|
||||
- ANSIBLE_LOG_PATH="{{ playbook_dir }}/cephadm/disable_cephadm.log"
|
||||
- ANSIBLE_HOST_KEY_CHECKING=false
|
||||
- ansible-playbook
|
||||
- '-i'
|
||||
- '{{ inventory_file }}'
|
||||
- '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ ansible_python_interpreter }}{% endif %}'
|
||||
- '/usr/share/ansible/tripleo-playbooks/disable_cephadm.yml'
|
||||
- '-e @{{ playbook_dir }}/cephadm/cephadm-extra-vars-heat.yml'
|
||||
- '-e @{{ playbook_dir }}/global_vars.yaml'
|
||||
|
||||
- name: Run disable_cephadm
|
||||
shell: "{{ (cephadm_disable_cephadm_command)|join(' ') }}"
|
||||
tags:
|
||||
- disable_cephadm
|
Loading…
Reference in New Issue
Block a user