Commit Graph

10 Commits

Author SHA1 Message Date
Radosław Piliszek 3411b9e420 Performance: optimize genconfig
Config plays do not need to check containers. This avoids skipping
tasks during the genconfig action.

Ironic and Glance rolling upgrades are handled specially.

Swift and Bifrost do not use the handlers at all.

Partially-Implements: blueprint performance-improvements
Change-Id: I140bf71d62e8f0932c96270d1f08940a5ba4542a
2020-10-12 19:30:06 +02:00
Mark Goddard 496904d650 Performance: use import_tasks for register and bootstrap
Including tasks has a performance penalty when compared with importing
tasks. If the include has a condition associated with it, then the
overhead of the include may be lower than the overhead of skipping all
imported tasks. In the case of the register.yml and bootstrap.yml
includes, all of the tasks in the included file use run_once: True.
The run_once flag improves performance at scale drastically, so
importing these tasks unconditionally will have a lower overhead than a
conditional include task.  It therefore makes sense to switch to use
import_tasks there.

See [1] for benchmarks of run_once.

[1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/run-once.md

Change-Id: Ic67631ca3ea3fb2081a6f8978e85b1522522d40d
Partially-Implements: blueprint performance-improvements
2020-08-28 16:31:04 +00:00
Mark Goddard b685ac44e0 Performance: replace unconditional include_tasks with import_tasks
Including tasks has a performance penalty when compared with importing
tasks. If the include has a condition associated with it, then the
overhead of the include may be lower than the overhead of skipping all
imported tasks. For unconditionally included tasks, switching to
import_tasks provides a clear benefit.

Benchmarking of include vs. import is available at [1].

This change switches from include_tasks to import_tasks where there is
no condition applied to the include.

[1] https://github.com/stackhpc/ansible-scaling/blob/master/doc/include-and-import.md#task-include-and-import

Partially-Implements: blueprint performance-improvements

Change-Id: Ia45af4a198e422773d9f009c7f7b2e32ce9e3b97
2020-08-28 16:12:03 +00:00
Mark Goddard 7ff27de7ac Performance: remove unnecessary conditions from includes
There are a number of tasks where we conditionally use include_tasks
with a condition, and the condition is always true. This change removes
these conditions, in preparation for switching unconditional task
includes to task imports.

Partially-Implements: blueprint performance-improvements

Change-Id: I3804c440fe3552950d9d434ef5409f685c39bbcf
2020-07-07 15:50:58 +01:00
Maciej Kucia 4a127d4bd9 designate: Correctly match hostnames
'in' expresion matches substrings, therefore it is possible
that following expression will fail:
    inventory_hostname in groups['groupname'][0]
for example when:
    inventory_hostname = 'my-host-a'
    groups['groupname'][0] = 'my-host-a1'

The result is running task on multiple hosts rather than single one.
Such action might result in playbook failure

Change-Id: Ibe2d5ca2f9502a8140a895ab3ac7abc5076ce2ff
Signed-off-by: Maciej Kucia <m.kucia@partner.samsung.com>
2019-02-18 17:28:15 +00: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
caoyuan 59a0ddcd01 dev mode: Add support for designate
Provide support for kolla dev mode in designate. When
'kolla_dev_mode' or 'designate_dev_mode' variables are
enabled, source code of designate project is cloned
and bindmounted.

Partially implements: blueprint mount-sources
Co-Authored-By: zhulingjie <easyzlj@gmail.com>

Change-Id: Ib23fbd3d5ebc7e3ac372e0db1e0048d333eb95c0
2018-06-19 06:50:10 +00:00
caowei b82f5cc9f0 Implement designate-producer service
Depends-On: Ia22128e5ce4a717612af658d63258e78e52176ad
Implements: blueprint designate-producer

Change-Id: I98b5e99e8fcfe18fde442b317348ec261f4d2f99
2017-12-07 10:11:14 +08:00
Mauricio Lima 871733c956 Optimize reconfiguration for designate
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Co-Authored-By: Francisco Edigleison Barbosa <barbosaedigleison@gmail.com>
Change-Id: I68c7e753060af2544acdb7d0a2c641c85bad42c6
Partially-implements: blueprint better-reconfigure
2017-02-13 20:39:33 +08:00
Ross Krumbeck a9ade20bee Ansible-ize OpenStack Designate
Implement ansible role to deploy designate
and dependencies. The backend used is bind9.

Co-Authored-By: zhubingbing <zhubingbing10@gmail.com>
Co-Authored-By: Eduardo Gonzalez <dabarren@gmail.com>

Depends-On: 6d0dc3e0f931c7c50b64a4659900cc50b0d860a2
Implements: blueprint ansible-designate
Change-Id: I34d8126e0cd8d71d5ced9b62f3776cc354fbb549
2017-01-05 14:34:15 +00:00