41 Commits

Author SHA1 Message Date
Jenkins
3b2fcf7674 Merge "Fix python3 compatibility in kolla_docker" 2017-01-05 10:07:44 +00:00
Jeffrey Zhang
d37da2cfa9 Optimize reconfigure action for glance
Partically-implements: blueprint better-reconfigure
Change-Id: I89e30e8b87f24a621c521d915842a4af0042d6fe
2017-01-02 10:58:43 +08:00
Paul Bourke
17ec0f62f4 Fix python3 compatibility in kolla_docker
When using stream=True with docker-py it returns byte arrays rather than
strings.

Change-Id: I8eb6707ba2b122cf779135173abafe874b7223d2
Closes-Bug: #1643740
2016-11-25 10:53:36 +00:00
maniram477
6275f7090b Corrects typo "requried" in kolla_docker.py
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
2016-11-09 15:18:22 +05:30
Sajauddin Mohammad
3f134d0f53 Changed docker_restart_policy to unless-stopped
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
2016-09-26 04:32:28 -04:00
Jenkins
0b7e853784 Merge "Fix the variable name mismatch" 2016-08-19 04:03:14 +00:00
Jenkins
55ddbad92a Merge "Modify some spelling mistakes" 2016-08-15 15:42:22 +00:00
Lu lei
9fd70b425f Modify some spelling mistakes
Fix a spelling error, and modify some words.

TrivialFix

Change-Id: Ieb55bd2679291ab61080b55feaaaf3c494939978
2016-08-04 10:05:55 +08:00
MD NADEEM
c91724bbda Fix the variable name mismatch
Change-Id: I354d7350671bf6a6d6fb432b074144b4e02cd154
Closes-Bug: #1608841
2016-08-02 14:04:14 +05:30
Jeffrey Zhang
ae34973d35 Fix the kolla_docker issue with docker 1.12
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
2016-08-01 13:41:05 +08:00
qinchunhua
1bddef94cb Python 3: dict.iteritems()
Replace dict.iteritems() with dict.items(). The Python 3 dict
type has no iteritems() method, the old iteritems() method was
renamed to items().

TrivialFix.

Change-Id: I2137e72554fd16d2c70e50306e4f57d27e35bcd3
2016-07-26 12:42:07 +00:00
MD NADEEM
f5b04c97eb Added unit test for image operation
Change-Id: I44a5ba649d73f4ca2d48065625c8d67445576944
Partially-Implements: blueprint ansible-unit-tests
2016-06-28 10:57:47 +00:00
MD NADEEM
3321049158 Fix container stop exeption
Change-Id: I1d59ed9089def808bab31d97ba4cba9e8592b568
Closes-Bug: #1595814
2016-06-27 03:03:43 +00:00
Jeffrey Zhang
476da0f43a Log the traceback in the kolla libraries
The traceback is logged also and will be helpful when the
library failed. We can get which line is failed from the log.

TrivialFix

Change-Id: Ia417232007e2f34c83d2e7cad6ed08dee49ce836
2016-05-31 01:40:55 +00:00
Jeffrey Zhang
3545e6d503 Fix the incompatibility for ansible 2.1.0
Ansible 2.1.0 has lots of change and the plugin is not compatible
between 2.0.0 and 2.1.0. This change fix the gap.

* fix the signature change for _make_tmp_path in ansible 2.1.0
* fix the common_options in the kolla_docker.py

Change-Id: I05f5f05581c8bd625cd868fa0db549d0c60a7043
Closes-Bug: #1586018
2016-05-30 23:02:09 +08:00
Jeffrey Zhang
491822c510 Bump the ansible to 2
DocImpact

Change-Id: I3cdfbf84919de80f535c030bd146787ecda40dec
partial-Implements: blueprint ansible2
2016-05-24 19:53:31 +08:00
Serguei Bezverkhi
a08a762f30 Adding ability to specify capabilities and security
This patch adds ability to specify required capabilities and security
mode for a specific docker container.

Change-Id: Ib8c15a8e354178bedd31ebb31a64618431f0e135
Closes-Bug: #1572648
2016-05-03 15:24:16 -04:00
Jeffrey Zhang
9575417b15 Fix the upgrade issue when image id is the same
When image id is the same, the container won't re-create with the
latest image tag.

Change-Id: I402ad275c388006248cb559851b01b0b963cf170
Closes-Bug: #1569723
2016-04-13 17:56:29 +08:00
Carlos Cesario
08b08c78b5 Identify container through PS1 shell variable
As suggested it was created the variable KOLLA_SERVICE_NAME to identify
the container service name through  PS1 shell variable.
This method it was previously discussed in IRC.
https://goo.gl/k7AdEg

The other option it was usage hostname param in kolla_docker, but
currently docker does not support it due this issue:
https://github.com/docker/compose/issues/2460

The final result is like this:

$ docker exec -it heka /bin/bash
(heka)[heka@kolla-control /]$

$ docker exec -it mariadb /bin/bash
(mariadb)[mysql@kolla-control /]$

More details can be accessed through this link
http://paste.openstack.org/show/493689/

Closes-Bug: #1557454
Change-Id: I6aab8d640a8ebb17baa9d6d4f1edd6e331674713
2016-04-11 17:50:04 -03:00
Jenkins
251b498c72 Merge "Fix the wrong refer self in kolla_docker.py" 2016-03-30 05:22:21 +00:00
Jeffrey Zhang
1fc0003aee Fix the wrong refer self in kolla_docker.py
Change-Id: Ia5bcfa7253fc5a471a089339c52883af05623068
Closes-Bug: #1562345
2016-03-27 00:37:52 +08:00
Nguyen Hung Phuong
328a7e8898 Fix typos in Kolla
TrivialFix

Change-Id: I21f51811ec4256d9b6b2e219de6201e4811dfc5a
2016-03-26 08:06:49 +00:00
Serguei Bezverkhi
f97fecd736 Set --ipc option to "host" for kolla_docker
This change will enable to lvm commands running in a container
communicate with udev process running on a host.

Partially-Implements: blueprint iscsi-lvm2-docker

Change-Id: If780710bb81adaee44ce0d291e22ce91ec6436aa
2016-03-16 12:30:52 -04:00
Rodolfo Alonso
241506a48d Add empty string to KOLLA_BOOTSTRAP env variable.
A change in docker-py made this fix needed, to allow to create
env variables with empty values.

Change-Id: Ife6dfc242b600fe386c02dd23d6a142b25c86567
Closes-Bug: #1554126
2016-03-09 13:58:38 +00:00
Steven Dake
1c26351925 Upgrade fails from 2.0.0->2.0.1
The new image doesn't have an existing old image, so it
ends up not existing.  In this condition, we know that
we are dealing with a version change upgrade.

TrivialFix

Change-Id: Ic2f83c2bb6c34731b60b3430ba66a6324439f0a9
2016-03-07 12:22:18 -05:00
Jeffrey Zhang
b694408abc Add kolla_docker action for reconfigure
add three actions used for reconfigure

* restart_container
* get_container_env
* get_container_state

Partially-implements: bp kolla-reconfig

Change-Id: I63609ce47f044926ff276ab1188b10f44270a0b5
2016-03-02 01:35:55 +08:00
Michal Jastrzebski
ce4230fab1 Playbook for nova upgrade
This creates tree and playbook for nova upgrade. Also other service
upgrades will follow standard setup here.

Change-Id: Ic31759efaee4986eb87b9ff0968f13189d130d48
Partially-Implements: blueprint upgrade-kolla
Implements: blueprint upgrade-nova
2016-02-19 13:58:18 -06:00
Éric Lemoine
085f54a4ca Fix kolla_docker check_volume
This commit fixes a bug in kolla_checker.py where the check_volume
function will raise "TypeError NoneType object is not iterable" if
there are no existing volumes.

TrivialFix

Change-Id: Ic57c339793fa532ed8db075ba1074db75106e36d
2016-02-17 12:11:34 +01:00
Jenkins
728b62cd50 Merge "Rework log output if pull fails" 2016-02-01 10:41:02 +00:00
SamYaple
55c3e0252e Add labels to docker module
With the switch to named volumes we run into a few situations where
we cannot bootstrap volumes like we used to. This labels param will
fix that as the next patchset shows.

Change-Id: Ia93166dd204c5c0d1a0eb9ffeb6d0aba486e269a
Partially-Implements: blueprint docker-named-volumes
2016-01-28 20:26:41 +00:00
SamYaple
4649279c9d Rework log output if pull fails
Co-Authored-By: Sam Yaple <sam@yaple.net>
Change-Id: I066b2d419abb3ef2d4827ce686865c0dc68a5e97
Closes-bug: #1537763
2016-01-28 03:06:05 +00:00
Jenkins
eb131a7db2 Merge "Remove unused params for kolla_docker" 2016-01-04 13:37:50 +00:00
Jenkins
d80f638b09 Merge "Update kolla_docker documentation" 2016-01-04 13:26:34 +00:00
Jenkins
e355132bfc Merge "Fix the docker may return a empty dict when pull images" 2016-01-04 12:30:44 +00:00
Jeffrey Zhang
7fe22629ab Fix the docker may return a empty dict when pull images
Closes-Bug: #1530649
Change-Id: I74191c711d1e5c27d33011be4d5528fe08c14273
2016-01-04 19:04:48 +08:00
SamYaple
9e2e5f914f Update kolla_docker documentation
Change-Id: Ic236371cdf545a09e8a3c9e41abd7eb82a3d8bb3
Partially-Implements: blueprint kolla-docker-module
2016-01-04 10:57:54 +00:00
Jenkins
083a21db4d Merge "Support v1 and v2 registry - kolla_docker" 2016-01-04 07:13:31 +00:00
SamYaple
bef9c081b5 Do not require 'name' when pulling image
Change-Id: Iabb08fee7ce0d1b6e5364075bcd5e12255ee83b7
Partially-Implements: blueprint kolla-docker-module
2016-01-03 16:49:59 +00:00
SamYaple
b32df7300c Support v1 and v2 registry - kolla_docker
Change-Id: I452c9c507c51b68f7515b9295b05e98a39554531
Partially-Implements: blueprint kolla-docker-module
2016-01-03 16:48:52 +00:00
SamYaple
f1821ae63a Remove unused params for kolla_docker
Update the group_vars and globals docuementation as well.

Change-Id: I3ffd49b8d99667425596a2753845767a62e05bf1
Partially-Implements: blueprint kolla-docker-module
2016-01-03 16:48:30 +00:00
Sam Yaple
412a53dde1 Add docker module in Kolla
The upstream docker module in control of Ansible has proven to be a
major breaking point for Kolla. It is the reason we have a cap on
Docker of 1.8.2. They have stated no support for the Docker registry
v1 moving forward. We have to wait for a patch to land and then
upgrade to the latest Ansible version to take advantage of a new
Docker feature. Doing that is slow and it is not always possible to
upgrade if there are other breaking changes (aka ansible 2.0).

For these reasons we can build our own Docker module.

Partially-Implements: blueprint kolla-docker-module

Change-Id: I2ca57010c45710635cfe80ff23a2a5e2edabee57
2015-12-29 08:40:58 +00:00