Skip to content
Snippets Groups Projects
  1. 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
  2. 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
  3. Aug 22, 2019
  4. 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
  5. Jun 07, 2019
  6. 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
  7. 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
  8. Dec 14, 2018
    • Mark Goddard's avatar
      Create cells before starting nova services · 365bb517
      Mark Goddard authored
      Nova services may reasonably expect cell databases to exist when they
      start. The current cell setup tasks in kolla run after the nova
      containers have started, meaning that cells may or may not exist in the
      database when they start, depending on timing. In particular, we are
      seeing issues in kolla CI currently with jobs timing out waiting for
      nova compute services to start. The following error is seen in the nova
      logs of these jobs, which may or may not be relevant:
      
      No cells are configured, unable to continue
      
      This change creates the cell0 and cell1 databases prior to starting nova
      services.
      
      In order to do this, we must create new containers in which to run the
      nova-manage commands, because the nova-api container may not yet exist.
      This required adding support to the kolla_docker module for specifying a
      command for the container to run that overrides the image's command.
      
      We also add the standard output and error to the module's result when a
      non-detached container is run. A secondary benefit of this is that the
      output of bootstrap containers is now displayed in the Ansible output if
      the bootstrapping command fails, which will help with debugging.
      
      Change-Id: I2c1e991064f9f588f398ccbabda94f69dc285e61
      Closes-Bug: #1808575
      365bb517
  9. Dec 05, 2018
    • Eduardo Gonzalez's avatar
      Allow set tty for containers · 846c15d8
      Eduardo Gonzalez authored
      This change adds support to comfigure tty,
      it was enabled by default but a recent patch
      removed it. Some services such as Karaf in opendaylight
      requires a TTY during startup.
      
      Closes-Bug: #1806662
      Change-Id: Ia4335523b727d0e45505cbb1efb40ccf04c27db7
      846c15d8
  10. Nov 03, 2018
  11. Sep 14, 2018
  12. Jul 25, 2018
  13. Jul 12, 2018
  14. Apr 06, 2018
    • wangwei's avatar
      Fix ipc_mode comparison in the latest docker · 193ce726
      wangwei authored
      In old docker, if you do not specify ipc_mode, the default value is empty,
      but in the latest docker, such as 17.09.0, if not specified, the default
      is "IpcMode": "shareable", which will cause all containers to be deleted
      and re-create when to redeploy or upgrade. This commit solves the
      problem.
      
      Change-Id: Ia8269b9c8066880e4aee23d6fdea8d9c04c41e44
      Closes-Bug: #1747586
      193ce726
  15. Jan 26, 2018
    • Eduardo Gonzalez's avatar
      Add container state check in kolla_docker · 448a10df
      Eduardo Gonzalez authored
      Missing container status check in recreate_or_restart_container,
      this causes if the container is not running (kolla-ansible stop),
      to not be started with deploy/reconfigure/upgrade if any other param
      changes.
      
      Change-Id: I5cff5f367e963ba8b1807ec46469da817e40e468
      Closes-Bug: #1714015
      448a10df
  16. Jul 28, 2017
  17. Jul 14, 2017
    • Bertrand Lallau's avatar
      Remove warning during kolla_docker execution · 2d424ffb
      Bertrand Lallau authored
      Ansible check if modules parameters are named like
      %password% and allow to hidden log param in this case.
      This requires adding "no_log" parameters.
      This patch just add "no_log" param in order to avoid
      this warning.
      
      Change-Id: I9c1df1093e0fd101090292d6e8bf3527f99aeb17
      Closes-Bug: #1702244
      2d424ffb
  18. Jul 10, 2017
  19. Jun 08, 2017
    • lingyongxu's avatar
      Remove unnecessary setUp function in testcase · 18449a22
      lingyongxu authored
      In testcase, setUp will be called automatically. This patch used to
      remove setUp functions that do nothing. Besides, it will keep code clean.
      
      Change-Id: I60e368dc066af30ce2e53bf7e4cc7bba69387cd8
      18449a22
  20. Apr 13, 2017
    • Duong Ha-Quang's avatar
      Add graceful_timeout argument to kolla_docker · d9293595
      Duong Ha-Quang authored
      Currently, when stoping/restarting container, Kolla uses default timeout value
      between SIGTERM and SIGKILL provided by docker which is 10 sec. But some
      services require more than it to finish graceful shutdown progress.
      
      This patchset adds graceful_timeout to kolla_docker to override the default
      one.
      
      Partial Implements: bp signaling-to-container
      
      Change-Id: Ica0b48a53c650cc23dfa1955027d2cf936a5932f
      d9293595
  21. Apr 06, 2017
    • Mohammed Naser's avatar
      Switch kolla_docker to rely on SHA256 for image changes · 27d675ea
      Mohammed Naser authored
      At the moment, the process to determine if an image has
      changed or not relies on the Docker API which depending
      on the Docker release server can return different results.
      
      This patch addresses this issue by grabbing the SHA256
      of the image before pulling (defaulting to None if it does
      not exist) and then comparing it after the pull is complete
      which should always be successful at determining if the
      image did change or not.
      
      The test for unknown status images is removed because this
      is not a possible scenario as we do not rely on status
      anymore except for failures (which are still tested).
      
      Change-Id: Ia60a7f34420b02f50597dddb96a4c36ff3996612
      Closes-Bug: #1668059
      Unverified
      27d675ea
  22. Feb 16, 2017
    • Abel Lopez's avatar
      Change python interpreter · 8b90fb6d
      Abel Lopez authored
      There is inconsistent use of either `/usr/bin/python` or
      `/usr/bin/env python`. This makes for unexpected results when a
      user might be using a virtualenv.
      
      Change-Id: Ibb030f920a8869f9113ade70b66a921cc815060d
      Unverified
      8b90fb6d
  23. Feb 03, 2017
    • Jeffrey Zhang's avatar
      Fix the pid_mode and ipc_mode value check for kolla_docker module · a3acd2c4
      Jeffrey Zhang authored
      bypass_checks is disabled by Ib2e19794bbe804470a880253d5870254041358c8 .
      But we use pid_mode: "{{ service.pid_mode | default('') }}" pattern in
      the yaml file. whereas pid_mode only support "host" value, this patch
      add '' as a choice of these two parameters.
      
      Change-Id: Ib83ed5e437ca868f0e42ce740ad1125d2fa48ff4
      a3acd2c4
  24. Feb 02, 2017
  25. Jan 23, 2017
  26. Jan 02, 2017
  27. Nov 25, 2016
  28. Nov 09, 2016
    • maniram477's avatar
      Corrects typo "requried" in kolla_docker.py · 6275f709
      maniram477 authored
      The parameter "required=True" is mistyped as "requried=True"
      in ansible/library/kolla_docker.py and tests/test_kolla_docker.py
      
      Closes bug: 1640423
      
      Change-Id: I64c333275b9eb3eff5b1c0fa5d550f478e68020d
      6275f709
  29. Sep 26, 2016
    • Sajauddin Mohammad's avatar
      Changed docker_restart_policy to unless-stopped · 3f134d0f
      Sajauddin Mohammad authored
      Current implementation has docker_restart_policy "always" and
      docker_restart_policy_retry:"10" which should be mutually exclusive.
      "unless-stopped" will restart the containers on any exit state
      but not start on daemon startup if container was put to stopped state before.
      Closes-Bug: #1621187
      
      Change-Id: I4d881cd123a55625121b7a9047385e9b54e2e129
      3f134d0f
  30. Aug 11, 2016
  31. Aug 02, 2016
  32. Aug 01, 2016
    • Jeffrey Zhang's avatar
      Fix the kolla_docker issue with docker 1.12 · ae34973d
      Jeffrey Zhang authored
      After docker 1.12, the RepoTags will be None rather than [] in the
      image list API. This PS will handle the both case.
      
      Change-Id: Ie2da44b44229c2f190550755b50876f607f9cc0c
      Closes-Bug: #1608358
      ae34973d
  33. Jul 14, 2016
  34. Jun 28, 2016
  35. Jun 27, 2016
  36. Jun 16, 2016
    • MD NADEEM's avatar
      Added unit test for start container · 0e459bb6
      MD NADEEM authored
      This patch check two senario
      first if  we choose to start a new container
      with name say XXX, however in the env a container
      already exist with XXX name and second to start a stopped container.
      
      Change-Id: Ibd6c5fbcc6f37ea2481634ac2e6b3edb91ae7aab
      Partially-Implements: blueprint ansible-unit-tests
      0e459bb6
  37. Jun 14, 2016
  38. Jun 12, 2016
    • MD NADEEM's avatar
      Added unit test for kolla_docker · 2634a94e
      MD NADEEM authored
      Added unit test for create container.
      
      Change-Id: If67025791e52581c8853da50623cc9547f4e9298
      Partially-Implements: blueprint ansible-unit-tests
      2634a94e
Loading