]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/smb: stop trying to clean external store during cluster sync 59658/head
authorJohn Mulligan <jmulligan@redhat.com>
Sun, 8 Sep 2024 14:42:36 +0000 (10:42 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Mon, 9 Sep 2024 14:04:02 +0000 (10:04 -0400)
commitde29f25ef2ac786cf5e5d5dd5e04b0355f488f3f
tree58afab416d95cfb71e8c5286735f35b341b5e410
parent8b5058caaedf7d4d18a4a0b3fc91cfe312270aee
mgr/smb: stop trying to clean external store during cluster sync

It was found during testing that a sequence of commands like:
```
ceph smb cluster create slow1 user --define-user-pass=user1%badf00d --clustering=always
--placement=3
sleep 0.5
ceph smb share create slow1 share1 cephfs --subvolume=g1/sv1 --path=/
sleep 0.5
ceph smb share create slow1 share2 cephfs --subvolume=g1/sv2 --path=/
```
would create a CTDB enabled cluster that would fail to start up
correctly. The issue was due to the call to `external.rm_other_in_ns`
during the cluster sync operation. In the CTDB enabled mode, objects are
written to the pool outside of the smb mgr module's direct control, in
particular `cluster.meta.json`, and this function, intended to keep the
pool & namespace tidy, was removing objects needed by CTDB-enabled mode.
The failure is somewhat timing sensitive due to the ctdb enablement
sidecars coming up before or after the object was deleted.

Remove this function call so that these objects stop getting deleted at
inopportune times. While we could have tried making this function
"smarter" and only deleting some unexpected objects, in this case I feel
that keeping it simple is better. If we find this pool getting cluttered
in the future we can add a smarter pool-tidying-up function later.

Fixes: https://tracker.ceph.com/issues/67946
Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/pybind/mgr/smb/handler.py