Bug #79010
closedcephfs-mirror: directories do not rebalance when a stopped daemon is brought back online
0%
Description
When two cephfs-mirror daemons are deployed and directories are distributed across them (2+2 split), stopping one daemon correctly triggers failover — the surviving daemon picks up all 4 directories.
However, when the stopped daemon is brought back online, the directories are not automatically redistributed back to a 2+2 split. All 4 directories remain on the surviving daemon, and the restarted daemon sits idle with 0 directories.
Steps to Reproduce:
1. Deploy 2 cephfs-mirror daemons:
2. Add 4 directories for mirroring.
3. Verify initial distribution — observe 2+2 split
4. Stop 2nd daemon.
5. Wait 60 seconds. Check distribution — Serviving daemon owns all 4 directories. (Failover works correctly.)
6. Bring back the 2nd daemon online
7. Wait 60–120 seconds. Check both daemons again.
Result: The old daemon owns all 4 directories. Restarted one has 0 directories (idle).
KU Updated by Karthik U S 4 months ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 70942
KU Updated by Karthik U S 4 months ago
RCA:
Primary bug: On daemon rejoin, directory shuffle hits can_shuffle_dir(), which incorrectly uses dir_state['mapped_time'] on a DirectoryState object and raises a TypeError. The exception is swallowed by the Finisher, so no directories are remapped and the restarted daemon stays idle.
Secondary issue: Even with that fixed, dirs remapped during failover get a fresh mapped_time, and shuffle is blocked for 300 seconds. If the daemon rejoins within that window, nothing is reshuffled — and there is no later retry, so the imbalance can persist indefinitely.
VS Updated by Venky Shankar 4 months ago
- Target version set to v22.0.0
- Source set to Development
- Backport set to umbrella,tentacle,squide
UB Updated by Upkeep Bot 27 days ago
- Copied to Backport #82856: umbrella: cephfs-mirror: directories do not rebalance when a stopped daemon is brought back online added
UB Updated by Upkeep Bot 27 days ago
- Copied to Backport #82857: tentacle: cephfs-mirror: directories do not rebalance when a stopped daemon is brought back online added
UB Updated by Upkeep Bot 27 days ago
Redmine Upkeep failure¶
The redmine-upkeep.py script failed to update this issue. I have added the flag "upkeep-failed" to avoid looking at this issue again.
Please manually fix the issue and remove "upkeep-failed" flag to allow future upkeep operations.
Transformation¶
The script was in the create_backports transformation.
Update Log¶
Error¶
Redmine Update failed:
Traceback (most recent call last):
File "/home/runner/work/ceph/ceph/ceph/src/script/redmine-upkeep.py", line 1173, in _transform_create_backports
other = self.R.issue.create(**create_args)
File "/opt/hostedtoolcache/Python/3.14.10/x64/lib/python3.14/site-packages/redminelib/managers/base.py", line 187, in create
response = self.redmine.engine.request(self.resource_class.http_method_create, url, data=request)
File "/opt/hostedtoolcache/Python/3.14.10/x64/lib/python3.14/site-packages/redminelib/engines/base.py", line 84, in request
return self.process_response(self.session.request(method, url, **kwargs))
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.14.10/x64/lib/python3.14/site-packages/redminelib/engines/base.py", line 188, in process_response
raise exceptions.ValidationError(', '.join(': '.join(e) if isinstance(e, list) else e for e in errors))
redminelib.exceptions.ValidationError: Ceph release is not included in the list
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/runner/work/ceph/ceph/ceph/src/script/redmine-upkeep.py", line 1179, in _transform_create_backports
other = self.R.issue.create(**create_args)
File "/opt/hostedtoolcache/Python/3.14.10/x64/lib/python3.14/site-packages/redminelib/managers/base.py", line 187, in create
response = self.redmine.engine.request(self.resource_class.http_method_create, url, data=request)
File "/opt/hostedtoolcache/Python/3.14.10/x64/lib/python3.14/site-packages/redminelib/engines/base.py", line 84, in request
return self.process_response(self.session.request(method, url, **kwargs))
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.14.10/x64/lib/python3.14/site-packages/redminelib/engines/base.py", line 188, in process_response
raise exceptions.ValidationError(', '.join(': '.join(e) if isinstance(e, list) else e for e in errors))
redminelib.exceptions.ValidationError: Ceph release is not included in the list
Update Payload¶
{
"issue": {
"custom_fields": [
{
"id": 33,
"value": "29dab52f31caf5974e78a1726f65a63114accbbc"
},
{
"id": 34,
"value": "v22.0.0-546-g29dab52f31"
},
{
"id": 37,
"value": "2026-11-06T07:05:19+00:00"
}
],
"status_id": 14
},
"suppress_mail": "1"
}
KU Updated by Karthik U S 27 days ago
- Backport changed from umbrella,tentacle,squide to umbrella,tentacle,squid
KH Updated by Kotresh Hiremath Ravishankar 14 days ago
- Status changed from Fix Under Review to Pending Backport