Skip to content
Snippets Groups Projects
  1. Nov 07, 2023
    • Will Szumski's avatar
      Support exposing prometheus_server externally · 37c2ab2a
      Will Szumski authored
      This avoids the need to use a proxy, or some other means, to connect to
      Prometheus. This is disabled by default and can be enabled by setting
      enable_prometheus_server_external to true.
      
      Change-Id: Ia0af044ff436c2a204b357750a16ff49fcdfec45
      37c2ab2a
  2. 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
  3. 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
  4. Nov 04, 2022
  5. Nov 02, 2022
  6. Aug 30, 2022
    • Michal Arbet's avatar
      Fix creation of prometheus user and grant permissions · c5500bdf
      Michal Arbet authored
      Prometheus is creating user and granting permissions
      to database from which is gathering metrics. This
      process is different when haproxy/proxysql is used.
      
      Proxysql:
      
        - kolla-ansible should use root_shard_ID user to connect
          to ProxySQL endpoint and it is routed to proper shard.
      
      Haproxy:
      
        - kolla-ansible should use root user to connect to HAProxy
          endpoint and that's all.
      
      If proxysql is not used, mariadb role will not create user
      shard_root_ID user in bootstrap (from my perspective of view
      it should), and therefore it will fail when HAProxy is used.
      
      This patch is just fixing user to connect.
      
      Change-Id: Icd07807b2c404eb4d3f398879639b17f1e7949c2
      c5500bdf
  7. Aug 12, 2022
  8. Aug 10, 2022
  9. Aug 09, 2022
  10. 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
  11. Jun 23, 2022
  12. May 18, 2022
  13. Jan 05, 2022
  14. Oct 07, 2021
    • Radosław Piliszek's avatar
      Fix privileges for MariaDB 10.5 · c7c14e1c
      Radosław Piliszek authored
      "BINLOG MONITOR" and "SLAVE MONITOR" replace
      "REPLICATION CLIENT" (which is now an alias for "BINLOG MONITOR").
      The validation in Ansible MySQL collection is too simple to
      understand aliases and breaks. Hence, let's use the canonical
      names and adapt per service according to its needs.
      
      Change-Id: I1175e4846384accd19942620dc155d0c5728e64b
      c7c14e1c
  15. Oct 04, 2021
  16. 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
  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
      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
  21. 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
  22. Jun 15, 2020
    • Radosław Piliszek's avatar
      Fix issues with Prometheus config generation · d86f8ab9
      Radosław Piliszek authored
      related to newly introduced merge mechanism.
      1) Per-host overrides cannot be run_once.
      2) Since merge_yaml is silent about missing files, it ignored
         the fact that no proper file was given due to wrong variable
         being referenced (see the closed bug).
      
      Change-Id: I6db4af4c6e3364838bdae510f300038b0c1560b0
      Closes-Bug: #1882460
      d86f8ab9
  23. May 17, 2020
    • Michal Nasiadka's avatar
      CI: Add ansible-lint to tox · d8f31e0a
      Michal Nasiadka authored
      * Reworked tox pep8 into linters job, that runs:
        - pep8
        - bandit
        - bashate
        - doc8
        - yamllint
        - ansible-lint (validate-all-files.py + ansible-lint)
      
      * Skip E701 - missing galaxy_info in meta and E602 see [1].
      * Skip E301 and E503 - followup later in a separate change
      * Added ansible-role-jobs to zuul.d/project.yaml which will run
        openstack-tox-linters job in check queue
      * Fixed remaining style issue
      * Made tox and docs reference the new env for linters
      * Dropped pype environment (not supported)
      
      [1]: https://github.com/ansible/ansible-lint/issues/457
      
      Change-Id: I494b4b151804aac8173120e6c6e42bc2fdb00234
      d8f31e0a
  24. May 11, 2020
    • Will Szumski's avatar
      Add extras directory to prometheus config · d05578f5
      Will Szumski authored
      This provides a generic mechanism to include extra files
      that you can reference in prometheus.yml, for example:
      
      scrape_targets:
        - job_name: ipmi
          params:
            module: default
          scrape_interval: 1m
          scrape_timeout: 30s
          metrics_path: /ipmi
          scheme: http
          file_sd_configs:
          - files:
            - /etc/prometheus/extras/file_sd/ipmi-exporter-targets.yml
            refresh_interval: 5m
      
      Change-Id: Ie2f085204b71725b901a179ee51541f1f383c6fa
      Related: blueprint custom-prometheus-targets
      d05578f5
    • Will Szumski's avatar
      Support customizing prometheus.cfg files · 956a29f8
      Will Szumski authored
      This provides a mechanism to scrape targets defined outside of kolla-ansible.
      
      Depends-On: https://review.opendev.org/#/c/685671/
      Change-Id: I0950341b147bb374b4128f09f807ef5a756f5dfa
      Related: blueprint custom-prometheus-targets
      956a29f8
  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 20, 2020
    • Doug Szumski's avatar
      Support disabling Prometheus server · 505cded2
      Doug Szumski authored
      This is useful to people who manage their Prometheus Server
      externally to Kolla Ansible, or want to use the exporters with
      another framework such as Monasca.
      
      Change-Id: Ie3f61e2e186c8e77e21a7b53d2bd7d2a27eee18e
      505cded2
  27. 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
  28. Mar 02, 2020
  29. 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
  30. 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
  31. Jan 13, 2020
  32. 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
  33. Oct 16, 2019
    • Radosław Piliszek's avatar
      Implement IPv6 support in the control plane · bc053c09
      Radosław Piliszek authored
      Introduce kolla_address filter.
      Introduce put_address_in_context filter.
      
      Add AF config to vars.
      
      Address contexts:
      - raw (default): <ADDR>
      - memcache: inet6:[<ADDR>]
      - url: [<ADDR>]
      
      Other changes:
      
      globals.yml - mention just IP in comment
      
      prechecks/port_checks (api_intf) - kolla_address handles validation
      
      3x interface conditional (swift configs: replication/storage)
      
      2x interface variable definition with hostname
      (haproxy listens; api intf)
      
      1x interface variable definition with hostname with bifrost exclusion
      (baremetal pre-install /etc/hosts; api intf)
      
      neutron's ml2 'overlay_ip_version' set to 6 for IPv6 on tunnel network
      
      basic multinode source CI job for IPv6
      
      prechecks for rabbitmq and qdrouterd use proper NSS database now
      
      MariaDB Galera Cluster WSREP SST mariabackup workaround
      (socat and IPv6)
      
      Ceph naming workaround in CI
      TODO: probably needs documenting
      
      RabbitMQ IPv6-only proto_dist
      
      Ceph ms switch to IPv6 mode
      
      Remove neutron-server ml2_type_vxlan/vxlan_group setting
      as it is not used (let's avoid any confusion)
      and could break setups without proper multicast routing
      if it started working (also IPv4-only)
      
      haproxy upgrade checks for slaves based on ipv6 addresses
      
      TODO:
      
      ovs-dpdk grabs ipv4 network address (w/ prefix len / submask)
      not supported, invalid by default because neutron_external has no address
      No idea whether ovs-dpdk works at all atm.
      
      ml2 for xenapi
      Xen is not supported too well.
      This would require working with XenAPI facts.
      
      rp_filter setting
      This would require meddling with ip6tables (there is no sysctl param).
      By default nothing is dropped.
      Unlikely we really need it.
      
      ironic dnsmasq is configured IPv4-only
      dnsmasq needs DHCPv6 options and testing in vivo.
      
      KNOWN ISSUES (beyond us):
      
      One cannot use IPv6 address to reference the image for docker like we
      currently do, see: https://github.com/moby/moby/issues/39033
      (docker_registry; docker API 400 - invalid reference format)
      workaround: use hostname/FQDN
      
      RabbitMQ may fail to bind to IPv6 if hostname resolves also to IPv4.
      This is due to old RabbitMQ versions available in images.
      IPv4 is preferred by default and may fail in the IPv6-only scenario.
      This should be no problem in real life as IPv6-only is indeed IPv6-only.
      Also, when new RabbitMQ (3.7.16/3.8+) makes it into images, this will
      no longer be relevant as we supply all the necessary config.
      See: https://github.com/rabbitmq/rabbitmq-server/pull/1982
      
      For reliable runs, at least Ansible 2.8 is required (2.8.5 confirmed
      to work well). Older Ansible versions are known to miss IPv6 addresses
      in interface facts. This may affect redeploys, reconfigures and
      upgrades which run after VIP address is assigned.
      See: https://github.com/ansible/ansible/issues/63227
      
      Bifrost Train does not support IPv6 deployments.
      See: https://storyboard.openstack.org/#!/story/2006689
      
      
      
      Change-Id: Ia34e6916ea4f99e9522cd2ddde03a0a4776f7e2c
      Implements: blueprint ipv6-control-plane
      Signed-off-by: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
      bc053c09
  34. 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
  35. Sep 18, 2019
    • Scott Solkhon's avatar
      Adding Prometheus blackbox exporter · b22375eb
      Scott Solkhon authored
      
      This commit follows up the work in Kolla to provide deploy and configure the
      Prometheus blackbox exporter.
      
      An example blackbox-exporter module has been added (disabled by default)
      called os_endpoint. This allows for the probing of endpoints over HTTP
      and HTTPS. This can be used to monitor that OpenStack endpoints return a status
      code of either 200 or 300, and the word 'versions' in the payload.
      
      This change introduces a new variable `prometheus_blackbox_exporter_endpoints`.
      Currently no defaults are specified because the configuration is heavily
      dependent on the deployment.
      
      Co-authored-by: default avatarJack Heskett <Jack.Heskett@gresearch.co.uk>
      Change-Id: I36ad4961078d90e2fd70c9a3368f5157d6fd89cd
      b22375eb
  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
  38. Apr 10, 2019
Loading