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

core: store and check for Raft version changes #12362

Merged
merged 3 commits into from
Mar 24, 2022
Merged

Commits on Mar 23, 2022

  1. core: store and check for Raft version changes

    Downgrading the Raft version protocol is not a supported operation.
    Checking for a downgrade is hard since this information is not stored in
    any persistent place. When a server re-joins a cluster with a prior Raft
    version, the Serf tag is updated so Nomad can't tell that the version
    changed.
    
    Mixed version clusters must be supported to allow for zero-downtime
    rolling upgrades. During this it's expected that the cluster will have
    mixed Raft versions. Enforcing consistency strong version consistency
    would disrupt this flow.
    
    The approach taken here is to store the Raft version on disk. When the
    server starts the `raft_protocol` value is written to the file
    `data_dir/raft/version`. If that file already exists, its content is
    checked against the current `raft_protocol` value to detect downgrades
    and prevent the server from starting.
    
    Any other types of errors are ignore to prevent disruptions that are
    outside the control of operators. The only option in cases of an invalid
    or corrupt file would be to delete it, making this check useless. So
    just overwrite its content with the new version and provide guidance on
    how to check that their cluster is an expected state.
    lgfa29 committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    ddf636e View commit details
    Browse the repository at this point in the history
  2. changelog: add entry for #12362

    lgfa29 committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    67c112c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6cafda2 View commit details
    Browse the repository at this point in the history