pt-heartbeat check-read-only option does not prevent creates or inserts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Frank Cizmich |
Bug Description
pt-heartbeat 2.2.8
Server version: 5.5.35-33.0-log Percona Server (GPL), Release rel33.0, Revision 611
CentOS release 6.5 (Final)
Linux 2.6.32-
# cat /etc/percona-
utc
With create-table option
# pt-heartbeat -uSUSR_Heartbeat --ask-pass --database heartbeat --table heartbeat --update --create-table --daemonize --stop --check-read-only
Successfully created file /tmp/pt-
Enter password:
DBD::mysql::db do failed: The MySQL server is running with the --read-only option so it cannot execute this statement [for Statement " CREATE TABLE IF NOT EXISTS `heartbeat`
ts varchar(26) NOT NULL,
server_id int unsigned NOT NULL PRIMARY KEY,
file varchar(255) DEFAULT NULL, -- SHOW MASTER STATUS
position bigint unsigned DEFAULT NULL, -- SHOW MASTER STATUS
relay_
exec_
);"] at /usr/bin/
Without create-table option
# pt-heartbeat -uSUSR_Heartbeat --ask-pass --database heartbeat --table heartbeat --update --daemonize --stop --check-read-only
Successfully created file /tmp/pt-
Enter password:
DBD::mysql::db do failed: The MySQL server is running with the --read-only option so it cannot execute this statement [for Statement "INSERT INTO `heartbeat`
Related branches
- Daniel Nichter: Needs Fixing
-
Diff: 36 lines (+26/-0)1 file modifiedbin/pt-heartbeat (+26/-0)
summary: |
- check-read-only option does not prevent creates or inserts + pt-heartbeat check-read-only option does not prevent creates or inserts |
tags: | added: pt-heartbeat |
Changed in percona-toolkit: | |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
status: | Opinion → In Progress |
importance: | Undecided → Medium |
milestone: | none → 2.2.12 |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Hello Monty,
The check-read-only option is there to allow pt-heartbeat to continue running (waiting) if the read_only restriction is temporarily set and later removed.
If pt-heartbeat is initiated while read_only is set AND the heartbeat table isn't already created and initialized AND the user hasn't super privilege, it can't do it's job and should not begin to run.
Maybe clearer error messages, and perhaps documentation of this behavior is in order.
Regards,
Frank