404 Commits

Author SHA1 Message Date
vraatikka
f1498e4403 Added log flusher thread, which flushes once per second. 2013-08-08 00:08:45 +03:00
vraatikka
a447583214 If MaxScale.cnf exists, install takes a backup of it before overwriting it with version from maxscale/server. 2013-08-08 00:06:38 +03:00
ec2-user
dcc72f017e use ##VERSION_TAG## in .spec 2013-08-07 16:51:09 +02:00
ec2-user
719c8168e8 fix .spec to work with Jenkins 2013-08-07 16:50:08 +02:00
Massimiliano Pinto
75e7de182f fprintf debug for added backend connection is protected by if (backend->fd > 0) 2013-08-07 09:39:29 +02:00
Jan Lindström
cd564b7628 Merge 2013-08-06 20:09:50 +03:00
Jan Lindström
8f8798fa53 Added a new directory structure and fixed boost compiler problems. 2013-08-06 20:07:45 +03:00
Massimiliano Pinto
8449482279 Fixed typo 2013-08-06 10:55:20 +02:00
vraatikka
256b8e8013 Added more test cases and reformatted output a bit. 2013-08-06 11:14:45 +03:00
vraatikka
30456115f7 Memory used by user structure was not initialized. Changed malloc to calloc. 2013-08-05 18:21:08 +03:00
vraatikka
234b8c40a3 Cleaned up some debug printings (to stdout). 2013-08-05 18:15:41 +03:00
vraatikka
13248c2a16 Added server/core/test directory, makefile and testhash.c for testing hashtable implementation.
In makefile, there is target all, which compiles and executes tests.
2013-08-05 18:04:02 +03:00
vraatikka
b852079631 Enabled debug assertions for DEBUG=Y builds. Fixed one debug assertion in log manager. 2013-08-05 17:47:21 +03:00
vraatikka
bc6fe8f6ef hashtable_add now checks input parameter and returns with zero (indicating that no elements were added) if hashsize is zero. Caused floating point exception. 2013-08-05 15:01:36 +03:00
vraatikka
ef1c514489 Added creation of an empty depend.mk file to core directory. 2013-08-05 13:50:52 +03:00
vraatikka
401d4920e4 Moved dcb_hashtable_stats from hastable.c to dcb.c to break dependency between hashtable and the rest of the maxscale. Added check fields to hashtable structure. 2013-08-05 11:51:10 +03:00
vraatikka
ee68633c22 Removed unnecessary line 2013-08-05 10:25:45 +03:00
Jan Lindström
4cc301f415 Fixed error on product build. 2013-08-05 07:32:47 +03:00
Jan Lindström
24337653f1 Automatic merge. 2013-08-05 06:33:22 +03:00
vraatikka
cae4d38a7e Removed unnecessary argument from log manager commands because it is not used and it is always NULL. 2013-08-04 23:30:47 +03:00
vraatikka
9fb072ea74 Changed log manager APChanged log manager APII 2013-08-04 23:14:48 +03:00
vraatikka
d2efbcf867 Changed log manager API. Removed unnecessary memory context pointer (always NULL):
bool skygw_logmanager_init(void** buf, int argc, char* argv[]) >>
bool skygw_logmanager_init(int argc, char* argv[])

void skygw_logmanager_done(void** buf) >>
void skygw_logmanager_done(void)

void skygw_log_done(void* writebuf) >>
void skygw_log_done(void)

int  skygw_log_write(void* writebuf, logfile_id_t id, char* format, ...) >>
int  skygw_log_write(logfile_id_t id, char* format, ...)

int  skygw_log_write_flush(void* writebuf, logfile_id_t id, char* format, ...) >>
int  skygw_log_write_flush(logfile_id_t id, char* format, ...)

--- static functions :
static bool logmanager_init_nomutex(void** p_ctx, int argc, char* argv[]) >>
static bool logmanager_init_nomutex(int argc, char* argv[])

static void logmanager_done_nomutex(void** ctx) >>
static void logmanager_done_nomutex(void)
2013-08-04 23:07:54 +03:00
vraatikka
f62cf1ea7e Added check if the last admin user is to be deleted, and if that's the case, prevent it and return with error message. 2013-08-04 23:02:29 +03:00
vraatikka
6faca29281 Added commands:
THIS=`pwd`
	cd $(DEST)
	- `./maxkeys $(DEST)/MaxScale/etc/.secrets`
	cd $(THIS)

to maxscale/server/core/Makefile

Now .secrets is by default there and no complains in log.
2013-08-04 23:01:36 +03:00
vraatikka
b3302b1bad Renamed reload users to reload dbusers. 2013-08-03 23:29:45 +03:00
vraatikka
26e4422c4d Removed shutdown gateway command from debug commands 2013-08-03 23:21:21 +03:00
vraatikka
8b720f211e in hastable_delete check if deleted entry's next pointer is NULL. 2013-08-03 23:10:45 +03:00
vraatikka
ca3638ae2c Added 'remove user' to client API. New functions are
debugcmd.c : telnetdRemoveUser
adminusers.c : admin_remove_user

Also renamed admin_test_user to admin_search_user .
2013-08-02 23:03:43 +03:00
Massimiliano Pinto
3357748aad Some typos fixed 2013-08-02 10:00:56 +02:00
vraatikka
9305cf0f9f In server_update check if new user or pwd are NULL and decline to update used values if they are. 2013-08-02 10:38:16 +03:00
Jan Lindström
89079c6fb8 Fixed compilation issues with boost. 2013-08-01 19:49:37 +03:00
Massimiliano Pinto
ce8ce5b8fd Added a check for candidate server, if NULL return 2013-07-31 16:18:45 +02:00
vraatikka
96855a6feb Log message fine tuning. 2013-07-30 23:09:34 +03:00
vraatikka
b2099947b4 Changed mysterious log message. 2013-07-30 23:08:31 +03:00
vraatikka
896233d65f Changed some important information to use skygw_log_write_flush. 2013-07-30 19:32:39 +03:00
vraatikka
75f308fc3f Changes some important messages to use skygw_log_write_flush. 2013-07-30 19:31:57 +03:00
vraatikka
56c73086aa Disabled buffering of log file stream by call of setvbuf. 2013-07-30 19:30:23 +03:00
vraatikka
b71b22b18a Removed dependency files because they are now created as a part of makefile processing. 2013-07-30 15:07:50 +03:00
vraatikka
4d29930c6b Revert back to revision 241 2013-07-30 11:55:58 +03:00
vraatikka
2ab5a37c63 Clean build_gateway.inc 2013-07-30 11:51:36 +03:00
vraatikka
f3cf1d703e Removed depend.mk files. Added command 'touch depend.mk' to each Makefile which attempts to include depend.mk. That is for the makefile process phase where only the existence of depend.mk is checked. Later the real file is created in 'depend' target. 2013-07-30 11:43:39 +03:00
Massimiliano Pinto
d2432ab307 Removed protocol_1.0, the Apache APR prototype 2013-07-29 10:08:53 +02:00
skysql
636e5b619c fix Makefile to comply with new dirs 2013-07-29 09:39:46 +03:00
Timofey Turenko
da8a5592d9 repositories merge 2013-07-28 05:33:20 +00:00
Timofey Turenko
a7c82310f9 moving files to /server to make merge possible 2013-07-28 05:31:11 +00:00
vraatikka
25d26eb3b8 Corrected a typo in line feed handling. 2013-07-27 12:23:47 +03:00
vraatikka
7a6129861e Added timestamp to log file headers and to the beginning of each line. Removed additional line feeds.
Example:

SkySQL MaxScale Sat Jul 27 12:13:10 2013
------------------------------------------
2013 07/27 12:13:10  Loaded module testroute: V1.0.0
2013 07/27 12:13:10  Initialise debug CLI router module V1.0.1.
2013 07/27 12:13:10  Loaded module debugcli: V1.0.1
2013-07-27 12:14:30 +03:00
vraatikka
b566c41067 Log manager sometimes failed to flush after skygw_log_write_flush because log client signaled filw writer thread too early. Fixed so that write is done first and file writer is registered after that. Except in cases where skygw_log_flush was called. Then only flush is triggered.
Added a few trivial cases to test.
2013-07-26 23:06:12 +03:00
vraatikka
3989615197 Code polishing. 2013-07-26 21:46:23 +03:00
vraatikka
d8978dce1c Fixed a typo 2013-07-26 19:25:42 +03:00