170 Commits

Author SHA1 Message Date
Eduardo Gonzalez
448a10df6c Add container state check in kolla_docker
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
2018-01-26 07:30:11 +00:00
Zuul
39d9327d29 Merge "Fixes ceph deploy gates" 2018-01-25 14:46:34 +00:00
Eduardo Gonzalez
e0d37de9d0 Fixes ceph deploy gates
- Ceph images are not being built when using depends-on a kolla build
  job.
- Sync inventory files with current ones which causes ceph to fail due
  missing groups.
- Small corrections in ceph config.yml syntax.
- fix preparse the disk only once
- enable ceph nfs only when enable_ceph_nfs is true

Co-Authored-By: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Change-Id: Id0c7963bf59e2af4944834dcd16589a638e78ba5
2018-01-24 15:10:01 +08:00
Zuul
c086b2c4ec Merge "Use a random keepalived router id in CI environment" 2018-01-23 14:43:53 +00:00
Jeffrey Zhang
bf4a3c9f6c Use a random keepalived router id in CI environment
Use the same router will result in conflict in the CI environment.

Change-Id: Id1ba69ebbf67b4cead855adbe440343c05ea3d1e
Closes-Bug: #1744913
2018-01-23 12:58:26 +00:00
Zuul
5d4270d282 Merge "Remove the duplicated task for tests/post.yml" 2018-01-17 07:51:29 +00:00
caoyuan
c38ab37766 Remove the unnecessary gather facts
By default, the ansible task will gather facts, it can be configured by
set "father_facts: true", it's unncessary to run setup in tasks, it will
waste much time when hosts is large.

Change-Id: I9462a538c76b6271a34531d8752b72cc695f693e
Closes-Bug: #1743485
2018-01-16 10:25:30 +08:00
caoyuan
18bb9d1a4d Remove the duplicated task for tests/post.yml
Change-Id: Ifdf2ede2cb5f057d1d1f02bfa00ee05872e94b9f
2018-01-15 23:54:50 +08:00
Michal (inc0) Jastrzebski
8bd6dd9be5 Fix kolla gates
multinode gate change introduced bug that breaks kolla deploy gates.
This is fix.

Change-Id: Ibc5fe3adb3555e177d3a6a64250cbc9bf50430d1
2018-01-03 15:06:34 -08:00
Michal (inc0) Jastrzebski
478e2cf9c9 Enable multinode scenarios in zuulv3
Another step to migrate to new CI

Change-Id: Id9bf9b4b1114f5be66f6c028a0db16d869efeceb
Depends-On: Iaacdca31b27b7033ec08499bcea7061b9d3ec279
2017-12-27 09:21:35 -08:00
Jeffrey Zhang
11f9afba1b Pull image from dockerhub rather than tarballs.o.o site
Change-Id: Id71c1ecda9f8647a0eb290fe02a12afb3df09988
2017-11-16 15:44:24 +08:00
Jeffrey Zhang
cdd125117f Optimize zuul v3 jobs
- move check container failure from post.yml to run.yml
- add binary related jobs
- use static kolla-ansible src dir, which is helpful for kolla project
  to use.
- generate correct /etc/hosts by using private ip address and hostname
- fix the wrong api interface in global.yml file

Change-Id: Idfdee6dfe18f0fa2d4f984df59b57553122ce298
2017-10-26 09:58:29 +08:00
Jeffrey Zhang
baa9319a75 Move to zuul v3 in project jobs
Partial-Bug: #1720601
Change-Id: Ibc20a6ae8c645ff82f3c14a6286073dffd4cfae2
2017-10-18 12:31:52 -07:00
Eduardo Gonzalez
fee1538c38 Retrieve fluentd logs in gates
Fluentd send logs to stdout,
this changes creates a file with fluentd logs
output to easy discover missing patterns during fluentd
changes.

Change-Id: I131f95089eac60ccb4c48cf5071c3b44c5ea42ca
2017-09-12 23:03:25 +02:00
Eduardo Gonzalez
c27338bf2f Retrieve ceph logs in gate
Check status of ceph cluster

Change-Id: I4919a32794cc75bd3e8f411a219f778238a334ee
2017-08-29 15:54:26 +00:00
Michal (inc0) Jastrzebski
6119585ae4 Fixing ceph gates
Ceph gates notoriously run out of memory

Change-Id: I5cf5cc5adf5379095ed9e3094494e65b76ff62d8
2017-08-16 12:16:08 -07:00
Jenkins
7e6fb5e308 Merge "Remove unnecessary setUp function in testcase" 2017-08-02 14:59:59 +00:00
Jeffrey Zhang
7f2ade5b5a Stop and start container rather than use restart directly
Docker has an issue[0] when restart container. But stop then start
works.

[0] https://github.com/moby/moby/issues/29704

Change-Id: If0a9c0c257cd72209be8e138a1f0b8871500e089
Closes-Bug: #1707097
2017-07-28 17:26:27 +08:00
Jenkins
71133abce7 Merge "Fix logging collection in gates" 2017-07-27 03:23:02 +00:00
Eduardo Gonzalez
52f73f4061 Fix logging collection in gates
Log retrieval was out of sync since repo split
and from multinode gates.

Many useful information retrieved before like
ps, df, docker info, etc is not in kolla-ansible
gates.

Also, his change fix logs visualization to have
colored view, allowing to easily identify errors.

Change-Id: I948233e26ceb6efc58b962bcb4b710b3f006232b
2017-07-24 14:32:09 +00:00
Jenkins
cd20a68635 Merge "Remove warning during kolla_docker execution" 2017-07-24 10:42:00 +00:00
Bertrand Lallau
2d424ffb14 Remove warning during kolla_docker execution
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
2017-07-14 18:43:45 +02:00
Hongbin Lu
3daeea37ea Upgrade from docker-py to docker
The pypi package 'docker-py' [1] has been renamed to 'docker' [2].
It is better to move to the new 'docker' package because the old
package will be deprecated and all the new features will go into
the new package only.

Package 'docker' has been added to requirements [3]. The old
package 'docker-py' is still allowed to be in the global requirements
during the transition period but it should be removed after all or
most of the projects finsih the migration.

[1] https://pypi.python.org/pypi/docker-py
[2] https://pypi.python.org/pypi/docker
[3] https://review.openstack.org/#/c/423715/

Change-Id: Ibcd5a57a1fbf55dcc5a690e41f20917f95b63da0
2017-07-10 14:19:28 +00:00
Michal (inc0) Jastrzebski
339b27c7fe Enable multi-scenario gates
First non-trivial scenario we'll be testing in gates will be cinder +
ceph. This patchset is supposed to create framework to easily add new
testing scenarios.

Change-Id: I6790eaf5cf3297af04a64e4169a39b6e2cd1890f
2017-06-19 10:14:33 -07:00
Jeffrey Zhang
50803ee803 Revert "Enable port_security in gate to fix the neutron broken"
This reverts commit 94a882babe7210cdec0029f4796f2e1b83df116b.

Upstream has fix this issue by Ice89ad9dd486ad5fcac534ef5f7d8aae3b6b0f97

Change-Id: Ib17f93e4030c6f7da4e32ee84fcc5f7139e57895
Closes-Bug: #1694420
2017-06-15 09:25:48 +08:00
lingyongxu
18449a2231 Remove unnecessary setUp function in testcase
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
2017-06-08 11:32:10 +08:00
Michal (inc0) Jastrzebski
f5354f55b1 Enable multinode gate
This patches changes deploy_gate quite a bit so in reality all
deployments will now assume multinode (even if it's single node). After
that we will refactor it even further to enable easy addition of new
scenerios.

Change-Id: I1faada46e6a7aa026128b2f01d77eabb04759439
2017-06-05 11:35:20 -07:00
Jenkins
a8433495dd Merge "Add graceful_timeout argument to kolla_docker" 2017-05-10 08:40:36 +00:00
Jenkins
789f680a4e Merge "Remove un-used Keystone test path" 2017-05-03 15:10:15 +00:00
Duong Ha-Quang
d929359550 Add graceful_timeout argument to kolla_docker
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
2017-04-13 16:53:14 +07:00
Mohammed Naser
77bed6f5ab
Remove un-used Keystone test path
This patch removes very old and unused Keystone test path, we do
this indirectly by our simple sanity tests (and hopefully) by using
Tempest.

Change-Id: I55916d08942df97990515c76914b799d1f327565
2017-04-06 16:38:59 -04:00
Mohammed Naser
27d675ea13
Switch kolla_docker to rely on SHA256 for image changes
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
2017-04-06 16:34:01 -04:00
Abel Lopez
8b90fb6d47
Change python interpreter
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
2017-02-16 13:39:36 -08:00
Jenkins
5b8d692ded Merge "Close file-like object after used" 2017-02-13 16:23:17 +00:00
Jenkins
6c33871071 Merge "Create a new container when restart a container when necessary" 2017-02-04 06:09:11 +00:00
Jeffrey Zhang
a3acd2c439 Fix the pid_mode and ipc_mode value check for kolla_docker module
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
2017-02-03 15:56:10 +08:00
Jeffrey Zhang
869abbbed4 Create a new container when restart a container when necessary
Recreate and start a new container when container parameter is changed
in COPY_ALWAYS strategy.

Change-Id: I1e45c0dc34a93a18b664109823d6fd5b88c331a2
Closes-Bug: #1659799
2017-02-02 17:08:38 +08:00
zhuzeyu
42e7b747e4 Use required_if in kolla_docker.py
Replace the original code with required_if when Ansible 2.0 lands

Change-Id: Ib2e19794bbe804470a880253d5870254041358c8
2017-01-23 12:07:13 +08:00
Cuong Nguyen
d225a19af4 Close file-like object after used
Change-Id: I7df581243deef7bda4b9b5926addf61421bd42f7
2017-01-19 16:41:35 +07:00
Jenkins
3b2fcf7674 Merge "Fix python3 compatibility in kolla_docker" 2017-01-05 10:07:44 +00:00
Jenkins
7798da713e Merge "Optimize reconfigure action for glance" 2017-01-04 21:31:03 +00:00
Jeffrey Zhang
910a50d888 Support multi key in merge_config module
Change-Id: Ibf9ee55c48a5181c5ba3aa46bef485cd3468f14c
Closes-Bug: #1647065
2017-01-04 17:06:02 +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
Jeffrey Zhang
92ff63f3e0 clean up kolla related files
* rename package name from kolla to kolla-ansible
* remove docker for data_files
* remove kolla docker
* remove kolla-build console_scripts

Change-Id: I53abbf79dffb54eb785a39ba04d375bc4e4f27b0
2016-11-30 11:17:35 +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
Mauricio Lima
5b9206f449 Remove fragments of docker files
Change-Id: I0ecb9004941aca9a9520ba8e91b9f1bffaa66b61
2016-11-23 09:11:35 -03:00
Jenkins
0081e3868f Merge "Corrects typo "requried" in kolla_docker.py" 2016-11-10 06:21:51 +00:00
zhubingbing
fabb22d505 add panko dockerfile
Change-Id: Ibf74db39348dfb6f56f4fca0aff142a75ef53d38
Partially-Implements: blueprint add-panko
2016-11-09 05:15:27 -05: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
caowei
51663a7c31 Add freezer container
Change-Id: I9f95bac3f74827f0918f174fc0113736b92cbc0c
Partially-implements: bp freezer-container
2016-11-06 11:11:51 +08:00