Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition in leader election for OCP #455

Merged
merged 1 commit into from
Jun 14, 2023

Commits on Jun 13, 2023

  1. Fix race condition in leader election for OCP

    In OCP we have two steps to prepare a node before we drain it.
    first we get leader election and annotate the node with Draining
    and then we pause the MCP and mark the node as MCP paused.
    
    if the config_daemon get a reset between the fist part to the second
    it will get stuck because one node will take the leader election
    BUT it will not mark the node as Draining as there is another node
    already draining. and the node with the draining label will try to get
    the drain lock again but the first node has it.
    
    with this change if the node as Draning or MCP pause label it will not
    try to take the lock again and just continue after the reset.
    
    Signed-off-by: Sebastian Sch <[email protected]>
    SchSeba committed Jun 13, 2023
    Configuration menu
    Copy the full SHA
    f3845a7 View commit details
    Browse the repository at this point in the history