Skip to content
Snippets Groups Projects
  1. Sep 12, 2024
    • Pierre Riteau's avatar
      Separate outputs of kolla_toolbox inner module · 54076620
      Pierre Riteau authored
      Inner modules called by the kolla_toolbox module were returning stdout
      and stderr as a single output object. This could break JSON parsing if
      any data was present in stderr, for example warnings such as:
      
          [WARNING]: Collection ansible.posix does not support Ansible version 2.14.17
      
      Fix by using demux=True to separate the two streams. The stderr content
      is logged as it could be useful for troubleshooting or catching
      deprecation notices.
      
      Change-Id: Iad0476d4511f28c837794352c9a3e2f47113d9a1
      Closes-Bug: #2080544
      54076620
  2. Aug 21, 2024
    • leiyashuai's avatar
      Remove "distutils" library · b3a66ef3
      leiyashuai authored
      Library "distutils" is deprecated in Python 3.10:
      https://peps.python.org/pep-0632/
      
      The versions previously referenced using StrictVersion should be old
      enough that they will not be used in a Dalmatian deployment:
      
      - Ansible 2.11
      - Docker API 1.42, included since Docker engine 23.0.0
      
      Change-Id: Ie315004715a1cb5a91dd54bc64b0a8fd0af650ec
      b3a66ef3
  3. 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
  4. Mar 20, 2024
  5. Nov 15, 2023
  6. 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
  7. Nov 09, 2023
  8. Oct 20, 2023
  9. Oct 04, 2023
  10. Sep 05, 2023
    • Michal Nasiadka's avatar
      ovn: Improve clustering · 7cc4bf62
      Michal Nasiadka authored
      Currently clustering steps are very static, if for a reason first
      node in the inventory fails and gets re-introduced - K-A will create
      a second empty cluster on that node.
      
      This patch changes the approach and checks if cluster exists, if it
      does - chooses a donor for the new node from currently running
      node set.
      
      Also it fixes node replacement - it removes old node from cluster
      (that has the same ip address as newly provisioned node).
      
      Closes-Bug: #1875223
      
      Change-Id: Ia025283e38ea7c3bd37c7a70d03f6b46c68f4456
      7cc4bf62
  11. Feb 20, 2023
  12. Feb 04, 2023
    • Michal Arbet's avatar
      Fix kolla_docker module · 63b9fa56
      Michal Arbet authored
      This patch fixes kolla_docker module
      as it did not take into account common_options
      parameter. From patchset it's visible that module's
      default values are used always - even if user overrided
      some param in common_options dict.
      
      Closes-Bug: #2003079
      
      Change-Id: I677fde708dd004decaff4bd39f2173d8d81052fb
      63b9fa56
  13. Dec 13, 2022
  14. Nov 04, 2022
  15. Nov 02, 2022
  16. Oct 04, 2022
  17. Feb 14, 2022
    • Mark Goddard's avatar
      Remove bslurp module · 2f6a8fa2
      Mark Goddard authored
      This module was used in the Ceph deployment support, which was removed
      long ago.
      
      Change-Id: I599ef47199bc68e8f5cf62709157d3f096ac68a9
      2f6a8fa2
  18. Jan 06, 2022
  19. Sep 23, 2021
  20. May 30, 2021
  21. Apr 27, 2021
    • Radosław Piliszek's avatar
      Check config when checking the containers · c3afbd3c
      Radosław Piliszek authored
      The proposed approach allows for checking whether config
      files are current, e.g. cases when the deployment was aborted after
      config files were generated but before they were injected into the
      containers which lead to old config staying in containers.
      
      After this patch we can do:
        kolla-ansible genconfig
        kolla-ansible deploy-containers
      and it would do what we expected rather than being a noop
      in the second part.
      
      We also lose the need to have notifies
      and whens in config and handler sections respectively.
      This is optimised in a separate patch.
      
      Future work:
      - optimise for large files
        - could we get away with comparing timestamps and sizes?
          container's should have a newer timestamp due to copy,
          could also preserve it
      
      Change-Id: I1d26e48e1958f13b854d8afded4bfba5021a2dec
      Closes-Bug: #1848775
      Depends-On: https://review.opendev.org/c/openstack/kolla/+/773257
      
      
      Co-Authored-By: default avatarMark Goddard <mark@stackhpc.com>
      c3afbd3c
  22. Dec 16, 2020
  23. Oct 04, 2020
    • Radosław Piliszek's avatar
      Coordinate haproxy and keepalived restarts · c2d0bf30
      Radosław Piliszek authored
      Keepalived and haproxy cooperate to provide control plane HA in
      kolla-ansible deployments.
      Certain care should be exerted to avoid prolonged availability
      loss during reconfigurations and upgrades.
      This patch aims to provide this care.
      There is nothing special about keepalived upgrade compared to
      reconfig, hence it is simplified to run the same code as for
      deploy.
      The broken logic of safe upgrade is replaced by common handler
      code which's goal is to ensure we down current master only after
      we have backups ready.
      
      This change introduces a switch to kolla_docker module that allows
      to ignore missing containers (as they are logically stopped).
      ignore_missing is the switch's name.
      All tests are included.
      
      Change-Id: I22ddec5f7ee4a7d3d502649a158a7e005fe29c48
      c2d0bf30
  24. Sep 30, 2020
  25. May 17, 2020
    • gugug's avatar
      Enable W503 for flake8 check · 22f7aecb
      gugug authored
      W503 and W504 are incompatible and we need to choose one of them.
      Existing codes follows W503, so we disable W504.
      
      Change-Id: Ic745e956dd332eb0fa49b93c1e6acb12f8a7f26c
      22f7aecb
  26. Apr 04, 2020
    • Andreas Jaeger's avatar
      Update hacking for Python3 · 45448976
      Andreas Jaeger authored
      The repo is Python 3 now, so update hacking to version 3.0 which
      supports Python 3.
      
      Fix problems found by updated hacking version.
      
      Remove hacking and friends from lower-constraints, they are not needed
      during installation.
      
      Change-Id: I7ef5ac8a89e94f5da97780198619b6facc86ecfe
      45448976
  27. Feb 11, 2020
  28. Jan 06, 2020
  29. Nov 28, 2019
    • Mark Goddard's avatar
      Support configuration of Docker client timeout · 01050dc0
      Mark Goddard authored
      Adds support for configuration of the Docker client timeout via
      'docker_client_timeout'.
      
      This change also increases the default timeout to 120 seconds, as we
      sometimes see timeouts in CI and heavily loaded or underpowered
      environments. Increasing 'docker_client_timeout' further may be helpful
      in cases where Docker reports 'Read timed out'.
      
      Change-Id: I73745771078cb2c0ebae2b1d87ba2c4c12958d82
      Closes-Bug: #1809844
      01050dc0
  30. Nov 14, 2019
    • Mark Goddard's avatar
      Attempt to pull image before stopping and removing container · 64d07c0b
      Mark Goddard authored
      * Deploy services using kolla-ansible deploy
      * Reconfigure the image for one or more services to use an invalid
      * config
      * Deploy/reconfigure services using kolla-ansible reconfigure
      
      The invalid config could be a wrong docker registry, wrong image name,
      wrong tag, etc.
      
      The restart handler for the service fails, and the old container is
      left running.
      
      The restart handler for the service fails, and the old container is
      stopped and removed. This leaves the service in a broken state.
      
      This change fixes the issue by pulling the image if necessary prior to
      stopping and removing the container.
      
      Change-Id: I85b2a1b224d4c4d85c32c4922a2cd2c41171a1dc
      Closes-Bug: #1852572
      64d07c0b
  31. Oct 01, 2019
    • Mark Goddard's avatar
      Add service-rabbitmq role · 039cc2be
      Mark Goddard authored
      This role can be used by other roles to register RabbitMQ resources.
      Currently support is provided for creating virtual hosts and users.
      
      Change-Id: Ie1774a10b4d629508584af679b8aa9e372847804
      Partially Implements: blueprint support-nova-cells
      Depends-On: https://review.opendev.org/684742
      039cc2be
  32. Sep 30, 2019
  33. Sep 16, 2019
    • Mark Goddard's avatar
      Catch errors and changes in kolla_toolbox module · 70b515bf
      Mark Goddard authored
      The kolla_toolbox Ansible module executes as-hoc ansible commands in the
      kolla_toolbox container, and parses the output to make it look as if
      ansible-playbook executed the command. Currently however, this module
      sometimes fails to catch failures of the underlying command, and also
      sometimes shows tasks as 'ok' when the underlying command was changed.
      This has been tested both before and after the upgrade to ansible 2.8.
      
      This change fixes this issue by configuring ansible to emit output in
      JSON format, to make parsing simpler. We can now pick up errors and
      changes, and signal them to the caller.
      
      This change also adds an ansible playbook, tests/test-kolla-toolbox.yml,
      that can be executed to test the module. It's not currently integrated
      with any CI jobs.
      
      Note that this change cannot be backported as the JSON output callback
      plugin was added in Ansible 2.5.
      
      Change-Id: I8236dd4165f760c819ca972b75cbebc62015fada
      Closes-Bug: #1844114
      70b515bf
  34. Aug 22, 2019
  35. Aug 07, 2019
  36. Aug 05, 2019
    • Radosław Piliszek's avatar
      ceph: fixes to deployment and upgrade · 826f6850
      Radosław Piliszek authored
      1) ceph-nfs (ganesha-ceph) - use NFSv4 only
      This is recommended upstream.
      v3 and UDP require portmapper (aka rpcbind) which we
      do not want, except where Ubuntu ganesha version (2.6)
      forces it by requiring enabled UDP, see [1].
      The issue has been fixed in 2.8, included in CentOS.
      Additionally disable v3 helper protocols and kerberos
      to avoid meaningless warnings.
      
      2) ceph-nfs (ganesha-ceph) - do not export host dbus
      It is not in use. This avoids the temptation to try
      handling it on host.
      
      3) Properly handle ceph services deploy and upgrade
      Upgrade runs deploy.
      The order has been corrected - nfs goes after mds.
      Additionally upgrade takes care of rgw for keystone
      (for swift emulation).
      
      4) Enhance ceph keyring module with error detection
      Now it does not blindly try to create a keyring after
      any failure. This used to hide real issue.
      
      5) Retry ceph admin keyring update until cluster works
      Reordering deployment caused issue with ceph cluster not being
      fully operational before taking actions on it.
      
      6) CI: Remove osd df from collected logs as it may hang CI
      Hangs are caused by healthy MON and no healthy MGR.
      A descriptive note is left in its place.
      
      7) CI: Add 5s timeout to ceph informational commands
      This decreases the timeout from the default 300s.
      
      [1] https://review.opendev.org/669315
      
      
      
      Change-Id: I1cf0ad10b80552f503898e723f0c4bd00a38f143
      Signed-off-by: default avatarRadosław Piliszek <radoslaw.piliszek@gmail.com>
      826f6850
  37. 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
  38. Jun 07, 2019
  39. Mar 10, 2019
    • Victor Coutellier's avatar
      Fix kolla-docker possible undefined variable · 3bb4c199
      Victor Coutellier authored
      It is possible to reference undefined variable in kolla-docker module if
      DockerWorker object initialization fail, so the current behaviour will
      crash the playbook with the unwanted error message :
      
      UnboundLocalError: local variable 'dw' referenced before assignment
      
      Change-Id: Ic8d26b11f93255220888b5406f8ab4a6f81736c2
      Closes-Bug: #1819361
      3bb4c199
  40. Jan 24, 2019
    • binhong.hua's avatar
      add ulimit support for kolla_docker · 3d3f5f16
      binhong.hua authored
      By default, docker containers inherit ulimit from limits of docker
      deamon. On CentOS 7, docker daemon default NOFILE is 1048576.
      It can found in /usr/lib/systemd/system/docker.service.
      The big limit will cause many problem. we should control it in
      production environment.
      
      Change-Id: Iab962446a94ef092977728259d9818b86cfa7f68
      3d3f5f16
Loading