MDBCI can put spaces around values in the *_network_config file which
can cause ssh connection failures in the tests. To fix it removing all
spaces from all values which were read from *_network_config
1) Only two backends are set up for extra-port
2) The setting is checked to work by connecting directly to servers
3) The server connections are saturated before starting MaxScale
4) MaxScale logs are checked for extra-port-related messages
Made sure that the inserted row is replicated before inserting another
one. Shortened the test so that slower systems finish it within a
reasonable time. Increased the time that the writes are routed to the
master.
The `global` parameter causes the time window defined by the `time`
parameter to be applied at the instance level instead of the session
level. This means that a write from one connection will cause all other
connections to use the master for a certain period of time.
Using a configurable time window for consistency is not good as it is not
absolute and cannot adjust to how servers behave.
One example that demonstrates this is when a slave is normally lagging
behind by less than a second but some event causes the lag to spike up to
several seconds. In this case the configured time window would no longer
guarantee consistency.
Another reason to avoid a "static" time window is the fact taht it
prevents load balancing in the cases where slaves catch up to the master
within time window. This happens when time is configured to a higher value
to avoid inconsistencies at all costs.
Added a test case that verified the feature works.
The SHOW DATABASES greatly slows down the test. By doing that only from
time to time, the test time drops from roughly 160 seconds to 15
seconds. There's also no point in continuing the test after a failure has
been seen.
Also added a missing sync_slaves to the database creation to make sure
they are created on all servers before the test starts.
When a system test program is invoked with the flag '-l', it will
assume MaxScale is running on 127.0.0.1 using a configuration that
is compatible with the test.
NOTE: Currently any test that directly or indirectly sshes to the
MaxScale node will fail. With a bit of setup that could also
be made to work.
In some configs /etc/my.cnf.d/* files access rights are
very limited and server can not read configuration.
It leads to broken settings and unability to setup
replication during the test
Due to incorrect SSL certs copying to backend and wrong setting in
maxscale.cnf it was not possible to active backend SSL.
Additionally, one more maxscale restart added to 'sql_queries' test
to reproduce SSL bug in 2.4.1.
Also ssl.cnf tuned in order to reproduce SSL bug
By moving the setting up of the test environment from the constructor
to a separate setup()-function, it is possible to introduce virtual
functions and make it easier to do things differently depending on
whether the backend is MariaDB, Galera och Clustrix.
When checking the state of a Clustrix node, we do so in steps:Z
- Is Clustrix installed
- Is Clustrix running
- Can Clustrix be accessed using root
- Can Clustrix be accessed using the test user
and deal with a failure at each point.
The test case covers a few bugs that were fixed by the previous
commits. The first part of the test covers the case when master
reconnection fails while session command history is being executed. The
second part of the test makes sure exceeding the session command history
will prevent master reconnections from taking place.
The test now uses standard library threads and lambda functions to make
the code simpler. Also made the test more robust by ignoring any errors
that are caused by the exhaustion of available client side TCP ports.