]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/volumes: Use operation type during subvolume open
authorShyamsundar Ranganathan <srangana@redhat.com>
Thu, 2 Jul 2020 01:08:34 +0000 (21:08 -0400)
committerShyamsundar Ranganathan <srangana@redhat.com>
Mon, 10 Aug 2020 18:14:40 +0000 (14:14 -0400)
commit062184a39b8b198e55989073a9efaf3c687226a7
tree04803b33bf3fa01c17b1f858034186108bfc7f51
parentaa50a1c6d3757cd0a2e1be2cd61a923ccd14c244
mgr/volumes: Use operation type during subvolume open

Subvolume open currently takes in 2 optional parameters to
denote desired state and type. This enables the open to
allow the operation to suceed based on the (type, state)
tuple.

Instead, pass an operation type to be performed on a subvolume
during open, and decide internal to a subvolume version if the
operation is allowed based on its state and type.

Also modifies the state machine code, to be more amenable to
modifications and improves redability.

Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit f380bf79435ccae21df12d19e530ef0d89a5cc8d)

Conflicts:
    src/pybind/mgr/volumes/fs/operations/op_sm.py
subvol pin operation is not backported, required manual resolution
    src/pybind/mgr/volumes/fs/volume.py
mypy type checks are not backported, required manual resolution
src/pybind/mgr/volumes/fs/async_cloner.py
src/pybind/mgr/volumes/fs/operations/op_sm.py
src/pybind/mgr/volumes/fs/operations/subvolume.py
src/pybind/mgr/volumes/fs/operations/template.py
src/pybind/mgr/volumes/fs/operations/versions/__init__.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_base.py
src/pybind/mgr/volumes/fs/operations/versions/subvolume_v1.py
src/pybind/mgr/volumes/fs/volume.py