mgr: block registration of a module's client#51169
Conversation
|
Based on Patrick's suggestion here #51169 (comment) , I've update the draft. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
Needs rebease. |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
@ajarr what's left to do for this PR? |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
|
@ajarr - checking if this is something that you would still be willing to work? |
@vshankar feel free to take over. Please see pending comment, #51169 (comment) |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
... until the registration is reflected in the new MgrMap received
from the monitor. This guarantees that the monitor can blocklist all
the registered clients of the mgr being dropped by the monitor.
And this also prevents the possible racing of the clients of the mgr
being failed that reconnect on being blocklisted against the clients
of the standby mgr being promoted during mgr failover.
When a module is registering a client, the client is first registered
in the mgr's py_module_registry. Next time the mgr sends a beacon to
the monitor, it requests the monitor to register the client in the
its py_module_registry onto the monitor's MgrMap. The monitor on
receiving the beacon registers the client in the MgrMap, and sends an
updated MgrMap to the mgr. It's possible that a mgr module registers
its client in the py_module_registy, and when waiting for the client
to be registered in the monitor's MgrMap another mgr thread deregisters
the client from the py_module_registry. Here, the mgr will never send
a beacon message requesting for the client to be registered in the
MgrMap as the client is no longer in the py_module_registry. So the
module will be stuck waiting for the MgrMap with the client registered
in it. To prevent such a scenario, error out of the module's client
registration after receiving the new MgrMap from the monitor and
noticing that the client is not in the mgr's py_module_registry.
Fixes: https://tracker.ceph.com/issues/58924
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows