Addition of a Galera Cluster monitor - sets state of joined on nodes that are joined to

the cluster. 

Also updates to the readconnroute module to allow joined as a router option
This commit is contained in:
Mark Riddoch
2013-07-22 17:24:15 +02:00
parent 233b3afd81
commit 3407dff210
10 changed files with 396 additions and 28 deletions

View File

@ -399,6 +399,7 @@ static struct {
{ "running", SERVER_RUNNING },
{ "master", SERVER_MASTER },
{ "slave", SERVER_SLAVE },
{ "joined", SERVER_JOINED },
{ NULL, 0 }
};
/**

View File

@ -48,7 +48,27 @@ readconnroute.o: readconnroute.c /usr/include/stdio.h \
/usr/include/assert.h /usr/include/unistd.h \
/usr/include/bits/posix_opt.h /usr/include/bits/environments.h \
/usr/include/bits/confname.h /usr/include/getopt.h \
/home/mriddoch/Repository/skygateway/log_manager/log_manager.h
/home/mriddoch/Repository/skygateway/log_manager/log_manager.h \
../include/mysql_client_server_protocol.h /usr/include/stdint.h \
/usr/include/bits/wchar.h /usr/include/openssl/sha.h \
/usr/include/openssl/e_os2.h /usr/include/openssl/opensslconf.h \
/usr/include/openssl/opensslconf-x86_64.h /usr/include/sys/ioctl.h \
/usr/include/bits/ioctls.h /usr/include/asm/ioctls.h \
/usr/include/asm-generic/ioctls.h /usr/include/linux/ioctl.h \
/usr/include/asm/ioctl.h /usr/include/asm-generic/ioctl.h \
/usr/include/bits/ioctl-types.h /usr/include/sys/ttydefaults.h \
/usr/include/errno.h /usr/include/bits/errno.h \
/usr/include/linux/errno.h /usr/include/asm/errno.h \
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \
/usr/include/sys/socket.h /usr/include/sys/uio.h /usr/include/bits/uio.h \
/usr/include/bits/socket.h /usr/include/bits/sockaddr.h \
/usr/include/asm/socket.h /usr/include/asm-generic/socket.h \
/usr/include/asm/sockios.h /usr/include/asm-generic/sockios.h \
/usr/include/netinet/in.h /usr/include/bits/in.h \
/usr/include/arpa/inet.h \
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include/stdbool.h \
/usr/include/fcntl.h /usr/include/bits/fcntl.h /usr/include/bits/stat.h \
../../include/poll.h ../../include/users.h ../../include/hashtable.h
debugcli.o: debugcli.c /usr/include/stdio.h /usr/include/features.h \
/usr/include/sys/cdefs.h /usr/include/bits/wordsize.h \
/usr/include/gnu/stubs.h /usr/include/gnu/stubs-64.h \
@ -93,4 +113,5 @@ debugcmd.o: debugcmd.c /usr/include/stdio.h /usr/include/features.h \
../../include/gwbitmask.h ../../include/server.h ../../include/session.h \
../../include/router.h ../../include/modules.h ../../include/atomic.h \
../../include/poll.h ../../include/users.h ../../include/hashtable.h \
../include/debugcli.h
../../include/dbusers.h ../../include/config.h ../include/telnetd.h \
../../include/adminusers.h ../include/debugcli.h

View File

@ -51,11 +51,13 @@
* 27/06/2013 Vilho Raatikka Added skygw_log_write command as an example
* and necessary headers.
* 17/07/2013 Massimiliano Pinto Added clientReply routine:
called by backend server to send data to client
Included mysql_client_server_protocol.h
with macros and MySQL commands with MYSQL_ prefix
avoiding any conflict with the standard ones
in mysql.h
* called by backend server to send data to client
* Included mysql_client_server_protocol.h
* with macros and MySQL commands with MYSQL_ prefix
* avoiding any conflict with the standard ones
* in mysql.h
* 22/07/13 Mark Riddoch Addition of joined router option for Galera
* clusters
*
* @endverbatim
*/
@ -209,6 +211,11 @@ int i, n;
inst->bitmask |= (SERVER_MASTER|SERVER_SLAVE);
inst->bitvalue |= SERVER_SLAVE;
}
else if (!strcasecmp(options[i], "joined"))
{
inst->bitmask |= (SERVER_JOINED);
inst->bitvalue |= SERVER_JOINED;
}
}
}