63 Commits

Author SHA1 Message Date
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
Jenkins
6f5239ce40 Merge "Bump the ansible to 2" 2016-05-26 10:57:27 +00:00
Jenkins
6f17a71d7f Merge "add support for non-default database_port in kolla/ansible" 2016-05-26 09:24:56 +00:00
Jeffrey Zhang
491822c510 Bump the ansible to 2
DocImpact

Change-Id: I3cdfbf84919de80f535c030bd146787ecda40dec
partial-Implements: blueprint ansible2
2016-05-24 19:53:31 +08:00
Ryan Hallisey
2da010a7b9 Make configurable the location where config files are merged
An operator may want to specify the location of custom config
files so that kolla can detect their location and merge
them with the default configs generated.

Partially implements: blueprint multi-project-config

Change-Id: Ibfb38d07a36dfa7fe25381adc34cc1d3cbe7d1e1
2016-05-23 03:23:06 -04:00
Waldemar Znoinski
a2c2eba34f add support for non-default database_port in kolla/ansible
This change makes each step of the kolla deployment aware
of the port database was configured to listen on.
It defaults mariadb_port to database_port.

Change-Id: I8e85d5732015afc0a5481cb33e0b629fdfa84a1b
Closes-Bug: #1576151
DocImpact
2016-05-13 12:12:25 +00:00
Jeffrey Zhang
0fcee87549 map the host localtime to the container
Closes-Bug: #1577148
Change-Id: I636cefc63cf532434a41af3898b63dffa711e280
2016-05-03 09:27:51 +08: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
Steven Dake
ba4bcdbbe8 Change waiting on mariadb.pid
Previously the code looked at mariadb.pid, but this seemed
flakey in function.  It seemed racey and prone to failure on
slower connections to a registry.  The original task was
extremely complex and it didnt really verify that the MariaDB
was ready to serve connections.  Use wait_for with a regex
instead.

Change-Id: I3aafac04f03639b08e0ef4d6a9c9e1a4499f000c
Closes-Bug: #1564278
2016-04-05 12:02:01 -04: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
Jenkins
f5bdcfbb60 Merge "Allow per node configuration with augments" 2016-03-18 03:45:06 +00:00
SamYaple
1f371e2717 Allow per node configuration with augments
This type of per node configuration is required to support things like
availability zones for nova. As always, if this file doesnt exist it
doesnt get used so this change is safe.

TrivialFix

Change-Id: Iff8172af522c2c96e5f2c173b24a5dfd4d522ed2
2016-03-17 17:18:00 +00:00
SamYaple
f096cdcb40 After refactor, the upgrade code was missing task
TrivialFix

Change-Id: Ic946c613e5197d988897bd450040a1ea66a60f77
2016-03-17 17:13:09 +00:00
Jenkins
3c0641b36b Merge "MariaDB lights out recovery" 2016-03-17 06:24:32 +00:00
Mauricio Lima
b1cd6f473a Remove commented line
TrivialFix

Change-Id: Iadeada65248160ac34d917c67dca7954e1b449d2
2016-03-16 13:12:18 -04:00
SamYaple
2aaaed770e MariaDB lights out recovery
This playbook only matters for multinode since AIO can recover from
power outage without additional configuration.

DocImpact
Implements: blueprint mariadb-lights-out
Change-Id: I903c3bcd069af39814bcabcef37684b1f043391f
2016-03-16 15:53:44 +00:00
SamYaple
cc6cfdf4df Mariadb upgrade
Minor versions of mariadb upgrade do not require full cluster stop.
Full cluster stop will need to be address during the move to 10.1 at
some time in the future.

Change-Id: Ia048a3fd4d79921f827f3b88c623d26db506bfc3
Partially-Implements: blueprint upgrade-kolla
Implements: blueprint upgrade-mariadb
2016-03-16 15:53:27 +00:00
Mauricio Lima
cb2d63a731 Reconfigure mariadb service
Implements reconfiguring the mariadb service.

Change-Id: Ia28b85df10494adeb585fa9352ec7d45f95b8e5e
Closes-Bug: #1553524
2016-03-09 11:36:46 -05:00
SamYaple
a2fe37fe89 Bump to latest ansible and deps
Ansible is pinned to single commit in devel branch to pull in the
latest shade module we need (domain control). It will be available in
ansible 2.1

TrivialFix
Change-Id: I4c21fa1d2cec30d4aeb80e050ef4a62332f9ed45
2016-03-03 15:19:00 +00:00
SamYaple
d3cfb2052a Change kolla_internal_address variable
Due to poor planning on our variable names we have a situation where
we have "internal_address" which must be a VIP, but "external_address"
which should be a DNS name. Now with two vips "external_vip_address"
is a new variable.

This corrects that issue by deprecating kolla_internal_address and
replacing it with 4 nicely named variables.

kolla_internal_vip_address
kolla_internal_fqdn
kolla_external_vip_address
kolla_external_fqdn

The default behaviour will remain the same, and the way the variable
inheritance is setup the kolla_internal_address variable can still be
set in globals.yml and propogate out to these 4 new variables like it
normally would, but all reference to kolla_internal_address has been
completely removed.

Change-Id: I4556dcdbf4d91a8d2751981ef9c64bad44a719e5
Partially-Implements: blueprint ssl-kolla
2016-02-26 20:00:09 +00:00
Jenkins
c79174012c Merge "Add the default empty reconfigure.yml file to all roles" 2016-02-25 21:58:56 +00:00
Jeffrey Zhang
d26c259754 Add the default empty reconfigure.yml file to all roles
DocImpact

Partially-implements: bp kolla-reconfig
Change-Id: I9738e80960bcfbef18d1ef1b7942f81c45684e85
2016-02-25 09:32:53 +08:00
Jenkins
1a9631a30e Merge "Ensuring the Mariadb bootstrap configured properly" 2016-02-24 22:09:44 +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
bf6b75da3f Make a final check to validate mysql works
This ensures mysql works through whatever the vip is

Change-Id: Iaeb17240b90ae2f0fef081b42d4ba140dcecd972
Closes-Bug: #1536633
2016-02-16 13:54:22 +00:00
Jeffrey Zhang
e62995055f Ensuring the Mariadb bootstrap configured properly
Make sure extend_start.sh file run to completion

Change-Id: I45f6ab1c7d1b7a21ac92bb5f0e9d82a6c135cb5f
Closes-Bug: #1545287
2016-02-14 18:02:52 +00:00
SamYaple
80b7266ed1 Rename kolla_ansible to kolla_toolbox
This change is needed for clarity. We have a kolla-ansible script.
We have a kolla-mesos repo. We plan to have a kolla-ansible repo.
Already we have had far too much confusion about whether we are
talking about the container or the project. Naming this kolla-toolbox
eliminates all of that confusion and its probably a bit more accurate
of a name too.

Closes-Bug: #1541053
Change-Id: I8fd1f49d5a22b36ede5b10f46b9fe02ddda9007e
2016-02-02 18:12:15 +00:00
SamYaple
6d8959a962 Update all bootstraps to use Label
Add bootstrap label to all bootstrap containers to ensure that when
the a new container is launched a difference is seen between it and
the bootstrap container since we cannot rely on ENV variables for
this. This only affects mariadb at this stage, but it is needed to
ensure rabbitmq works when we switch to named volumes.

Change-Id: Ia022af26212d2e5445c06149848831037a508407
Closes-Bug: #1538136
2016-01-28 20:26:41 +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
Michal Jastrzebski
375965ddfb Add stub upgrade.yml
After introduction of pull action and turing every main.yml into
{{action}}.yml we lost ability to perform upgrade

Change-Id: Ie9fa2cd083b061033abc733fba53d54f9c55e393
Fixes-Bug: #1538210
2016-01-26 11:52:19 -06:00
Jenkins
e8e8a9a2ab Merge "Make galeradb bootstraping robust" 2016-01-11 20:23:58 +00:00
SamYaple
bdc0f531e7 Allow mariadb role to pull images
Change-Id: I9b453545126e9030406c9888a8210b254ebd3637
Partially-Implements: blueprint pre-pull-images
2016-01-06 04:23:28 +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
SamYaple
8af400733d Convert to named volumes instead of data container
This intentionally leaves out rabbitmq from this patchset. It will
require additional work to remove its data container

UpgradeImpact
Partially-Implements: blueprint docker-named-volumes

Change-Id: Id68b8e43a3c077ef4f4f4d67ea34d0692e66eef7
2016-01-03 16:44:44 +00:00
SamYaple
63c2f56317 Convert mariadb to kolla_docker
Change-Id: I804665386d5fb806449d2cfac981bc8e08109e0e
Partially-Implements: blueprint kolla-docker-module
2015-12-31 16:38:56 +00:00
Jenkins
027e70f9a2 Merge "Simplify config creation" 2015-12-23 13:19:08 +00:00
SamYaple
ed82afa8e9 Simplify config creation
Convert config creation from a playbook to an action_plugin. This
reduces the complexity and confusion while retaining the same augment
structure and flexibility.

This allows us to remove the 0-byte files as requirements. They will
still be used if they are present (this means we require additional
documentation around them).

DocImpact
Closes-Bug: #1528430
Change-Id: I2c789f6be9f195c7771ca093a6d59499564b4740
2015-12-22 04:28:53 +00: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
b2ac6e80cd Add tty to containers
sudo requires a tty to function by default on centos. Instead of
tweaking the sudo conf we can just add a tty. This has the added
advantage of making the containers more friendly if you have to
`docker exec -i <container> bash` into them.

Change-Id: If97a02ca1d37c243a787d98ade54bde8d641aecd
backport: liberty
Partially-Implements: blueprint functional-testing-gate
2015-10-14 10:54:33 +00:00
Sam Yaple
c5be228be8 Bump ansible to 1.9.2
Ansible 1.9.2 contains the fix needed for docker-py >1.2.0

This is needed for some gate reasons, but it is also a good version
bump because it fixes a few issues with delegate_to.

Change-Id: Iafbabb3b0232620849d0548c5cd9d8d316c2b0f3
backport: liberty
Partially-Implements: blueprint functional-testing-gate
2015-10-13 15:13:34 +00: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