Why do the grastate.dat always show a 'seqno: -1' on a functional cluster node?
Issue
On a functional cluster I am checking the content of /var/lib/mysql/grastate.dat
and see -1
for the seqno
.
# GALERA saved state
version: 2.1
uuid: 42f2d8f0-0575-11e6-b6e8-3b5301dcb350
seqno: -1
cert_index:
As per galera documentation, the nodes seem to have crashed:
2.3.2 Identifying Crashed Nodes
If the grastate.dat file looks like the example below, the node has either crashed during execution of a nontransactional
operation, (such as ALTER TABLE), or aborted due to a database inconsistency:
# GALERA saved state
version: 2.1
uuid: 5ee99582-bb8d-11e2-b8e3-23de375c1d30
seqno: -1
cert_index:
It is possible for you to recover the Global Transaction ID of the last committed transaction from InnoDB, as described
above, but the recovery is rather meaningless. After the crash, the node state is probably corrupted and may not even
prove functional.
In the event that there are no other nodes in the cluster with a well-defined state, then there is no need to preserve the
node state ID. You must perform a thorough database recovery procedure, similar to that used on standalone database
servers. Once you recover one node, use it as the first node in a new cluster.
Environment
Red Hat OpenStack Platform
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.