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
|
# 21/06/13 Mark Riddoch Addition of inih
|
||||||
# 08/07/13 Mark Riddoch Addition of monitor modules
|
# 08/07/13 Mark Riddoch Addition of monitor modules
|
||||||
|
|
||||||
DEST=/usr/local/skysql
|
DEST=/home/mriddoch/usr/local/skysql
|
||||||
|
|
||||||
all:
|
all:
|
||||||
(cd inih/extra ; make -f Makefile.static)
|
(cd inih/extra ; make -f Makefile.static)
|
||||||
@ -50,6 +50,10 @@ documentation:
|
|||||||
doxygen doxygate
|
doxygen doxygate
|
||||||
|
|
||||||
install:
|
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 core; make DEST=$(DEST) install)
|
||||||
(cd modules/routing; make DEST=$(DEST) install)
|
(cd modules/routing; make DEST=$(DEST) install)
|
||||||
(cd modules/protocol; make DEST=$(DEST) install)
|
(cd modules/protocol; make DEST=$(DEST) install)
|
||||||
|
@ -88,7 +88,8 @@ depend:
|
|||||||
cc -M $(CFLAGS) $(SRCS) > depend.mk
|
cc -M $(CFLAGS) $(SRCS) > depend.mk
|
||||||
|
|
||||||
install: gateway
|
install: gateway
|
||||||
install -D $< $(DEST)
|
@mkdir -p $(DEST)/bin
|
||||||
|
install -D $< $(DEST)/bin
|
||||||
|
|
||||||
links:
|
links:
|
||||||
- ln -s $(ROOT_PATH)/epoll_v1.0/modules/routing/libdebugcli.so \
|
- 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());
|
sprintf(datadir, "/tmp/gateway/data%d", getpid());
|
||||||
mkdir("/tmp/gateway", 0777);
|
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(
|
skygw_log_write_flush(
|
||||||
NULL, LOGFILE_ERROR,
|
NULL, LOGFILE_ERROR,
|
||||||
"Fatal : mysql_server_init failed. It is mandatory component needed "
|
"Fatal : mysql_library_init failed, %s. This is mandatory component, required "
|
||||||
"by router service and gateway can't continue without it. Exiting.\n"
|
"by router services and the gateway core, the gateway can't continue without it. Exiting.\n"
|
||||||
"%s : %d\n", __FILE__, __LINE__);
|
"%s : %d\n", mysql_error(NULL), __FILE__, __LINE__);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
54
gateway.cnf
54
gateway.cnf
@ -2,10 +2,23 @@
|
|||||||
# Example gateway.cnf configuration file
|
# Example gateway.cnf configuration file
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# A genererate configuration session
|
||||||
|
# Valid options are:
|
||||||
|
# threads=<number of epoll threads>
|
||||||
[gateway]
|
[gateway]
|
||||||
threads=1
|
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]
|
[RW Split Service]
|
||||||
type=service
|
type=service
|
||||||
router=readwritesplit
|
router=readwritesplit
|
||||||
@ -22,6 +35,7 @@ servers=server1,server2,server3
|
|||||||
user=raatikka
|
user=raatikka
|
||||||
auth=vilho
|
auth=vilho
|
||||||
|
|
||||||
|
# Definition of the servers
|
||||||
[server1]
|
[server1]
|
||||||
type=server
|
type=server
|
||||||
address=127.0.0.1
|
address=127.0.0.1
|
||||||
@ -44,6 +58,11 @@ protocol=MySQLBackend
|
|||||||
type=service
|
type=service
|
||||||
router=debugcli
|
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]
|
[Debug Listener]
|
||||||
type=listener
|
type=listener
|
||||||
service=Debug Service
|
service=Debug Service
|
||||||
@ -62,20 +81,27 @@ service=RW Split Service
|
|||||||
protocol=MySQLClient
|
protocol=MySQLClient
|
||||||
port=4006
|
port=4006
|
||||||
|
|
||||||
#[MySQL Monitor]
|
# Define a monitor that can be used to determine the state and role of
|
||||||
#type=monitor
|
# the servers.
|
||||||
#module=mysqlmon
|
# Valid options are:
|
||||||
#servers=server1,server2,server3
|
# module=<name of module to load>
|
||||||
#user=raatikka
|
# servers=<server name>,<server name>,...
|
||||||
#auth=vilho
|
# 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]
|
[HTTPD Service]
|
||||||
#type=service
|
type=service
|
||||||
#router=testroute
|
router=testroute
|
||||||
|
|
||||||
#[HTTPD Listener]
|
[HTTPD Listener]
|
||||||
#type=listener
|
type=listener
|
||||||
#service=HTTPD Service
|
service=HTTPD Service
|
||||||
#protocol=HTTPD
|
protocol=HTTPD
|
||||||
#port=6444
|
port=6444
|
||||||
|
Reference in New Issue
Block a user