]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commit
ceph-handler: don't restart all OSDs with limit
authorDimitri Savineau <dsavinea@redhat.com>
Wed, 2 Oct 2019 18:48:53 +0000 (14:48 -0400)
committerGuillaume Abrioux <gabrioux@redhat.com>
Fri, 4 Oct 2019 05:43:17 +0000 (07:43 +0200)
commit070db68ffd330908b15aa47d02f4326fa4b4121e
tree7b634df4e0d7c78a2c11b33f749de1d508cee06a
parentf7b4ca5237b704264ceaa24786642d6cf816add9
ceph-handler: don't restart all OSDs with limit

When using the ansible --limit option on one or few OSD nodes and if the
handler is triggered then we will restart the OSD service on all OSDs
nodes instead of the hosts limited by the limit value.
Even if the play is limited by the --limit value we are using all OSD
nodes from the OSD group.

  with_items: '{{ groups[osd_group_name] }}'

Instead we should iterate only on the nodes present in both OSD group and
limit list.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 0346871fb5c46fb1fedfb24ffe5a8c02108c244e)
roles/ceph-handler/handlers/main.yml