make_replication_sandbox create my.sandbox.cnf with wrong report-port

Bug #504976 reported by Vitaliy Okulov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Sandbox
Confirmed
Undecided
Unassigned

Bug Description

I use latest sandbox and notice that make_replication_sandbox create my.sandbox.cnf for node1 and node2 with wrong report-port, in configuration file report-port equal to master mysql server port.

But i think it must be equal to slave sql port. I attach patch.

Revision history for this message
Vitaliy Okulov (vitaliy-okulov) wrote :
Revision history for this message
Giuseppe Maxia (giuseppe-maxia) wrote :

Thanks for your report, but this is not a bug.
According to the manual, the report-port is "The TCP/IP port number for connecting to the slave, to be reported to the master during slave registration"
http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#option_mysqld_report-port

We could question the usefulness of this option (and many people have), but at the moment the meaning of this option is the master's port.

Changed in mysql-sandbox:
status: New → Won't Fix
Revision history for this message
Vitaliy Okulov (vitaliy-okulov) wrote :

But why?

According to manual: "The TCP/IP port number for connecting to the slave, to be reported to the master during slave registration. Set this only if the slave is listening on a nondefault port or if you have a special tunnel from the master or other clients to the slave. If you are not sure, do not use this option."

Sandbox use nondefault port and when it set towhen i user SHOW SLAVE HOSTS quaery i can't get slave sql server port.

Revision history for this message
Vitaliy Okulov (vitaliy-okulov) wrote :

Sorry for errors +)

Sandbox use nondefault port and when it set to master server sql port number SHOW SLAVE HOSTS query work incorrect.*
.

Revision history for this message
Giuseppe Maxia (giuseppe-maxia) wrote :

I agree that it is a misleading option, but this is how MySQL is supposed to work according to the official manual ("connecting to the slave" means the port on the master).
If we want to change this behavior, we need to make it with a command line option, because other users may expect the original feature.
If you want to patch the script to include a "--report_slave_port" option, I will consider it. Notice that this should also take care of circular replication, which is defined in make_multiple_sandbox.

Revision history for this message
Vitaliy Okulov (vitaliy-okulov) wrote :

"The TCP/IP port number for connecting to the slave" - its mean slave sql port number
"to be reported to the master during slave registration" - when slave server connect to master, master server set port number in show slave hosts to value of report-port of slave server.

Thats why there is notice - "Set this only if the slave is listening on a nondefault port".

Also --report-port=slave_port_num (http://dev.mysql.com/doc/refman/5.0/en/replication-options-slave.html#option_mysqld_report-port)

slave_port_num - i think its really slave sql port number, but not master sql port.

Revision history for this message
Giuseppe Maxia (giuseppe-maxia) wrote :

OK. You convinced me.
I was interpreting the docs with the knowledge that in MySQL replication only the slave does something active to connect to the master, while the master does not know anything of the slaves. Thus, "connecting to the slave" means that the slave asks the master for the latest binary logs.
The documentation is still fuzzy (also because this option is really hard to understand), but I will apply your patch with the next release.

Thanks

Changed in mysql-sandbox:
status: Won't Fix → Confirmed
Revision history for this message
Vitaliy Okulov (vitaliy-okulov) wrote :

Ok, thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.