173 Commits

Author SHA1 Message Date
Mark Goddard
de00bf491d Simplify handler conditionals
Currently, we have a lot of logic for checking if a handler should run,
depending on whether config files have changed and whether the
container configuration has changed. As rm_work pointed out during
the recent haproxy refactor, these conditionals are typically
unnecessary - we can rely on Ansible's handler notification system
to only trigger handlers when they need to run. This removes a lot
of error prone code.

This patch removes conditional handler logic for all services. It is
important to ensure that we no longer trigger handlers when unnecessary,
because without these checks in place it will trigger a restart of the
containers.

Implements: blueprint simplify-handlers

Change-Id: I4f1aa03e9a9faaf8aecd556dfeafdb834042e4cd
2019-06-27 15:57:19 +00:00
Zuul
b32ddaa901 Merge "link kolla_logs volume to docker_runtime_directory if docker_runtime_directory variable exists" 2019-06-24 13:35:45 +00:00
Zuul
bc7dea58c2 Merge "Ingest non-standard Monasca logs" 2019-06-20 10:03:11 +00:00
Tatsuma Matsuki
1d02ec49f6 Add logrotate configuration for horizon
Change-Id: I97263385372a28204c0ae81373836a2d6292f3bd
Closes-Bug: #1833336
2019-06-19 13:33:34 +09:00
Doug Szumski
4b31fdcf35 Ingest non-standard Monasca logs
Presently, errors can appear in Fluentd and Monasca Log API logs due
to log output from some Monasca services, which do not use Oslo log,
being processed alongside other OpenStack logs which do.

This change parses these log files separately to prevent these errors.

Change-Id: Ie3cbb51424989b01727b5ebaaeba032767073462
2019-06-18 12:14:58 +01:00
Gaetan Trellu
edb3489820 Adds Qinling Ansible role
Qinling is an OpenStack project to provide "Function as a Service".
This project aims to provide a platform to support serverless functions.

Change-Id: I239a0130f8c8b061b531dab530d65172b0914d7c
Implements: blueprint ansible-qinling-support
Story: 2005760
Task: 33468
2019-05-31 10:25:28 -04:00
Serhat Demircan
c4ebd99030 link kolla_logs volume to docker_runtime_directory if docker_runtime_directory variable exists
Change-Id: I053c4a47e657effe25e8d75a3ef55477635729d2
2019-05-16 14:22:37 +03:00
Mark Goddard
a4bb8567da Fix up config file permissions on the host
Several config file permissions are incorrect on the host. In general,
files should be 0660, and directories and executables 0770.

Change-Id: Id276ac1864f280554e98b937f2845bb424d521de
Closes-Bug: #1821579
2019-04-02 17:23:31 +01:00
Zuul
03d3885a56 Merge "Add cyborg to kolla-ansible" 2019-03-28 08:20:13 +00:00
Doug Szumski
c8a22f1090 Support customising Fluentd formatting
In some scenarios it may be useful to perform custom formatting of logs
before forwarding them. For example, the JSON formatter plugin can be
used to convert an event to JSON.

Change-Id: I3dd9240c5910a9477456283b392edc9566882dcd
2019-03-08 11:20:33 +00:00
Bai Yongjun
ed2fd243d1 Add cyborg to kolla-ansible
Because kolla-ansible not have cyborg so should add it.

Implements: blueprint add-cyborg-to-kolla-ansible

Depend-On: I497e67e3a754fccfd2ef5a82f13ccfaf890a6fcd

Change-Id: I6f7ae86f855c5c64697607356d0ff3161f91b239
2019-03-08 10:46:53 +08:00
binhong.hua
93e5e8e631 Link kolla_log volume dir to /var/log/kolla
The path /var/lib/docker/volumes/kolla_logs/_data/ is too long
shorter log path will help to debug from log.
The volume path is compatible with docker-engine and docker-ce.

Change-Id: I9195d5f24d938f5060fe748aac3ae58c79ec5abf
2019-01-24 11:02:48 +08:00
Zuul
ee9ff448aa Merge "Fix fluentd input log parser for OpenDaylight" 2018-12-05 10:35:05 +00:00
Eduardo Gonzalez
76482c9a68 Fix fluentd input log parser for OpenDaylight
OpenDaylight logs have different format than openstack,
is a karaf log with java error traces.
This PS add required config to make fluentd parse properly
ODL logs.

Change-Id: I34fb96c8a424679b3b618f2ff6a840b8dc165bec
2018-11-20 14:24:25 +01:00
Eduardo Gonzalez
1a682fab28 Support stop specific containers
With this change, an operator may be able to stop a
service container without stopping all services in a host.
This change is the starting point to start
fast-forward upgrades support.
In next changes new flags will be introducced to disable
stop dataplane services during upgrades.

Change-Id: Ifde7a39d7d8596ef0d7405ecf1ac1d49a459d9ef
Implements: blueprint support-stop-containers
2018-11-26 08:07:01 +00:00
Zuul
8bbe9011e2 Merge "Don't set recurse on config folders" 2018-11-12 13:50:24 +00:00
Doug Szumski
4896031757 Don't set recurse on config folders
A small number of services set the recurse flag when they create
their config directory. This can change permission of files within
the directory, which are later set back to the original state. The
side effect is that the service is then restarted, even though the
net change to the config files amounts to nothing. The expected
behaviour is that a service only restarts if the config *has*
changed. This patch fixes this issue.

Change-Id: Ib6f1ca7b416247f8d455fb25892f4a3b27de03ba
Closes-Bug: 1800480
2018-10-29 15:35:32 +00:00
Doug Szumski
58eec5ca12 Forward system logs to Monasca Log API
When Monasca is enabled disable direct logging to ElasticSearch and
send all logs harvested by Fluentd to the Monasca Log API.

This change also cleans up output files which may be left behind when
the various log forwarding options are enabled / disabled.

Partially-Implements: blueprint monasca-roles
Change-Id: I7197966c5117176407d60c86c08d3bcea5e8131a
2018-10-12 08:25:28 +00:00
Zuul
d8beb4a225 Merge "Support deploying an Apache Storm cluster" 2018-10-01 09:11:07 +00:00
Doug Szumski
516b0dd34e Support deploying an Apache Storm cluster
Storm is required for running the Monasca thresholder component for
generating alerts.

Change-Id: I5e1ef74dc55a787293abbb3e629b5ab1ce5f4bbb
Partially-Implements: blueprint monasca-roles
2018-09-26 10:54:32 +00:00
Christian Berendt
1b4430314c Allow custom fluentd input configurations
Co-authored-by: Mark Goddard <mark@stackhpc.com>
Change-Id: I2e5ecf5b01cc842ec480fc4d883a7d2283fc1c31
2018-09-11 13:55:15 +01:00
Zuul
3e45b2cbec Merge "Use include_tasks instead of include" 2018-07-27 08:16:08 +00:00
Lakshmi Prasanna Goutham Pratapa
76210a2d85 Apply Resource Constraints to Openstack Services
This commit is to apply resource-constraints only to few OpenStack services.
Commit to apply constraints to other services will be made in coming commits.

Partially-Implements: blueprint resource-constraints

Change-Id: Icafa54baca24d2de64238222a5677b9d8b90e2aa
2018-07-25 17:05:04 +01:00
Jeffrey Zhang
b51eeed89e Use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Co-Authored-By: confi-surya <singh.surya64mnnit@gmail.com>
Change-Id: Ic9d71e1865d1c728890625aeddf424a5734c0a8a
2018-07-25 23:57:22 +08:00
Zuul
093fef944d Merge "Support check and diff mode for merge_config and merge_yaml module" 2018-07-12 10:23:10 +00:00
Jeffrey Zhang
1db352f007 Support check and diff mode for merge_config and merge_yaml module
Change-Id: Ib2ca736e08f48da88bb74feb5cd1efce3b860ab7
Partially-Implements: blueprint ansible-check-mode
2018-06-12 10:56:45 +08:00
Ha Manh Dong
30be04ea91 Specify 'become' for all tasks that use kolla_docker module
Add become to all tasks that use the module "kolla_docker"

Change-Id: I4309c4011687b88ec31d739fd8f834fe2326ff10
Partial-Implements: blueprint ansible-specific-task-become
2018-06-08 12:39:24 +00:00
Zuul
a672d4e730 Merge "Support deploying the Monasca API" 2018-05-21 11:05:54 +00:00
Doug Szumski
c11f9f521d Support deploying the Monasca API
Deploys the Monasca API with mod_wsgi + Apache.

Co-Authored-By: Mark Goddard <mark@stackhpc.com>

Partially-Implements: blueprint monasca-roles
Change-Id: I3e03762217fbef1fb0cbff6239abb109cbec226b
2018-05-21 09:28:13 +00:00
Jeffrey Zhang
c567055176 Fix ansible warning
- rename action and serial to kolla_ansible and kolla_serial
- use become instead of "sudo <command>" in shell
- Remove quota for failed_when and changed_when in rabbitmq tasks

Change-Id: I78cb60168aaa40bb6439198283546b7faf33917c
Implements: blueprint migrate-to-ansible-2-2-0
2018-05-11 02:54:02 +00:00
Mark Goddard
7c046ee9a4 Only copy custom fluentd filters when fluentd is enabled
Change-Id: Iedf87342eeee90d58734ba21216296f3d94f76c8
TrivialFix
2018-05-04 11:39:39 +01:00
caoyuan
d6a6486886 Add owner and group when create directories
Change-Id: Idb429823d48c4f40cf391151e8bb7478cc7d3631
2018-04-20 23:16:08 +08:00
Doug Szumski
6647ed818a Add support for deploying Kafka
Projects which may use Kafka include Monasca and Oslo
messaging. Initially it will be possible to
deploy a single Kafka cluster which may be shared
among clients. Support for running multiple Kafka
clusters may be added in a future change. This
change also configures logging for Kafka server,
state-change and controller logs.

Partially-Implements: blueprint monasca-roles
Change-Id: Iab8d200c2450238f3c0c708d1f4184490f6e6284
2018-04-16 11:34:00 +01:00
Zuul
445a0cb009 Merge "Followed the become: true ordering" 2018-04-06 08:53:53 +00:00
confi-surya
c0f44cd2e5 Followed the become: true ordering
As rest of the files are follow the same pattern
So in same manner following the same for fluentd format config

Change-Id: I114e3a09e9747085adcc06caa419d5ebe61cec7b
2018-04-06 11:21:31 +09:00
Stanislaw Bogatkin
42deff5ce4 Escalate privileges when copy fluentd custom config
Fluentd custom output and filter configs target directory can have unknown
permissions, so copy these configs as root.

Change-Id: I1649f8cd4a5066245e8f79e8e71b6bbf04dbcb62
Closes-Bug: #1760213
2018-04-05 18:37:58 +03:00
Doug Szumski
f87b238db5 Add support for deploying ZooKeeper
This picks up the abandoned review:
https://review.openstack.org/#/c/412423

Co-Authored-By: Sam Yaple <sam@yaple.net>
Partially-Implements: blueprint monasca-roles
Change-Id: Idc01afcb125271181ee5e15d327d0929f07b49e9
2018-03-23 16:58:51 +00:00
Zuul
bf2d59274b Merge "Support configuration of custom fluentd filters" 2018-02-14 14:13:36 +00:00
Eduardo Gonzalez
31f7732aef Implement blazar ansible role
Add ansible role to deploy blazar
Add nova filters to allow use of blazar

Change-Id: I6742ddc9a4736f256491dd0cfd31904fa8eb5652
Implements: blueprint blazar-ansible-role
2018-01-03 16:36:54 +00:00
Zuul
e3af18f90a Merge "Add vitrage ansible role" 2017-12-28 04:57:45 +00:00
chenxing
2d1a1b1df6 Add vitrage ansible role
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com>

Depends-on I7ffb991adbd05275e331401cd73fc84362084ebd
Change-Id: I85afeb5dfce0bf6350a444000bdb885c6fe079c9
Partially-implements: blueprint vitrage-roles
2017-12-18 17:29:32 +08:00
Xinliang Liu
1d36adcb4f Make fluentd enabled configurable
Although there is an option "enable_fluentd", but there are still
some tasks that make fluentd not configurable.

Change-Id: Ic0a9deb36fce154022925d26411e01a8ffe18b50
Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org>
2017-12-15 10:24:12 +08:00
Tatsuma Matsuki
5025974982 Add a missing conditional check to the common config task
The owner and permission check for config directories
should be executed only when the service is enabled.

Change-Id: I6dd2a8fcce83cba8a9a79b1c302d6b1ef4305144
Closes-Bug: #1734789
2017-11-28 01:14:30 +00:00
Mark Goddard
f12e72440a Support configuration of custom fluentd filters
In some scenarios it may be useful to apply custom filters to logs
before forwarding them.  This may be useful to add additional tags to
the messages or to modify the tags to conform to a log format that
differs from the one defined by kolla-ansible.

Configuration of custom fluentd filters is possible by placing filter
configuration files in ``/etc/kolla/config/fluentd/filter/*.conf`` on
the ansible control host.

Change-Id: I29a20efb0df4bf3564ef009616c786e928aa26d9
Implements: blueprint fluentd-custom-filters
2017-11-23 08:57:06 +00:00
chenxing
419a2fc9fd Fix the deprecated syntax in 01-rewrite.conf
The current syntax of Ubuntu fluentd rewrite rules are not supported
anymore, reference to this commit[1].
According to the build of this patch[2], The Centos has no such isuue.
Only Ubuntu needs to be upgrade to use the <rule> section.

* Centos use 01-rewrite-0.12.conf.j2
* Ubuntu use 01-rewrite-0.14.conf.j2

backport: pike

[1] 248ed8e97d
[2] https://review.openstack.org/#/c/517907

Depends-on: I47985113fe732569d640a262ca832c6edc8c2bb6
Change-Id: I0b131c2f65652cf3c61b33d8162097b047603923
Closes-Bug: #1730664
2017-11-16 07:59:32 +00:00
Duong Ha-Quang
2c5e91a0cd Add become for fluentd create config directory task
Become option is missed in patch #398682, this patchset fix this issue.

Change-Id: I228c31486210ef1de76601d3ea4ee955a628ca73
Partial-Implements: blueprint ansible-specific-task-become
2017-10-31 09:39:49 +07:00
Jenkins
109328be3e Merge "Specify 'become' to necessary tasks (general roles)" 2017-10-03 20:01:04 +00:00
Tatsuma Matsuki
03354bc99e Add fluentd enable option
This change adds enable_fluentd option and enables some other log shippers
to be integrated. When enable_fluentd is "no", syslog server is also disabled.
Then, this change also adds syslog parameters to use a syslog server
prepared by users.

Change-Id: I7c83ef7fe30a6b9ab7385bcee953ad07e96b0a83
Implements: blueprint fluentd-enable-option
2017-09-28 04:36:36 +00:00
Duong Ha-Quang
26b2c2d9e9 Specify 'become' to necessary tasks (general roles)
Add config_owner_user and config_owner_group to group_vars/all,
which is user and group of Kolla configuration files in /etc/kolla.

Add become to post-deploy playbook.

Add become to only neccesary tasks in roles:
- certificate
- common
- destroy
- haproxy
- mariadb
- memcached
- rabbitmq

Change-Id: I2aba745a6e3928c52642f64551470fd08cbfd058
Partial-Implements: blueprint ansible-specific-task-become
2017-09-25 06:52:04 +00:00
Mark Goddard
fb4651461b Support configuration of custom fluentd outputs
In some scenarios it may be useful to configure custom fluentd outputs
to forward logs to a logging service other than elasticsearch.

This change supports configuration of fluentd outputs by placing
output configuration files in /etc/kolla/config/fluentd/output/*.conf.

Change-Id: I3c0b271d88dbb307ba3a23546e29c72e8baeca55
Implements: blueprint fluentd-custom-outputs
2017-09-13 17:25:12 +01:00