]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: cleanup leftovers from earlier purge job implementation
authorVenky Shankar <vshankar@redhat.com>
Thu, 10 Oct 2019 07:28:24 +0000 (03:28 -0400)
committerRamana Raja <rraja@redhat.com>
Wed, 12 Feb 2020 10:11:59 +0000 (05:11 -0500)
... which was not fully implemented anyway, so just remove the
boilerplates.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 45c22bdcea4e23d101e27c748536eecf65dc79e7)

src/pybind/mgr/volumes/module.py

index ddc83d4f5a4b851e710a0a8e34c6b902ebe162e6..eb4c350db312dea48aec28fbc041e7788e54db8b 100644 (file)
@@ -1,27 +1,11 @@
-from threading import Event
 import errno
 import json
-try:
-    import queue as Queue
-except ImportError:
-    import Queue
 
 from mgr_module import MgrModule
 import orchestrator
 
 from .fs.volume import VolumeClient
 
-class PurgeJob(object):
-    def __init__(self, volume_fscid, subvolume_path):
-        """
-        Purge tasks work in terms of FSCIDs, so that if we process
-        a task later when a volume was deleted and recreated with
-        the same name, we can correctly drop the task that was
-        operating on the original volume.
-        """
-        self.fscid = volume_fscid
-        self.subvolume_path = subvolume_path
-
 class Module(orchestrator.OrchestratorClientMixin, MgrModule):
     COMMANDS = [
         {
@@ -199,28 +183,9 @@ class Module(orchestrator.OrchestratorClientMixin, MgrModule):
 
     def __init__(self, *args, **kwargs):
         super(Module, self).__init__(*args, **kwargs)
-        self._initialized = Event()
         self.vc = VolumeClient(self)
 
-        self._background_jobs = Queue.Queue()
-
-    def serve(self):
-        # TODO: discover any subvolumes pending purge, and enqueue
-        # them in background_jobs at startup
-
-        # TODO: consume background_jobs
-        #   skip purge jobs if their fscid no longer exists
-
-        # TODO: on volume delete, cancel out any background jobs that
-        # affect subvolumes within that volume.
-
-        # ... any background init needed?  Can get rid of this
-        # and _initialized if not
-        self._initialized.set()
-
     def handle_command(self, inbuf, cmd):
-        self._initialized.wait()
-
         handler_name = "_cmd_" + cmd['prefix'].replace(" ", "_")
         try:
             handler = getattr(self, handler_name)