4919 Commits

Author SHA1 Message Date
Michal Nasiadka
1009931162 Change local_action to delegate_to: localhost
As part of the effort to implement Ansible code linting in CI
(using ansible-lint) - we need to implement recommendations from
ansible-lint output [1].

One of them is to stop using local_action in favor of delegate_to -
to increase readability and and match the style of typical ansible
tasks.

[1]: https://review.opendev.org/694779/

Partially implements: blueprint ansible-lint

Change-Id: I46c259ddad5a6aaf9c7301e6c44cd8a1d5c457d3
2019-11-22 15:04:44 +00:00
Zuul
28e082ea02 Merge "Use internal API for heat -> keystone communication" 2019-11-19 11:14:34 +00:00
Zuul
e5149cbcc2 Merge "Fix local_action and line_length>160 in common role" 2019-11-19 11:14:33 +00:00
Zuul
7c17c3c45e Merge "Vitrage: typo in precheck task" 2019-11-18 17:58:08 +00:00
Michal Nasiadka
2a5532c9a9 Fix local_action and line_length>160 in common role
- transitional handling of fluentd_binary var is no longer required

Change-Id: Ic2978252fb981fe15e600aa486e8af585d05c402
2019-11-18 17:31:52 +00:00
Zuul
c4818ffd16 Merge "Remove OpenDaylight role" 2019-11-18 15:30:39 +00:00
Viktor Michalek
0217ebb82f Vitrage: typo in precheck task
Change-Id: If45d4877c3fa125a3abc71f0a84883fad0a0cf6e
Closes-Bug: 1853011
2019-11-18 15:39:13 +01:00
Michal Nasiadka
eec6831fff Remove OpenDaylight role
Opendaylight support has been deprecated in Train - time to remove it.

Change-Id: I3a61bfbcbf366c327ea3e25d2424bc3fedca29f0
2019-11-18 11:57:32 +00:00
caoyuan
052bc86e34 Adjust the order of src and dest for template module
1. Adjust the order of src and dest for template module
2. Remove the double quotes from task's name to keep consistence with
the others.
3. Add a space after "|"

Change-Id: I580517d5b95dcaa34841def70ec6f57a5cbe0229
2019-11-16 23:19:24 +08:00
Radosław Piliszek
2cd00dadc0 Use internal API for heat -> keystone communication
Continues work from https://review.opendev.org/676716

Change-Id: If0195c38034d404849bf2e8fca4629b2d38a2680
Closes-Bug: #1812864
Related-Bug: #1762754
Related-Bug: #1688331
2019-11-16 13:40:27 +00:00
Zuul
0b24cad92b Merge "Remove transitional support for influxdb in cloudkitty upgrade" 2019-11-15 14:08:15 +00:00
Zuul
31a5848b73 Merge "Start Docker after upgrade" 2019-11-15 13:00:04 +00:00
Zuul
1a82bd91b5 Merge "Fix restart policy after MariaDB recovery" 2019-11-15 12:17:12 +00:00
Zuul
db228d1ad2 Merge "Remove precheck for nova_enable_rolling_upgrade" 2019-11-15 12:17:10 +00:00
Zuul
287a41aa7f Merge "Remove transitional support for neutron-lbaas removal" 2019-11-15 12:17:09 +00:00
Mark Goddard
d98be11e46 Remove precheck for nova_enable_rolling_upgrade
This variable was removed in the Train cycle, and a precheck added for
its use. This precheck can now be removed.

Change-Id: I6d9f0b577631ff9443deecf8ef9d94ca217674c5
2019-11-14 11:53:53 +00:00
Mark Goddard
0bd60388a8 Remove transitional support for neutron-lbaas removal
Support for deploying neutron-lbaas was removed in the Train release. We
no longer need the task to remove the container in the upgrade process.

Change-Id: Ie336f68c710616de29f34dd4011e137ec056973b
2019-11-14 11:48:56 +00:00
Mark Goddard
e6c5aa4a08 Remove transitional support for influxdb in cloudkitty upgrade
During the Stein release the default storage backend for cloudkitty was
switched to influxdb. To aid this transition we added creation of the
influxdb database during upgrade. Now that this transition is complete
we can remove it.

Change-Id: Ieb247f36af932d3a357504c7419ead44b10d1301
2019-11-14 11:40:41 +00:00
Keith Plant
a3a1b068fe Add support for custom HAProxy service config
Allow users to create/override HAProxy service configuration by
copying over '*.cfg' files from {{ node_custom_config
}}/haproxy/services.d/

Ex: /etc/kolla/config/haproxy/services.d/radosgw.cfg

Change-Id: Id84e3b6e62e544582d6917047534e846e026798d
Signed-off-by: Keith Plant <kplantjr@gmail.com>
2019-11-11 15:24:46 -05:00
Zuul
a9f7ab1f56 Merge "Collect rabbitmq logs by fluentd" 2019-11-11 16:36:33 +00:00
Mark Goddard
82e58a7a5a Start Docker after upgrade
If you do the following:

* Install legacy Docker (1.12.0) using kolla-ansible bootstrap-servers
  with the Rocky release or earlier.
* Update to Docker CE, using kolla-ansible bootstrap-servers with the
  Stein release or later

The package is upgraded, but docker is stopped. This prevents the 'Wait
for Docker to start' task from completing, since Docker will not start.
Seen on CentOS 7.6, Docker CE 19.03.4.

This was tested and working previously, perhaps something changed with
the Docker package.

This change fixes the issue by starting and enabling Docker after the
upgrade.

Change-Id: If6e9c91f3e8d0ec366eea7ca506c6d10dbf11c3a
Closes-Bug: #1852066
2019-11-11 11:16:05 +00:00
Zuul
f15d5d500c Merge "Fix keystone fernet rotation for source images" 2019-11-07 10:27:58 +00:00
Mark Goddard
f979ae1f8e Fix restart policy after MariaDB recovery
After performing a recovery of MariaDB, the mariadb containers are left
without a restart policy. This leaves them unable to recover from the
crash of a single galera node. There is another issue, in that the
'master' node is left in a bootstrap configuration, with the
--wsrep-new-cluster argument configured as BOOTSTRAP_ARGS.

This change fixes these issues by removing the restart policy of 'no'
from the 'slave' containers, and recreating the master container without
the restart policy or bootstrap arguments.

Change-Id: I36c875611931163ca2c29ae93b71d3af64cb197c
Closes-Bug: #1851594
2019-11-07 10:08:57 +00:00
Zuul
56f355136a Merge "Fix indentation of HAProxy internal http-request config" 2019-11-06 12:06:40 +00:00
Zuul
105a5cd96e Merge "Fix defaults filename of module-load role" 2019-11-06 11:29:48 +00:00
Christian Berendt
d3a6d15329 Fix defaults filename of module-load role
All other roles also use defaults/main.yml.

Change-Id: Ic03aba436a4f3c775ff8e815c93e1d52250d5411
2019-11-05 18:28:27 +01:00
Mark Goddard
76ae7eff7f Fix indentation of HAProxy internal http-request config
Related: blueprint add-ssl-internal-network
Co-Authored-By: generalfuzz <generalfuzz@gmail.com>

Change-Id: Ib79796d49c415d8314ea5661a16bd2dac8ba7188
2019-11-05 14:31:09 +00:00
Mark Goddard
d09ee49afc Fix keystone fernet rotation for source images
In source images, keystone-manage is installed to a virtualenv in
/var/lib/kolla/venv. This is not in the PATH for cron jobs, which always
use PATH=/usr/bin:/bin. This results in the following error:

/usr/bin/fernet-rotate.sh: line 3: keystone-manage: command not found

However this error is not typically visible, since cron logs to syslog
and we do not configure fluentd to collect these logs.

This change configures the PATH in the fernet-rotate.sh script for
source images.

Change-Id: Ib49ea586d36ae32d01b9610a48b13798db4a4cd5
Closes-Bug: #1850711
2019-11-05 12:06:26 +00:00
Zuul
0fe5fa831a Merge "Fix empty match while setting supported_policy_files" 2019-11-05 11:33:40 +00:00
lklimin
bf979282a1 Collect rabbitmq logs by fluentd
Change-Id: I49b24545501085d5a44f4de73f0c6dd21e06e2a0
Closes-Bug: #1835501
2019-11-05 13:46:20 +03:00
Martin Chlumsky
9d0ccad15a Fix empty match while setting supported_policy_files
When supported_policy_files gets set under python 3.7 [1], the regex '(.*)'
matches twice, once for the policy file name and once more for the empty string
that follows the policy file name. This is new behavior under python
3.7. [2]

This leads to the replacement string being written out twice resulting
in something like this: "nova_policy.yamlnova_".

This patch changes the regex to '(.+)' ensuring there is no match success
against the empty string.

[1]:
- set_fact:
    supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.*)', '{{ project_name }}_\\1') | list }}"

[2]: https://docs.python.org/3/library/re.html#re.sub

Change-Id: Ie5278832e293364c66d53ddb07dff9c5409f0cc6
Closes-Bug: 1851249
2019-11-04 13:17:39 -05:00
Zuul
adb2bdec56 Merge "Fix haproxy deploy for external mariadb cluster" 2019-11-04 17:50:10 +00:00
lklimin
0a7d189d05 Fix haproxy deploy for external mariadb cluster
Change-Id: I12fa6ae8dcec79485c30c4fea2977875aa8f4fae
Closes-Bug: #1850792
2019-11-04 17:30:29 +03:00
Zuul
6160cdc576 Merge "Use mariabackup for database backups" 2019-11-04 12:10:42 +00:00
Zuul
77232dc87c Merge "Enable load balancing to Galera nodes in Donor state" 2019-11-04 12:00:24 +00:00
Zuul
fce8a8dea8 Merge "Workaround ironic inspector startup issue" 2019-11-04 10:04:07 +00:00
Zuul
272b7c45aa Merge "Fix deploy-containers command for mariadb" 2019-11-04 09:43:45 +00:00
Mark Goddard
7f47ddf7f4 Use mariabackup for database backups
Currently, Xtrabackup is used for database backups. However, Xtrabackup
is not compatible with MariaDB 10.3. This change switches to use
mariabackup [1], which is available in the mariadb image.

The documented full and incremental restore procedures have been
modified to use mariabackup, following [2] and [3].

[1] https://mariadb.com/kb/en/library/mariabackup-overview/
[2] https://mariadb.com/kb/en/library/full-backup-and-restore-with-mariabackup/
[3] https://mariadb.com/kb/en/library/incremental-backup-and-restore-with-mariabackup/

Change-Id: Id52b9b1f7b013277e401b1f6b8aed34473d2b2c4
Closes-Bug: #1843043
Depends-On: https://review.opendev.org/691290
2019-11-01 18:44:10 +00:00
Mark Goddard
f6e8478b61 Enable load balancing to Galera nodes in Donor state
We use the wsrep_notify.sh script to notify changes in Galera cluster
membership to haproxy. When xtrabackup was used for the state transfer,
nodes in the Donor state would be included in the backend pool. However,
since the switch to mariabackup in the Stein cycle, we now remove nodes
in the Donor state from the backend pool.

This change ensures that nodes in the Donor state are included in the
backend pool when the SST method is either xtrabackup or mariabackup.

https://galeracluster.com/library/documentation/mysql-wsrep-options.html#wsrep-notify-cmd

Change-Id: Ide4301779a0d221ae5d4dbdd4873fb8a40eb7297
Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Closes-Bug: #1850945
2019-11-01 18:37:06 +00:00
yuchengde
44a302d7d2 Allow nova to delete volume with cinder auth
If "reclaim_instance_interval" has been set in nova conf,
attched volume may not be delete while instacne deleted.
Adding cinder auth in nova conf can solve the problem.

Change-Id: I9eb3a74c2f6976043cc35a94915f1fcecb9ef601
Closes-Bug:  1850279
2019-11-01 14:48:37 +00:00
Mark Goddard
1f1f01f27f Fix playbooks for Ansible 2.9
The version_compare filter was renamed to version and changed to be a
test in 2.5. The old filter was removed in 2.9.

TrivialFix

Change-Id: Ib5d91b5fc53d0f6d16dd6eb38121cd9914e33d93
2019-11-01 09:34:18 +00:00
Mark Goddard
15591437f3 Workaround ironic inspector startup issue
If ironic inspector starts up before ironic-api is accessible, we see
the following error:

AttributeError: StrictVersion instance has no attribute 'version'

This actually prevents startup of ironic inspector.

Example: http://paste.openstack.org/show/756342/

The underlying issue is in python-ironicclient:
https://storyboard.openstack.org/#!/story/2006393.

The workaround employed here is to wait for ironic-api to become
available before starting ironic-inspector.

Change-Id: I674982eba5082fdc951cdcb8247d706278c64c1a
Closes-Bug: #1839866
2019-10-31 17:11:15 +00:00
Zuul
9852082724 Merge "Fix nova scheduler down after first docker restart" 2019-10-30 16:38:37 +00:00
Zuul
b492a62373 Merge "Fix kolla-bootstrap-servers with docker_storage_driver set" 2019-10-28 20:34:02 +00:00
Zuul
d55dac92dd Merge "Allow passing arguments to RabbitMQ server" 2019-10-28 09:55:25 +00:00
Zuul
a654649be5 Merge "Update swift templates to support swift_extra_ring_files" 2019-10-26 14:30:12 +00:00
Mark Goddard
a6372a66f2 Fix deploy-containers command for mariadb
The MariaDB handlers require master_host to be set.

TrivialFix

Change-Id: I162efbd9e615b86dcdc6e8a4af081cda2f8b0b2b
2019-10-25 17:20:52 +00:00
Mark Goddard
6bdf202658 Fix nova scheduler down after first docker restart
Due to a Docker bug [1] we cannot use Docker to send
SIGHUP to the container because it will mark it as
stopped.
This patch sends the signal directly to the process,
bypassing Docker.

'changed_when: false' is also removed from the
relevant task as it definitely changes the state.
In the future we could do the refresh only if
there really is a need for another one.

[1] https://github.com/moby/moby/issues/11065

Change-Id: Ief73bbd24568d6941384ea3330ab45f11aa42d37
Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Closes-Bug: #1845244
2019-10-25 12:32:48 +00:00
Jan Vondra
9137828b97 Allow passing arguments to RabbitMQ server
Adds rabbitmq_server_additional_erl_args variable which
is appended to RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS
environment variable to RabbitMQ server startup script.

This can be used to configure the schedulers.

Docs attached.

Change-Id: Id683c8cc6dac61354ffd94f3b460335b42136ba2
Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Related-bug: #1846467
2019-10-25 11:38:45 +02:00
Zuul
4353f0a4dc Merge "Fix swift.conf custom configuration path collision" 2019-10-25 06:27:39 +00:00