Skip to content
Snippets Groups Projects
  1. Jan 23, 2025
  2. Aug 12, 2024
    • Ivan Halomi's avatar
      Refactor of kolla_container_facts · 4ce47e22
      Ivan Halomi authored
      
      Refactor that prepares kolla_container_facts
      module for introducing more actions that will be moved
      from kolla_container module and kolla_container_volume_facts.
      
      This change is based on a discussion about adding a new action
      to kolla_container module that retrieves all names of the running
      containers. It was agreed that kolla-ansible should follow Ansible's
      direction of splitting modules between action modules and facts
      modules. Because of this, kolla_container_facts needs to be able
      to handle different requests for data about containers or volumes.
      
      Change-Id: Ieaec8f64922e4e5a2199db2d6983518b124cb4aa
      Signed-off-by: default avatarIvan Halomi <ivan.halomi@tietoevry.com>
      4ce47e22
  3. Jun 28, 2024
    • Roman Krček's avatar
      Performance: use filters for service dicts · fb3a8f5f
      Roman Krček authored
      Most roles are not leveraging the jinja filters available.
      According to [1] filtering the list of services makes the execution
      faster than skipping the tasks.
      
      This patchset also includes some cosmetic changes to genconfig.
      Individual services are now also using a jinja filter. This has
      no impact on performance, just makes the tasks look cleaner.
      
      Naming of some vars in genconfig was changed to "service" to make
      the tasks more uniform as some were previously using
      the service name and some were using "service".
      
      Three metrics from the deployment were taken and those were
      - overall deployment time [s]
      - time spent on the specific role [s]
      - CPU usage (measured with perf) [-]
      Overall genconfig time went down on avg. from 209s to 195s
      Time spent on the loadbalancer role went down on avg. from 27s to 23s
      Time spent on the neutron role went down on avg from 102s to 95s
      Time spent on the nova-cell role went down on avg. from 54s to 52s
      Also the average CPUs utilized reported by perf went down
      from 3.31 to 3.15.
      For details of how this was measured see the comments in gerrit.
      
      [1] - https://github.com/stackhpc/ansible-scaling/blob/master/doc/skip.md
      
      
      
      Change-Id: Ib0f00aadb6c7022de6e8b455ac4b9b8cd6be5b1b
      Signed-off-by: default avatarRoman Krček <roman.krcek@tietoevry.com>
      fb3a8f5f
  4. Jan 29, 2024
    • Alex-Welsh's avatar
      Update keystone service user passwords · ffd6e3bf
      Alex-Welsh authored
      Service user passwords will now be updated in keystone if services are
      reconfigured with new passwords set in config. This behaviour can be
      overridden.
      
      Closes-Bug: #2045990
      Change-Id: I91671dda2242255e789b521d19348b0cccec266f
      ffd6e3bf
  5. Dec 01, 2023
    • Christian Berendt's avatar
      magnum: support kubeconfig configuration file · c939504d
      Christian Berendt authored
      If a file {{ node_custom_config }}/magnum/kubeconfig exists, it is
      copied to /var/lib/magnum/.kube/config in all Magnum Service Containers.
      At this location, the vexxhost/magnum-cluster-api will loo for the Kubeconfig
      configuration file to control the Cluster API Control Plane. If the
      vexxhost/magnum-cluster-api is installed in the Magnum container images,
      control of a cluster API control plane can then take place via the Magnum API.
      
      Depends-On: https://review.opendev.org/c/openstack/kolla/+/902101
      Change-Id: I986c5192fe96b9c480a2d8fa87d719a50ce78186
      c939504d
  6. Nov 15, 2023
  7. Nov 14, 2023
    • Michal Nasiadka's avatar
      Introduce oneshot docker_restart_policy · cea076f3
      Michal Nasiadka authored
      docker_restart_policy: no causes systemd units to not get created
      and we use it in CI to disable restarts on services.
      
      Introducing oneshot policy to not create systemd unit for oneshot
      containers (those that are running bootstrap tasks, like db
      bootstrap and don't need a systemd unit), but still create systemd
      units for long lived containers but with Restart=No.
      
      Change-Id: I9e0d656f19143ec2fcad7d6d345b2c9387551604
      cea076f3
  8. Mar 23, 2023
  9. Jan 12, 2023
    • Mark Goddard's avatar
      Fix prechecks in check mode · 46aeb984
      Mark Goddard authored
      When running in check mode, some prechecks previously failed because
      they use the command module which is silently not run in check mode.
      Other prechecks were not running correctly in check mode due to e.g.
      looking for a string in empty command output or not querying which
      containers are running.
      
      This change fixes these issues.
      
      Closes-Bug: #2002657
      Change-Id: I5219cb42c48d5444943a2d48106dc338aa08fa7c
      46aeb984
  10. Dec 21, 2022
    • Matt Crees's avatar
      Integrate oslo-config-validator · 6c2aace8
      Matt Crees authored
      Regularly, we experience issues in Kolla Ansible deployments because we
      use wrong options in OpenStack configuration files. This is because
      OpenStack services ignore unknown options. We also need to keep on top
      of deprecated options that may be removed in the future. Integrating
      oslo-config-validator into Kolla Ansible will greatly help.
      
      Adds a shared role to run oslo-config-validator on each service. Takes
      into account that services have multiple containers, and these may also
      use multiple config files. Service roles are extended to use this shared
      role. Executed with the new command ``kolla-ansible validate-config``.
      
      Change-Id: Ic10b410fc115646d96d2ce39d9618e7c46cb3fbc
      6c2aace8
  11. Nov 04, 2022
  12. Nov 02, 2022
  13. Aug 09, 2022
  14. Jul 25, 2022
    • Michal Nasiadka's avatar
      Fix var-spacing · dcf5a8b6
      Michal Nasiadka authored
      ansible-lint introduced var-spacing - let's fix our code.
      
      Change-Id: I0d8aaf3c522a5a6a5495032f6dbed8a2be0251f0
      dcf5a8b6
  15. Aug 10, 2021
    • Radosław Piliszek's avatar
      Refactor and optimise image pulling · 9ff2ecb0
      Radosław Piliszek authored
      We get a nice optimisation by using a filtered loop instead
      of task skipping per service with 'when'.
      
      Partially-Implements: blueprint performance-improvements
      Change-Id: I8f68100870ab90cb2d6b68a66a4c97df9ea4ff52
      9ff2ecb0
  16. Feb 21, 2021
  17. Dec 14, 2020
    • Mark Goddard's avatar
      Revert "Performance: Use import_tasks in the main plays" · db4fc85c
      Mark Goddard authored
      This reverts commit 9cae59be.
      
      Reason for revert: This patch was found to introduce issues with fluentd customisation. The underlying issue is not currently fully understood, but could be a sign of other obscure issues.
      
      Change-Id: Ia4859c23d85699621a3b734d6cedb70225576dfc
      Closes-Bug: #1906288
      db4fc85c
  18. Oct 27, 2020
    • Radosław Piliszek's avatar
      Do not set 'always' tag where unnecessary · 71e9c603
      Radosław Piliszek authored
      Makes 'import_tasks' not change behaviour compared to
      'include_tasks'.
      
      Change-Id: I600be7c3bd763b3b924bd4a45b4e7b4dca7a33e3
      71e9c603
    • Radosław Piliszek's avatar
      Performance: Use import_tasks in the main plays · 9cae59be
      Radosław Piliszek authored
      Main plays are action-redirect-stubs, ideal for import_tasks.
      
      This avoids 'include' penalty and makes logs/ara look nicer.
      
      Fixes haproxy and rabbitmq not to check the host group as well.
      
      Change-Id: I46136fc40b815e341befff80b54a91ef431eabc0
      Partially-Implements: blueprint performance-improvements
      9cae59be
  19. Oct 12, 2020
    • Radosław Piliszek's avatar
      Performance: optimize genconfig · 3411b9e4
      Radosław Piliszek authored
      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
      3411b9e4
  20. Aug 28, 2020
    • Mark Goddard's avatar
      Performance: use import_tasks for register and bootstrap · 496904d6
      Mark Goddard authored
      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
      496904d6
    • Mark Goddard's avatar
      Performance: replace unconditional include_tasks with import_tasks · b685ac44
      Mark Goddard authored
      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
      b685ac44
  21. Aug 25, 2020
    • wu.chunyang's avatar
      add region name for tasks · 60dc0128
      wu.chunyang authored
      when use multiple regions, those tasks always get a wrong endpoint.
      
      Change-Id: Ie164687b2ffd80cedf8a00e7f705b73fccd416e2
      60dc0128
  22. Jul 28, 2020
    • Mark Goddard's avatar
      Performance: use import_tasks for check-containers.yml · 9702d4c3
      Mark Goddard authored
      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 check-containers.yml include, the
      included file only has a single task, so the overhead of skipping this
      task will not be greater than the overhead of the task import. It
      therefore makes sense to switch to use import_tasks there.
      
      Partially-Implements: blueprint performance-improvements
      
      Change-Id: I65d911670649960708b9f6a4c110d1a7df1ad8f7
      9702d4c3
  23. Jul 07, 2020
    • Mark Goddard's avatar
      Performance: remove unnecessary conditions from includes · 7ff27de7
      Mark Goddard authored
      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
      7ff27de7
  24. Jun 07, 2020
  25. Apr 14, 2020
    • James Kirsch's avatar
      Refactor copy certificates task · 4d155d69
      James Kirsch authored
      Refactor service configuration to use the copy certificates task. This
      reduces code duplication and simplifies implementing encrypting backend
      HAProxy traffic for individual services.
      
      Change-Id: I0474324b60a5f792ef5210ab336639edf7a8cd9e
      4d155d69
  26. Mar 10, 2020
    • yj.bai's avatar
      Add notify restart container when cert changed · d3cc2f67
      yj.bai authored
      
      When change the cert file in /etc/kolla/certificate/.
      The certificate in the container has not changed.
      So I think can use kolla-ansible deploy when certificate is
      changed. restart <container>
      
      Partially-Implements: blueprint custom-cacerts
      
      Change-Id: Iaac6f37e85ffdc0352e8062ae5049cc9a6b3db26
      Signed-off-by: default avataryj.bai <bai.yongjun@99cloud.net>
      d3cc2f67
  27. Mar 02, 2020
  28. Feb 28, 2020
    • Mark Goddard's avatar
      Add Ansible group check to prechecks · 49fb55f1
      Mark Goddard authored
      We assume that all groups are present in the inventory, and quite obtuse
      errors can result if any are not.
      
      This change adds a precheck that checks for the presence of all expected
      groups in the inventory for each service. It also introduces a common
      service-precheck role that we can use for other common prechecks.
      
      Change-Id: Ia0af1e7df4fff7f07cd6530e5b017db8fba530b3
      Partially-Implements: blueprint improve-prechecks
      49fb55f1
  29. Jan 28, 2020
    • James Kirsch's avatar
      Copy CA into containers. · 511ba9f6
      James Kirsch authored
      When kolla_copy_ca_into_containers is set to "yes", the Certificate
      Authority in /etc/kolla/certificates will be copied into service
      containers to enable trust for that CA. This is especially useful when
      the CA is self signed, and would not be trusted by default.
      
      Partially-Implements: blueprint custom-cacerts
      
      Change-Id: I4368f8994147580460ebe7533850cf63a419d0b4
      511ba9f6
  30. Nov 22, 2019
    • Michal Nasiadka's avatar
      Change local_action to delegate_to: localhost · 10099311
      Michal Nasiadka authored
      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
      10099311
  31. Sep 26, 2019
    • Kris Lindgren's avatar
      Add a job that *only* deploys updated containers · 2fe0d98e
      Kris Lindgren authored
      Sometimes as cloud admins, we want to only update code that is running
      in a cloud.  But we dont need to do anything else.  Make an action in
      kolla-ansible that allows us to do that.
      
      Change-Id: I904f595c69f7276e71692696471e32fd1f88e6e8
      Implements: blueprint deploy-containers-action
      2fe0d98e
  32. Sep 17, 2019
  33. Aug 16, 2019
    • Scott Solkhon's avatar
      Support configuration of trusted CA certificate file · 09e02ef8
      Scott Solkhon authored
      This commit adds the functionality for an operator to specify
      their own trusted CA certificate file for interacting with the
      Keystone API.
      
      Implements: blueprint support-trusted-ca-certificate-file
      Change-Id: I84f9897cc8e107658701fb309ec318c0f805883b
      09e02ef8
  34. Jul 18, 2019
    • Radosław Piliszek's avatar
      Fix handling of docker restart policy · 6a737b19
      Radosław Piliszek authored
      Docker has no restart policy named 'never'. It has 'no'.
      This has bitten us already (see [1]) and might bite us again whenever
      we want to change the restart policy to 'no'.
      
      This patch makes our docker integration honor all valid restart policies
      and only valid restart policies.
      All relevant docker restart policy usages are patched as well.
      
      I added some FIXMEs around which are relevant to kolla-ansible docker
      integration. They are not fixed in here to not alter behavior.
      
      [1] https://review.opendev.org/667363
      
      
      
      Change-Id: I1c9764fb9bbda08a71186091aced67433ad4e3d6
      Signed-off-by: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
      6a737b19
  35. Jul 12, 2019
    • Mark Goddard's avatar
      During deploy, always sync DB · d5e5e885
      Mark Goddard authored
      A common class of problems goes like this:
      
      * kolla-ansible deploy
      * Hit a problem, often in ansible/roles/*/tasks/bootstrap.yml
      * Re-run kolla-ansible deploy
      * Service fails to start
      
      This happens because the DB is created during the first run, but for some
      reason we fail before performing the DB sync. This means that on the second run
      we don't include ansible/roles/*/tasks/bootstrap_service.yml because the DB
      already exists, and therefore still don't perform the DB sync. However this
      time, the command may complete without apparent error.
      
      We should be less careful about when we perform the DB sync, and do it whenever
      it is necessary. There is an argument for not doing the sync during a
      'reconfigure' command, although we will not change that here.
      
      This change only always performs the DB sync during 'deploy' and
      'reconfigure' commands.
      
      Change-Id: I82d30f3fcf325a3fdff3c59f19a1f88055b566cc
      Closes-Bug: #1823766
      Closes-Bug: #1797814
      d5e5e885
  36. Jun 27, 2019
    • Mark Goddard's avatar
      Simplify handler conditionals · de00bf49
      Mark Goddard authored
      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
      de00bf49
  37. Jun 06, 2019
    • Mark Goddard's avatar
      Use become for all docker tasks · b123bf66
      Mark Goddard authored
      Many tasks that use Docker have become specified already, but
      not all. This change ensures all tasks that use the following
      modules have become:
      
      * kolla_docker
      * kolla_ceph_keyring
      * kolla_toolbox
      * kolla_container_facts
      
      It also adds become for 'command' tasks that use docker CLI.
      
      Change-Id: I4a5ebcedaccb9261dbc958ec67e8077d7980e496
      b123bf66
Loading