Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6911

Slaves do not auto-register themselves with master

    Details

    • Type: Task
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Replication
    • Labels:
      None

      Description

      If the report-host variable is not manually set on the slaves, the hostname or IP address is not automatically registered with the master and SHOW SLAVE HOSTS reports an empty string:

      MariaDB [(none)]> show slave hosts;

      Server_id Host Port Master_id
      12   3306 11

      This causes replication topology auto-discovery to be impractical, and advanced tools (such as failover management or replication hierarchy management tools) to be a pain to develop.

      Suggestion is to set report-host with a default value, e.g. syscall to gethostname or gethostbyname.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            Moved to Type=Task since it now works as specified, so it's not exactly a bug.

            For a note, now report-host can be left empty if it's unnecessary (or undesirable, on whatever reason) to register the slave with the master. If the default behavior is implemented as suggested, this possibility will be lost, and also old configurations will start working differently.

            Show
            elenst Elena Stepanova added a comment - Moved to Type=Task since it now works as specified, so it's not exactly a bug. For a note, now report-host can be left empty if it's unnecessary (or undesirable, on whatever reason) to register the slave with the master. If the default behavior is implemented as suggested, this possibility will be lost, and also old configurations will start working differently.
            Hide
            joffrey Joffrey MICHAIE added a comment - - edited

            Hi, right now, we have to manually set the hostname as report_host on the slaves, for it to be displayed.
            What would be the problem if we by default, report_host = @@hostname ? I don't see what it can break, in a different way than when we set manually the parameter.

            Show
            joffrey Joffrey MICHAIE added a comment - - edited Hi, right now, we have to manually set the hostname as report_host on the slaves, for it to be displayed. What would be the problem if we by default, report_host = @@hostname ? I don't see what it can break, in a different way than when we set manually the parameter.

              People

              • Assignee:
                Unassigned
                Reporter:
                tanj Guillaume Lefranc
              • Votes:
                2 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: