SHOW GLOBAL STATUS like ‘wsrep%’ will show you if the node is in a Donor/Desynced mode, but this could mean 3 possible things:
- Node is SST Donor
- Node is IST Donor
- Node is in wsrep_desync=ON state
The clustercheck script will (given the right option) report the node is unavailable if the node is in the Donor/Desynced state, but as you point out that doesn’t mean the node can’t take client connections. IST is non-blocking, so clients could continue there. We could file a bug (https://bugs.launchpad.net/percona-xtradb-cluster/+bugs) and see if it’s conceivable to have such an indicator, but even an SST like Xtrabackup is mostly non-blocking, so we may want to keep clients on the node until it takes the file lock.
Maybe IST and SST don’t matter, and what you really want is to know when the wsrep provider is actually “paused” as reported in the log when a Donor actually gets a lock. (http://www.mysqlperformanceblog.com/2013/10/08/taking-backups-percona-xtradb-cluster-without-stalls-flow-control/). You can determine this after it happens by watching the size of the local recv queue: a backlog there on a Donor node indicates a locked provider, but you only see that after the lock happens, which may be too late to take clients cleanly out of rotation.