Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
25.10.2
-
None
Description
The current code determines if some node is a read replica by comparing ModuleIPAddr and its pmX_WriteEngineServer addresses. If for some reason they are inconsistent (first contains hostname and second contains IP address or vice versa), they are found to be different and cmapi decides that it is a read replica.
It should not happen, because the code that writes these fields writes them consistently as IP addresses, but manual edits can cause this problem.
Current approach is overcomplicated, checking that PM we check has a writeengine section it would be enough
To test it, just add some node and then change its ModuleIPAddr to hostname and check that node is not a read replica