2009/6/30 Iustin Pop <[email protected]>: > > This patch fixes a few node readd issues. > > Currently, the node readd consists of two opcodes: > - OpSetNodeParms, which resets the offline/drained flags > - OpAddNode (with readd=True), which reconfigures the node > > The problem is that between these two, the configuration is inconsistent > for certain cluster configurations. Thus, this patch removes the first > opcode and modified the LUAddNode to deal with this case too. > > The patch also modifies the computation of the intended master_candidate > status, and actually sets the readded node to master candidate if > needed. Previously, we didn't modify the existing node at all. > > Finally, the patch modifies the bottom of the Exec() function for this > LU to: > - trigger a node update, which in turn redistributes the ssconf files > to all nodes (and thus the new node too) > - if the new node is not a master candidate, then call the > node_demote_from_mc RPC so that old master files are cleared > > My testing shows this behaves correctly for various cases. > --- > Note: this is for master. If this is broken, at worst node readd is > broken, so I think it's an acceptable risk.
LGTM
