Skip to content

[Bug]: Raft election doesn't work with a certain networking settings #70567

Closed

Description

@nsychev

What happened?

Raft consensus uses opts["interface"] as a node's key in service.py. It claims that opts["id"] is not shared between masters, which is wrong (for example, masters' keys are stored as peers/<id>.pub, and we have data["peers"] with all IDs). {interface} ∪ cluster_peers is expected to be equal to interface in the voting process initialization.

This choice doesn't work in the many cases including the following ones (I encountered all of them at the same time):

  • if interface set to listen all addresses (0.0.0.0 or ::), it's the same for all masters
  • if there are domain names in cluster_peers — neither the documentation nor the common sense says that we can only use IP addresses
  • if we use IPv6 due to issues with adding brackets similar to ones described in [Bug]: A master cluster doesn't work with IPv6 peers #70559

Also it will fail if masters communicate by their public addresses and both are behind the NAT.

In most applications the interface option is used only for determining what address to bind to. It is never guaranteed to be unique. The consensus must use opts["id"] as a master's identifier.

Type of salt install

pip (pypi)

Major version

3008.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

ubuntu-24.04

salt --versions-report output

Salt Version:
          Salt: 3008.3-1
 
Python Version:
        Python: 3.14.7 (main, Sep 30 2026, 03:35:11) [GCC 11.2.0]
 
Dependency Versions:
          cffi: 2.0.0
      cherrypy: 18.10.0
  cryptography: 50.0.1
      dateutil: 2.9.0.post0
     docker-py: Not Installed
         gitdb: 4.0.12
     gitpython: 3.2.0
        Jinja2: 3.1.6
       libgit2: Not Installed
  looseversion: 1.3.0
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.2.1
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 24.0
     pycparser: 3.00
      pycrypto: Not Installed
  pycryptodome: 3.23.0
        pygit2: Not Installed
  python-gnupg: 0.5.6
        PyYAML: 6.0.3
         PyZMQ: 27.1.0
        relenv: 0.22.27
         smmap: 5.0.2
       timelib: 0.3.0
       Tornado: 6.5.10
           ZMQ: 4.3.5
 
Salt Package Information:
  Package Type: onedir
 
System Versions:
          dist: ubuntu 24.04.5 noble
        locale: utf-8
       machine: x86_64
       release: 5.15.179-15.2
        system: Linux
       version: Ubuntu 24.04.5 noble

Activity

  1. added
    bug
    on Oct 26, 2026
  2. added this to the Argon v3008.5 milestone on Oct 26, 2026
  3. added a commit that references this issue on Oct 27, 2026
    dfd4e94
  4. added
    severity-high
    on Oct 28, 2026
  5. added 2 commits that reference this issue on Oct 28, 2026
    b9d2d5f
    4aa4ddd
  6. added 2 commits that reference this issue on Nov 1, 2026
    987b077
    b695d8b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugseverity-high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions