pyclustercheck doesn't work as expected when available when donor is enabled

Bug #1211249 reported by Frederic Descamps
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Released
Undecided
Raghavendra D Prabhu

Bug Description

see https://github.com/Oneiroi/clustercheck/issues/2

When it's started with -a 1 like this:

pyclustercheck -a 1

the result is not ok when the server is donor:

mysql -e "show global status like 'wsrep_local_sta%';"; curl 127.0.0.1:8000
+---------------------------+--------------------------------------+
| Variable_name | Value |
+---------------------------+--------------------------------------+
| wsrep_local_state_uuid | 347f0730-fe88-11e2-b09c-4b2817e98824 |
| wsrep_local_state | 2 |
| wsrep_local_state_comment | Donor/Desynced |
+---------------------------+--------------------------------------+
CACHED: Percona XtraDB Cluster Node is not synced

Changing the if condition like bellow (addind int( ) )works:

    elif res[0]['Value'] == '4' or (int(opts.available_when_donor) == 1 and res[0]['Value'] == '2'):

example:

 mysql -e "show global status like 'wsrep_local_sta%';"; curl 127.0.0.1:8000
+---------------------------+--------------------------------------+
| Variable_name | Value |
+---------------------------+--------------------------------------+
| wsrep_local_state_uuid | 347f0730-fe88-11e2-b09c-4b2817e98824 |
| wsrep_local_state | 2 |
| wsrep_local_state_comment | Donor/Desynced |
+---------------------------+--------------------------------------+
Percona XtraDB Cluster Node is synced

Tags: i32811
Revision history for this message
Frederic Descamps (lefred) wrote :

#32811

Revision history for this message
Raghavendra D Prabhu (raghavendra-prabhu) wrote :

Thanks for reporting, fixed it now.

Changed in percona-xtradb-cluster:
assignee: nobody → Raghavendra D Prabhu (raghavendra-prabhu)
status: New → Triaged
milestone: none → 5.5.33-23.7.6
tags: added: i32811
Changed in percona-xtradb-cluster:
status: Triaged → Fix Committed
Changed in percona-xtradb-cluster:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1417

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.