]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mirroring: start from correct state during policy init
authorVenky Shankar <vshankar@redhat.com>
Thu, 29 Apr 2021 09:01:21 +0000 (05:01 -0400)
committerVenky Shankar <vshankar@redhat.com>
Thu, 27 May 2021 13:35:21 +0000 (09:35 -0400)
commit09e7f87d6b268f07870a00e02b6ab82274cc7350
treede322f4187f163709a6ec95a0f8232043c5137db
parentc235d460ac766c0a76766516b7f9b856882405cd
pybind/mirroring: start from correct state during policy init

So, there were couple of issues here:

First, Policy::init() checks if the directory path has a purge
operation (remove) requested. This check is incorrect since the
`purging` flag is fetched from the directory mapping rather than
from the directory entry in the mapping itself.

Second, the starting state for a directory path was being set
again. Though this was not incorrect, it is redundant and can
be removed.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 8886eb8389f3c4e52760930f545383fe28f81859)
src/pybind/mgr/mirroring/fs/dir_map/policy.py