27 Commits

Author SHA1 Message Date
Jeffrey Zhang
cacf08f0a6 Remove all kolla-kubernetes configurations
kolla-kubernetes is using its own configuration generation[0], so it is
time for kolla-ansible to remove the related code to simplify the
logical.

[0] https://github.com/openstack/kolla-kubernetes/tree/master/ansible

Change-Id: I7bb0b7fe3b8eea906613e936d5e9d19f4f2e80bb
Implements: blueprint clean-k8s-config
2017-07-18 22:00:58 +08:00
Dai Dang Van
74a26a91e5 Use utf8_general_ci collation as a default collation
Now, I see mariadb are using utf8_general_ci as a default collation.
- https://mariadb.com/kb/en/mariadb/supported-character-sets-and-collations/

This mean all of Devstack database will be created with utf8_general_ci collation,
so may be, one service/project can be deployed successfully via Devstack
but will be fail with Kolla deployment.

Therefore, we should use above default collation for Kolla-ansible.

Change-Id: Icbb6c15f536fc6986816c58f4fd68bfb95813e46
Closes-Bug: 1680783
2017-04-10 15:38:16 +07:00
Bertrand Lallau
dff062b3a6 Activate binary-logs in MariaDB/MySQL
The binary log contains a record of all changes to the databases, both
data and structure. It consists of a set of binary log files and an
index.
Activate it in MariaDB will fix Telegraf error on Mysql/MariaDB inputs
retrieval.

Change-Id: I040ed75ffbf1afded87ba0f8f63a3e384707d1fb
Closes-Bug: #1673969
2017-03-19 09:38:24 +01:00
Jenkins
8b830f5e1a Merge "Mariadb performance tuning" 2016-11-06 21:26:07 +00:00
Mathias Ewald
2d95514b59 Mariadb performance tuning
Change-Id: Ic2b44de0ce8e8090318380a0fed3ff1bd51dc791
Closes-Bug: #1633178
2016-10-24 16:14:02 +02:00
zhubingbing
bb51ca3a3d Fix mariadb upgrade permission issue
Change-Id: I356d41d030365b7b4f917b1334f9f68e560b7512
Co-Authored-By: Michal (inc0) Jastrzebski <inc007@gmail.com>
Partial-Bug: #1631503
2016-10-14 16:51:03 +00:00
Jeffrey Zhang
de0c780100 Change Mariadb default character set to utf8
Closes-Bug: #1623307
Change-Id: I364a8345872ae3b0a7ff684edfe9ff0e22f2c26c
Signed-off-by: Jeffrey Zhang <zhang.lei.fly@gmail.com>
2016-09-14 02:57:19 +00:00
Michal (inc0) Jastrzebski
5838bd0b3c Enable kolla k8s to override bind api bind address in genconfig
It's good if k8s reuses ansible templates, but we need to abstract all
ansible specific variables to achieve that.

- Implements ansible override variable api_interface_address.
- Adds api_interface_address setting and comments to globals.yml
- Makes changes to mariadb templates to accept this new setting.
- Disabled Galera when api_interface_address==0.0.0.0 in the
  case of Kubernetes.  Otherwise, mariadb fails to start.
- Tested with and without setting to ensure kolla genconfig output
  does not change when setting is disabled or undefined.

Change-Id: Ia0e4951c327be01b717aebb86ef4c3a4e7ed170e
Partially-implements: blueprint api-interface-bind-address-override
Co-authored-by: David Wang <dcwangmit01@gmail.com>
Co-authored-by: Ryan Hallisey <rhallise@redhat.com>
Co-authored-by: Kevin Fox <kevin@efox.cc>
2016-07-28 11:59:28 -04:00
Ken Wronkiewicz
1d74db7df0 Config files having underscores breaks Kolla-Kubernetes.
I just thought I'd dash off a quick patch and change the underscore
to a dash.

Change-Id: Ib34cfc8039de01be7e37176648482f9815ac3848
Closes-Bug: #1589734
2016-06-06 16:58:58 -07:00
Ettore Simone
b4759b280c Enable HAProxy consider MariaDB wsrep_local_state
This patch enable wsrep_notify_cmd to rename haproxy user in haproxy_blocked
when the node is not ready to serve and restore it when ready.

Change-Id: I4f49960d7ff2fa689d6ea730b2574f16f083edc1
Closes-Bug: 1578752
Closes-Bug: 1587752
2016-06-03 01:30:00 +02:00
Vikram Hosakote
df53d92db6 Revert "Add general_log to mariadb container and make heka collect it"
This reverts commit 86bafeee7a8926d212e8d089fade667772dbcc83.

Closes-Bug: #1568670

Change-Id: I88563292e29d691c27a3640e5232b9f22c7a288a
2016-04-11 02:49:56 +00:00
Jenkins
dc9990e744 Merge "Add general_log to mariadb container and make heka collect it" 2016-04-04 10:51:19 +00:00
Vikram Hosakote
86bafeee7a Add general_log to mariadb container and make heka collect it
Added general_log to ansible/roles/mariadb/templates/galera.cnf.j2
to improve mariadb logging.

This will be helpful to debug mariadb issues especially when
mariadb is scaled.

Test results of this patch set are at:
http://paste.openstack.org/show/492852/

Change-Id: I80438d1bbdd1ed2a1f47489c6f9c45b8107340a0
Closes-Bug: #1563668
2016-04-04 02:52:30 +00:00
Steven Dake
1fac190cec Increase database connections to 10000
Scale limit testing on a 64 node cluster with 13 TB RAM and 2600
cores showed that atleast 1800 database connections are required
to appropriately start 2000 virtual machines simulateounsly.  Other
documentation on the internet recommends larger values such as 8000,
so we set to a larger value that should be able to handle a maxed out
512GB ram per compute node cluster with all services enabled.

Change-Id: I8767cf3fb04e066cc22e796c647e944b4e4a1742
Closes-Bug: #1564275
2016-03-31 00:42:23 -07:00
SamYaple
afce10dea4 Fix mysql bootstrap
The lightsout recover patch broke multinode mysql. Also the lightsout
recovery didnt probably pass the --wsrep-new-cluster flag. This
updates the mariadb bootstrap to work with multinode again.

Closes-Bug: #1559480
Related-Id: I903c3bcd069af39814bcabcef37684b1f043391f
Change-Id: I1ec91a8b2144930ea8f04cc1c201b53712352e4e
2016-03-21 12:23:00 +00:00
Éric Lemoine
4445c81991 Make Heka collect MariaDB logs
Partially implements: blueprint heka
Change-Id: Ib5e740683cee296bcac69228f525594850d62a27
2016-02-19 21:49:21 +00:00
SamYaple
7e2ce01431 Cleanup mariadb and make compatiable with mesos
There is no reason to have a hostname-unique pidfile in the container
as we currently have. This posed problems with kolla-mesos reusing
the same script. Since there is no reason for this pidfile to be
configurable in path _at_ _all_, we hardcode the path.

Additionally, we adjust the file perm change to only update the perms
on the folder if it is not already properly set.

This also incorperates a kolla-ansible file in the bootstrap process
which follows our other container techniques of using the idempotent
creation of a volume in the bootstrap process (see nova)

TrivialFix
Related-Bug: #1538136
Change-Id: I2380529fc7146a9603145cdc31e649cb8841f7dd
2016-01-28 20:26:41 +00:00
Sidharth Surana
37d44444d7 Make galeradb bootstraping robust
Currently, there are arbitrary wait for mariadb service startup.
However, this leads to nondeterministic results in the current
workflow. This patch tries to make the workflow more deterministic.

Change-Id: I3c6245cce93c7ff0d3d57cb2ae065a1ed1487769
Closes-Bug: #1491782
2016-01-04 09:10:04 -08:00
OTSUKA, Yuanying
903c7d4c3f Fix retrieving api_interface
In heterogeneous environment, api_interfaces are different each other.
So we should specify it from hostvars.

Implements: bp configure-network-interface
Change-Id: Id15d70bfb9ebb62a64a3847a6b77407efb171dbe
2015-12-16 15:55:11 +09:00
Sam Yaple
268aaa60fd Fix broken galera
A previous commit [1] broke Galera on Ubuntu while trying to fix
Centos. This fixes the underlying different between the two distros
and should help prevent that kind of mistake in the future.

[1] I523d1989575dbe24a891fcae3b6bf56d83e69615

Change-Id: Ie3e47f10cb669f36f8d2f166c88555931a54e3ec
Backport: Liberty
Closes-Bug: #1509281
2015-10-23 20:15:37 +00:00
Steven Dake
3842391b78 Encode datadir for xtrabackup
Xtrabackup previously used a hardcoded datadir.  In the latest
update to xtrabackup, the my.cnf config option datadir is now
parsed.  This variable was unset, causing galera to implode.

backport: liberty

Change-Id: I523d1989575dbe24a891fcae3b6bf56d83e69615
Closes-Bug: #1509281
2015-10-23 03:19:31 -07:00
Sam Yaple
94162bd08f Bring Kolla inline with FHS
This brings Kolla images inline with FHS and should make finding
locations of things more consistent and reliable with the linux world
at large.

Change-Id: Iece5b4da4bace0fb8b1f41a65ab2c852ec73e6f8
Closes-Bug: #1485742
2015-10-06 03:30:53 +00:00
rthallisey
7088e885f8 Replace config-external with a JSON file for Galera
Change-Id: I82abc9a31571376679c4f463f5a6ae77a49ec2f6
Partially-Implements: blueprint replace-config-external
2015-09-16 10:33:29 -04:00
Steven Dake
a8a41a81aa Permit larger database connection count
The default incoming database connection count is limited to 151
connections.  These are not sufficient in a 100 node 3 controller
deployment to launch several heat stacks simulatenously.

Data measured on bare metal shows that 250 connections are needed
to launch one 25 VM heat stack with 3 controller nodes with 209
tasks (default enablement).

Change-Id: If60b540010d6d173a393fa91fa30cb3ba572cfc0
Closes-Bug: #1492719
2015-09-06 04:53:28 -07:00
Sam Yaple
8f7ff27779 Fix MariaDB for ubuntu
In MariaDB we adjust the dependecies of what we install there as well
adding only what is appropriate for the install.

In Ansible we adjust some templates to all work around differences
between the different Linux families.

Change-Id: Ibc26e2f4d4a732630632d3ed27fb595b6fe019d2
Partially-Implements: blueprint install-from-ubuntu
2015-08-21 13:10:05 +00:00
Sam Yaple
cf3fd4043a Update mariadb confs and ports
Cleanup all options in galera.cnf. Bind to all interfaces and ports
appropriately.

Change-Id: I516613d09673ba61aadda2c7bbb4abbbe4ea47ac
Partially-Implements: blueprint update-configs
Closes-Bug: #1478330
2015-08-13 02:27:38 +00:00
Sam Yaple
0382909dbb Rename role name to service name
The original purpose for having an abstract like 'database' rather than
the service name of 'mariadb' has been change. Our direction is different
and this patch reflects consistent naming throughout

Change-Id: I704896191cc5243f9dab2a4cca9120e9dc2ceb2c
Closes-Bug: #1478328
2015-07-30 19:35:17 +00:00