Uncrustify maxscale
See script directory for method. The script to run in the top level MaxScale directory is called maxscale-uncrustify.sh, which uses another script, list-src, from the same directory (so you need to set your PATH). The uncrustify version was 0.66.
This commit is contained in:
@ -6,27 +6,33 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
Hartmut Holzgraefe 2014-09-08 13:08:46 UTC
|
||||
I mistyped a module name (for a filter in this case)
|
||||
|
||||
[testfilter]
|
||||
type=filter
|
||||
module=foobar
|
||||
|
||||
There were no warnings about this on startup at all, but at the first time trying to connect to a service this filter was used in maxscale crashed with a segmentation fault after writing the following error log entries:
|
||||
|
||||
2014 09/08 15:00:53 Error : Unable to find library for module: foobar.
|
||||
2014 09/08 15:00:53 Failed to create filter 'testfilter' for service 'testrouter'.
|
||||
2014 09/08 15:00:53 Error : Failed to create Read Connection Router session.
|
||||
2014 09/08 15:00:53 Error : Invalid authentication message from backend. Error : 28000, Msg : Access denied for user 'maxuser'@'localhost' (using password: YES)
|
||||
2014 09/08 15:00:53 Error : Backend server didn't accept authentication for user denied for user 'maxuser'@'localhost' (using password: YES).
|
||||
|
||||
Two problems here:
|
||||
|
||||
1) can't check up front that my configuration is valid / without errors without connecting to each defined service
|
||||
|
||||
2) maxscale crashes instead of handling this situation gracefully (e.g. ignoring the misconfigured filter, or disabling the service that refers to it alltogether)
|
||||
*/
|
||||
* Hartmut Holzgraefe 2014-09-08 13:08:46 UTC
|
||||
* I mistyped a module name (for a filter in this case)
|
||||
*
|
||||
* [testfilter]
|
||||
* type=filter
|
||||
* module=foobar
|
||||
*
|
||||
* There were no warnings about this on startup at all, but at the first time trying to connect to a service
|
||||
* this filter was used in maxscale crashed with a segmentation fault after writing the following error log
|
||||
* entries:
|
||||
*
|
||||
* 2014 09/08 15:00:53 Error : Unable to find library for module: foobar.
|
||||
* 2014 09/08 15:00:53 Failed to create filter 'testfilter' for service 'testrouter'.
|
||||
* 2014 09/08 15:00:53 Error : Failed to create Read Connection Router session.
|
||||
* 2014 09/08 15:00:53 Error : Invalid authentication message from backend. Error : 28000, Msg : Access
|
||||
* denied for user 'maxuser'@'localhost' (using password: YES)
|
||||
* 2014 09/08 15:00:53 Error : Backend server didn't accept authentication for user denied for user
|
||||
* 'maxuser'@'localhost' (using password: YES).
|
||||
*
|
||||
* Two problems here:
|
||||
*
|
||||
* 1) can't check up front that my configuration is valid / without errors without connecting to each defined
|
||||
* service
|
||||
*
|
||||
* 2) maxscale crashes instead of handling this situation gracefully (e.g. ignoring the misconfigured filter,
|
||||
* or disabling the service that refers to it alltogether)
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@ -37,9 +43,9 @@ Two problems here:
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
TestConnections * Test = new TestConnections(argc, argv);
|
||||
TestConnections* Test = new TestConnections(argc, argv);
|
||||
Test->set_timeout(20);
|
||||
|
||||
if (Test->maxscales->connect_rwsplit(0) == 0)
|
||||
@ -55,13 +61,15 @@ int main(int argc, char *argv[])
|
||||
Test->add_result(1, "Filter config is broken, but Maxscale is started\n");
|
||||
}
|
||||
|
||||
//sleep(5);
|
||||
// sleep(5);
|
||||
Test->maxscales->execute_maxadmin_command(0, (char*) "sync logs");
|
||||
Test->check_log_err(0, (char *) "Unable to find library for module: foobar", true);
|
||||
Test->check_log_err(0, (char *) "Failed to load filter module 'foobar'", true);
|
||||
Test->check_log_err(0, (char *) "Failed to load filter 'testfilter' for service 'RW Split Router'", true);
|
||||
Test->check_log_err(0, (char *)
|
||||
"Failed to open, read or process the MaxScale configuration file /etc/maxscale.cnf. Exiting", true);
|
||||
Test->check_log_err(0, (char*) "Unable to find library for module: foobar", true);
|
||||
Test->check_log_err(0, (char*) "Failed to load filter module 'foobar'", true);
|
||||
Test->check_log_err(0, (char*) "Failed to load filter 'testfilter' for service 'RW Split Router'", true);
|
||||
Test->check_log_err(0,
|
||||
(char*)
|
||||
"Failed to open, read or process the MaxScale configuration file /etc/maxscale.cnf. Exiting",
|
||||
true);
|
||||
|
||||
int rval = Test->global_result;
|
||||
delete Test;
|
||||
|
||||
Reference in New Issue
Block a user