Skip to content
Snippets Groups Projects
  1. Apr 02, 2020
    • Mark Goddard's avatar
      Avoid unconditional fact gathering · e0ba55a8
      Mark Goddard authored
      One way to improve the performance of Ansible is through fact caching.
      Rather than gather facts in every play, we can configure Ansible to
      cache them in a persistent store. An example Ansible configuration for
      doing this is as follows:
      
      [defaults]
      gathering = smart
      fact_caching = jsonfile
      fact_caching_connection = ./facts
      fact_caching_timeout = 86400
      
      This does not affect Kolla Ansible however, since we use the setup
      module which unconditionally gathers facts regardless of the state of
      the cache. This gets worse with large inventories limited to a small
      batch of hosts via --limit or serial, since the limited hosts must
      gather facts for all others.
      
      One way to detect whether facts exist for a host is via the
      'module_setup' variable, which exists only when facts exist. This change
      uses the 'module_setup' fact to determine whether facts need to be
      gathered for hosts outside of the batch. For hosts in the batch, we
      switch from using the setup module to gather_facts on the play, which
      can use the 'smart' gathering logic.
      
      Change-Id: I04841fb62b2e1d9e97ce4b75ce3a7349b9c74036
      Partially-Implements: blueprint performance-improvements
      e0ba55a8
  2. Dec 07, 2018
    • Mark Goddard's avatar
      Fix fact gathering with --limit · 56b4352f
      Mark Goddard authored
      Prior to this change, when the --limit argument is used, each host in the
      limit gathers facts for every other host. This is clearly unnecessary, and
      can result in up to (N-1)^2 fact gathers.
      
      This change gathers facts for each host only once. Hosts that are not in
      the limit are divided between those that are in the limit, and facts are
      gathered via delegation.
      
      This change also factors out the fact gathering logic into a separate
      playbook that is imported where necessary.
      
      Change-Id: I923df5af41a7f1b7b0142d0da185a9a0979be543
      56b4352f
  3. May 16, 2018
    • Mark Goddard's avatar
      Fix missed kolla_action and kolla_serial · 2e190597
      Mark Goddard authored
      In change I78cb60168aaa40bb6439198283546b7faf33917c, action was changed
      to kolla_action, and serial to kolla_serial, to avoid Ansible warnings
      due to use of reserved keywords. In that change, some keywords were
      missed, and some changes that were merged since then have not switched
      to the new variables. This change fixes all current instances of those
      issues.
      
      Change-Id: I357dffdfcb2b405e280a962d366ee65eebf0a8d1
      Implements: blueprint migrate-to-ansible-2-2-0
      2e190597
  4. Mar 26, 2018
    • Eduardo Gonzalez's avatar
      Verify YAML syntax in gates · ea1a1dee
      Eduardo Gonzalez authored
      This patchset implements yamllint test to all *.yml
      files.
      
      Also fixes syntax errors to make jobs to pass.
      
      Change-Id: I3186adf9835b4d0cada272d156b17d1bc9c2b799
      ea1a1dee
  5. Aug 29, 2017
    • Soeren Becker's avatar
      Enable use of --limit when using bootstrap-servers · c24afe6d
      Soeren Becker authored
      The ansible/kolla-host.yml playbook failed when called with a --limit
      flag.
      
      This was due to the fact that only the facts of the subset of hosts
      were gathered but the "Generate /etc/hosts for all of the nodes" task
      is using the ansible_<IFACE>.ipv4.address variable of all hosts.
      
      The code for this fix is copied from the site.yml playbook
      where it was used for the same reason.
      
      Change-Id: I7e70caf750506ad8ab36ec024bd9647dd733fbd0
      Closes-Bug: #1713725
      c24afe6d
  6. Dec 05, 2016
  7. Aug 10, 2016
Loading