Bug 1871177 - [docs] Document how to use Ansible --limit option with ceph-ansible
Summary: [docs] Document how to use Ansible --limit option with ceph-ansible
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: documentation
Version: 16.1 (Train)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: z2
: ---
Assignee: ndeevy
QA Contact: RHOS Documentation Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-21 13:50 UTC by John Fulton
Modified: 2020-10-28 16:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 16:23:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Fulton 2020-08-21 13:50:38 UTC
As per BZ 1855112 OSP16.1 (likely z2) will support passing the Ansible --limit flag to ceph-ansible. This feature should be documented. Here is copy text.

Using Ansible --limit with ceph-ansible
---------------------------------------

When using config-download to configure Ceph,
if Ansible's `--limit` option is used, then it is passed to the
execution of ceph-ansible too. This is the case for Train and newer.

In the previous section an example was provided where Ceph was
deployed with TripleO. The examples below show how to update the
deployment and pass the `--limit` option.

If oc0-cephstorage-0 had a disk failure and a factory clean disk was
put in place of the failed disk, then the following could be run so
that the new disk is used to bring up the missing OSD and so that
ceph-ansible is only run on the nodes where it needs to be run. This
is useful to reduce the time it takes to update the deployment::

    openstack overcloud deploy --templates -r /home/stack/roles_data.yaml -n /usr/share/openstack-tripleo-heat-templates/network_data_dashboard.yaml -e /usr/share/openstack-tripleo-heat-templates/environments/ceph-ansible/ceph-ansible.yaml -e ~/my-ceph-settings.yaml --limit oc0-controller-0:oc0-controller-2:oc0-controller-1:oc0-cephstorage-0:undercloud

If config-download has generated a `ansible-playbook-command.sh` script, 
then that script may also be run with the `--limit` option and it will 
be passed to ceph-ansible::

    ./ansible-playbook-command.sh --limit oc0-controller-0:oc0-controller-2:oc0-controller-1:oc0-cephstorage-0:undercloud

In the above example the controllers are included because the
Ceph Mons need Ansible to change their OSD definitions. Both commands
above would do the same thing. The former would only be needed if
there were Heat environment file updates. After either of the above
has run the
`~/config-download/config-download-latest/ceph-ansible/ceph_ansible_command.sh`
file should contain the `--limit` option.

.. warning:: You must always include the undercloud in the limit list
             or ceph-ansible will not be executed when using
             `--limit`. This is necessary because the ceph-ansible
             execution happens through the external_deploy_steps_tasks
             playbook and that playbook only runs on the undercloud.


Note You need to log in before you can comment on or make changes to this bug.