Changed mysql_server_init to the newer mysql_library_init. Fixed issue with directory
creation and added examples to gateway.cnf
This commit is contained in:
6
Makefile
6
Makefile
@ -23,7 +23,7 @@
|
||||
# 21/06/13 Mark Riddoch Addition of inih
|
||||
# 08/07/13 Mark Riddoch Addition of monitor modules
|
||||
|
||||
DEST=/usr/local/skysql
|
||||
DEST=/home/mriddoch/usr/local/skysql
|
||||
|
||||
all:
|
||||
(cd inih/extra ; make -f Makefile.static)
|
||||
@ -50,6 +50,10 @@ documentation:
|
||||
doxygen doxygate
|
||||
|
||||
install:
|
||||
@mkdir -p $(DEST)/gateway/modules
|
||||
@mkdir -p $(DEST)/gateway/log
|
||||
@mkdir -p $(DEST)/gateway/etc
|
||||
install gateway.cnf $(DEST)/gateway/etc
|
||||
(cd core; make DEST=$(DEST) install)
|
||||
(cd modules/routing; make DEST=$(DEST) install)
|
||||
(cd modules/protocol; make DEST=$(DEST) install)
|
||||
|
@ -88,7 +88,8 @@ depend:
|
||||
cc -M $(CFLAGS) $(SRCS) > depend.mk
|
||||
|
||||
install: gateway
|
||||
install -D $< $(DEST)
|
||||
@mkdir -p $(DEST)/bin
|
||||
install -D $< $(DEST)/bin
|
||||
|
||||
links:
|
||||
- ln -s $(ROOT_PATH)/epoll_v1.0/modules/routing/libdebugcli.so \
|
||||
|
@ -265,7 +265,7 @@ char ddopt[1024];
|
||||
{
|
||||
sprintf(datadir, "/tmp/gateway/data%d", getpid());
|
||||
mkdir("/tmp/gateway", 0777);
|
||||
mkdir(datadir, 022);
|
||||
mkdir(datadir, 0777);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -323,13 +323,13 @@ char ddopt[1024];
|
||||
}
|
||||
}
|
||||
|
||||
if (mysql_server_init(num_elements, server_options, server_groups))
|
||||
if (mysql_library_init(num_elements, server_options, server_groups))
|
||||
{
|
||||
skygw_log_write_flush(
|
||||
NULL, LOGFILE_ERROR,
|
||||
"Fatal : mysql_server_init failed. It is mandatory component needed "
|
||||
"by router service and gateway can't continue without it. Exiting.\n"
|
||||
"%s : %d\n", __FILE__, __LINE__);
|
||||
"Fatal : mysql_library_init failed, %s. This is mandatory component, required "
|
||||
"by router services and the gateway core, the gateway can't continue without it. Exiting.\n"
|
||||
"%s : %d\n", mysql_error(NULL), __FILE__, __LINE__);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
54
gateway.cnf
54
gateway.cnf
@ -2,10 +2,23 @@
|
||||
# Example gateway.cnf configuration file
|
||||
#
|
||||
#
|
||||
#
|
||||
# A genererate configuration session
|
||||
# Valid options are:
|
||||
# threads=<number of epoll threads>
|
||||
[gateway]
|
||||
threads=1
|
||||
|
||||
|
||||
# A series service definition
|
||||
# Valid option are
|
||||
# router=<name of router module>
|
||||
# servers=<server name>,<server name>,...
|
||||
# user=<User to fetch password inforamtion with>
|
||||
# auth=<Password of the user, plain text currently>
|
||||
#
|
||||
# Valid router modules currently are:
|
||||
# readwritesplit, readconnroute and debugcli
|
||||
[RW Split Service]
|
||||
type=service
|
||||
router=readwritesplit
|
||||
@ -22,6 +35,7 @@ servers=server1,server2,server3
|
||||
user=raatikka
|
||||
auth=vilho
|
||||
|
||||
# Definition of the servers
|
||||
[server1]
|
||||
type=server
|
||||
address=127.0.0.1
|
||||
@ -44,6 +58,11 @@ protocol=MySQLBackend
|
||||
type=service
|
||||
router=debugcli
|
||||
|
||||
# Listener definitions for the services
|
||||
# Valid options are:
|
||||
# service=<name of service defined elsewhere>
|
||||
# protocol=<name of protocol module with which to listen>
|
||||
# port<Listening port>
|
||||
[Debug Listener]
|
||||
type=listener
|
||||
service=Debug Service
|
||||
@ -62,20 +81,27 @@ service=RW Split Service
|
||||
protocol=MySQLClient
|
||||
port=4006
|
||||
|
||||
#[MySQL Monitor]
|
||||
#type=monitor
|
||||
#module=mysqlmon
|
||||
#servers=server1,server2,server3
|
||||
#user=raatikka
|
||||
#auth=vilho
|
||||
# Define a monitor that can be used to determine the state and role of
|
||||
# the servers.
|
||||
# Valid options are:
|
||||
# module=<name of module to load>
|
||||
# servers=<server name>,<server name>,...
|
||||
# user=<user name - must have slave replication and slave client privileges>
|
||||
# auth=<password of the above user, plain text currently>
|
||||
[MySQL Monitor]
|
||||
type=monitor
|
||||
module=mysqlmon
|
||||
servers=server1,server2,server3
|
||||
user=raatikka
|
||||
auth=vilho
|
||||
|
||||
|
||||
#[HTTPD Service]
|
||||
#type=service
|
||||
#router=testroute
|
||||
[HTTPD Service]
|
||||
type=service
|
||||
router=testroute
|
||||
|
||||
#[HTTPD Listener]
|
||||
#type=listener
|
||||
#service=HTTPD Service
|
||||
#protocol=HTTPD
|
||||
#port=6444
|
||||
[HTTPD Listener]
|
||||
type=listener
|
||||
service=HTTPD Service
|
||||
protocol=HTTPD
|
||||
port=6444
|
||||
|
Reference in New Issue
Block a user