need way to determine master status/information from slave

Bug #743958 reported by Joe Daly
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Medium
Joe Daly

Bug Description

If the slave can not connect to the master, currently error messages are printed out using errmsg_printf. There should be a status field or table in the sys_replication database that would show the error message trying to connect to the master, something to give a hint there is a problem. Currently if your not looking at drizzled in the console you have know way of knowing the master is inaccessible.

A table should also exist, that shows the masters information, currently the only way to find that is look it up in slave.cfg file.

Tags: slave-plugin
Joe Daly (skinny.moey)
Changed in drizzle:
assignee: nobody → Joe Daly (skinny.moey)
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 2011-04-11
tags: added: slave-plugin
Revision history for this message
David Shrewsbury (dshrews) wrote :

Hi Joe,

A table containing the master info is fine, just needs to be kept in sync with the info in the file. Also, the password for the master should not be stored in the databases. This was the main reason for using the file. The other info should be ok, though.

Changed in drizzle:
milestone: 2011-04-11 → 2011-04-25
Changed in drizzle:
milestone: 2011-04-25 → none
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

I reconfirm this bug:

$ cat slave/log
Replication slave: Access denied for user 'foo' (using password: YES)

Ok so slave is _not_ connected to master, yet:

drizzle> select * from io_state\G
*************************** 1. row ***************************
master_id: 1
   status: RUNNING
error_msg:

drizzle> select * from applier_state\G
*************************** 1. row ***************************
              master_id: 1
 last_applied_commit_id: 5
originating_server_uuid: AB6FC4C5-C76A-4E7B-8488-5264F1F40424
  originating_commit_id: 5
                 status: RUNNING
              error_msg:

Everything is RUNNING, which is wrong. These need to be STOPPED and there needs to be an error_msg.

Revision history for this message
David Shrewsbury (dshrews) wrote :

Daniel,

Actually, the states are technically correct. The thread states (maybe just i/o, can't recall) should go to STOPPED state after the slave gives up trying to reconnect. I think a better option is to change the i/o thread state to RECONNECTING or similar, so that it is more obvious.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Dave, yes good point. To be really helpful, perhaps:

DISCONNECTED = slave is disconnected and waiting between reconnect attempts

RECONNECTING = slave is attempting to reconnect; this can take awhile, specially if there's a network problem

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :
Revision history for this message
Stewart Smith (stewart) wrote :

This is fixed in 7.2 at least, we have sys_replication tables with lots of details.

Changed in drizzle:
status: Confirmed → Fix Released
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.