Skip to content

Commit adfb56a

Browse files
committed
Add ceph-{enter,exit}-maintenance.yml playbooks
These can be used to enter and exit maintenance for Ceph hosts.
1 parent 0d64e97 commit adfb56a

File tree

5 files changed

+45
-4
lines changed

5 files changed

+45
-4
lines changed

doc/source/operations/upgrading-ceph.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Place the host or batch of hosts into maintenance mode:
6363

6464
.. code-block:: console
6565
66-
sudo cephadm shell -- ceph orch host maintenance enter <host>
66+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-enter-maintenance.yml -l <host>
6767
6868
To update all eligible packages, use ``*``, escaping if necessary:
6969

@@ -72,7 +72,8 @@ To update all eligible packages, use ``*``, escaping if necessary:
7272
kayobe overcloud host package update --packages "*" --limit <host>
7373
7474
If the kernel has been upgraded, reboot the host or batch of hosts to pick up
75-
the change:
75+
the change. While running this playbook, consider setting ``ANSIBLE_SERIAL`` to
76+
the maximum number of hosts that can safely reboot concurrently.
7677

7778
.. code-block:: console
7879
@@ -82,7 +83,7 @@ Remove the host or batch of hosts from maintenance mode:
8283

8384
.. code-block:: console
8485
85-
sudo cephadm shell -- ceph orch host maintenance exit <host>
86+
kayobe playbook run $KAYOBE_CONFIG_PATH/ansible/ceph-exit-maintenance.yml -l <host>
8687
8788
Wait for Ceph health to return to ``HEALTH_OK``:
8889

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
- name: Ensure a Ceph host has entered maintenance
3+
gather_facts: true
4+
any_errors_fatal: true
5+
# We need to check whether it is OK to stop hosts after previous hosts have
6+
# entered maintenance.
7+
serial: 1
8+
hosts: ceph
9+
become: true
10+
tasks:
11+
- name: Ensure a Ceph host has entered maintenance
12+
ansible.builtin.import_role:
13+
name: stackhpc.cephadm.enter_maintenance
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Ensure a Ceph host has exited maintenance
3+
gather_facts: true
4+
any_errors_fatal: true
5+
hosts: ceph
6+
# The role currently requires hosts to exit maintenance serially.
7+
serial: 1
8+
become: true
9+
tasks:
10+
- name: Ensure a Ceph host has exited maintenance
11+
ansible.builtin.import_role:
12+
name: stackhpc.cephadm.exit_maintenance

etc/kayobe/ansible/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
collections:
33
- name: stackhpc.cephadm
4-
version: 1.15.1
4+
version: 1.18.0
55
# NOTE: Pinning pulp.squeezer to 0.0.13 because 0.0.14+ depends on the
66
# pulp_glue Python library being installed.
77
- name: pulp.squeezer
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
features:
3+
- |
4+
Adds two new custom playbooks for placing Ceph hosts into and removing them
5+
from maintenance:
6+
7+
- ``ceph-enter-maintenance.yml``
8+
- ``ceph-exit-maintenance.yml``
9+
upgrade:
10+
- |
11+
Updates the ``stackhpc.cephadm`` collection to version ``1.18.0``.
12+
fixes:
13+
- |
14+
Fixes an issue with idempotency in the ``stackhpc.ceph.cephadm_keys``
15+
plugin.

0 commit comments

Comments
 (0)