]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Make number of cloner threads configurable 37936/head
authorKotresh HR <khiremat@redhat.com>
Tue, 4 Aug 2020 07:57:53 +0000 (13:27 +0530)
committerKotresh HR <khiremat@redhat.com>
Thu, 7 Jan 2021 09:23:23 +0000 (14:53 +0530)
commit89f4f4255c1cef018eb613f22bf84f9f160ee732
tree145344002617c23d1c3bac029b0be2195c8bc24b
parent1778d63e55dbff6cedb071ab7d367f8f52a8699f
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>
(cherry picked from commit 83c4442c765bb64f9d4fbd3edcb4967dfa21cafe)

Conflicts:
    src/pybind/mgr/volumes/fs/volume.py
     - keep connection_pool because nautilus does not introduce
       the CephfsClient
    src/pybind/mgr/volumes/module.py
     - Remove nfs export related things as nautilus doesn't contains NFSExport, FSExport class
    qa/tasks/cephfs/test_volumes.py
     - nautilus expects particular 'mgr.id', hence used 'mgr.x' instead of 'mgr'
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