]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Make number of cloner threads configurable 36554/head
authorKotresh HR <khiremat@redhat.com>
Tue, 4 Aug 2020 07:57:53 +0000 (13:27 +0530)
committerKotresh HR <khiremat@redhat.com>
Fri, 11 Sep 2020 09:06:37 +0000 (14:36 +0530)
commit83c4442c765bb64f9d4fbd3edcb4967dfa21cafe
tree747d65a0ccb428de6898dbb83a80a6b0a87d0b6c
parent10aade2ef372b64b88fd6cec88799a02027f35c4
mgr/volumes: Make number of cloner threads configurable

The number of cloner threads is set to 4 and it can't be
configured. This patch makes the number of cloner threads
configurable via the mgr config option "max_concurrent_clones".

On an increase in number of cloner threads, it will just
spawn the difference of threads between existing number of
cloner threads and the new configuration. It will not cancel
the running cloner threads.

On decrease in number of cloner threads, the cases are as follows.

1. If all cloner threads are waiting for the job:
      In this case, all threads are notified and required number
   threads are terminated.

2. If all the cloner threads are processing a job:
      In this case, the condition is validated for each thread after
   the current job is finished and the thread is termianted if the
   condition for required number of cloner threads is not satisified.

3. If few cloner threads are processing and others are waiting:
      The threads which are waiting are notified to validate the
   number of threads required. If terminating those doesn't satisfy the
   required number of threads, the remaining threads are terminated
   upon completion of existing job.

Fixes: https://tracker.ceph.com/issues/46892
Signed-off-by: Kotresh HR <khiremat@redhat.com>
doc/cephfs/fs-volumes.rst
qa/tasks/cephfs/test_volumes.py
src/pybind/mgr/volumes/fs/async_cloner.py
src/pybind/mgr/volumes/fs/async_job.py
src/pybind/mgr/volumes/fs/volume.py
src/pybind/mgr/volumes/module.py