"standby switchover": check demotion candidate can make replication connection

Check it's actually possible for the demotion candidate to attach to
the promotion candidate before executing the switchover.

As with other checks of this nature, there's a faint possibility the
situation could change between the time the check is carried out and
the demotion candidate is restarted to connect to the promotion candidate,
but there's not a lot we can do about that. The main purpose is to
be able to catch existing misconfigurations before anything gets changed.

Implements GitHub #370.
This commit is contained in:
Ian Barwick
2018-02-08 16:59:30 +09:00
committed by Ian Barwick
parent 76a93af15c
commit 927bf038a0
6 changed files with 205 additions and 14 deletions

View File

@@ -79,6 +79,14 @@ typedef enum
NODE_STATUS_UNCLEAN_SHUTDOWN
} NodeStatus;
typedef enum
{
CONN_UNKNOWN = -1,
CONN_OK,
CONN_BAD,
CONN_ERROR
} ConnectionStatus;
typedef enum
{
SLOT_UNKNOWN = -1,