748 Commits

Author SHA1 Message Date
Mark Goddard
692d176cd5 Fix kolla_ansible python module check
The kolla-ansible script now (Train+) checks whether the kolla_ansible
python module is installed, and emits the following message if not:

ERROR: kolla_ansible has to be available in the PYTHONPATH (e.g.
installed)

It is supposed to exit 1 if this check fails, but does not.

This change fixes this by removing a subshell from the kolla-ansible
script.

Change-Id: I2c1a7398f2b8f876abcf2508874835154cb4ce57
Closes-Bug: #1854049
2019-11-26 17:50:15 +00:00
Zuul
119523fd5b Merge "CI/Debian: Push images after building" 2019-11-25 17:09:30 +00:00
Radosław Piliszek
6ab144aae4 CI/Debian: Push images after building
This fixes Debian job failures during image building.

See https://github.com/docker/for-linux/issues/711
for upstream details.

Change-Id: Icf3ffb261605ffe5d8f2618c2ed4cb97db97dd49
2019-11-24 15:36:48 +00:00
Zuul
25e98f9047 Merge "Change local_action to delegate_to: localhost" 2019-11-22 18:35:54 +00:00
Michal Nasiadka
1009931162 Change local_action to delegate_to: localhost
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
2019-11-22 15:04:44 +00:00
Zuul
7856e72ba8 Merge "CI: Add more service list checks to OS "smoke testing"" 2019-11-21 10:56:56 +00:00
Radosław Piliszek
f59f6a6104 CI: Add more service list checks to OS "smoke testing"
Change-Id: Ie7ee70e19536c2d8f4300df55c9c6ca38abb7ae4
2019-11-15 13:36:40 +01:00
Zuul
2fb08fa4e1 Merge "CI: Add mariadb test" 2019-11-15 12:17:13 +00:00
Mark Goddard
ed996ef90d CI: Add mariadb test
Tests the following operations for MariaDB:

* Stop
* Recovery

Backup and restore will be added in a separate change.

Depends-On: https://review.opendev.org/693329
Change-Id: I836d91554715cce0e82c1bbebb7430c457418b2d
2019-11-07 18:03:07 +00:00
Mark Goddard
43bb5ae6fb CI: Remove playbook-setup-nodes.yml
This playbook is neither kolla-ansible nor Zuul. Much of what it does is
stale and no longer required. Remove it.

Change-Id: I6fed9d8f2439a53c6ac35c670b56b43579236ee9
2019-11-07 13:30:14 +00:00
Radosław Piliszek
af7305f2aa Fail kolla-ansible early when not available in the PYTHONPATH
Starting with the Train release, kolla_ansible (the package) must be
available in the PYTHONPATH to run most playbooks.
It is documented.
This change makes the error message friendlier.

Change-Id: Icf0399d21b3fde8d530d73e6e7ee4a57665da276
Closes-bug: #1849943
2019-10-26 15:09:15 +02:00
Radosław Piliszek
bc053c09c1 Implement IPv6 support in the control plane
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: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-10-16 10:24:35 +02:00
Marcin Juszkiewicz
b9d6cc2a7f Add Debian/source CI job
Change-Id: I0628b16e3ebdb3fa8196acdc1bd9c63e75bcfb09
2019-10-04 08:57:55 +00:00
Kris Lindgren
2fe0d98ebb Add a job that *only* deploys updated containers
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
2019-09-26 17:51:14 +01:00
Mark Goddard
8c8adb0e45 Update minimum version of Ansible to 2.6
This is required for the dict2items filter.

Change-Id: I60a04e839bf06506ff36c2631a286130d5fde972
2019-09-11 17:09:32 +01:00
Kien Nguyen
fbac54c5f5 Testing Masakari role in gate
Add Masakari testing into the Gate.

Change-Id: I52df33f963e7d2ae4059887df3d24d9e6642134e
Depends-On: https://review.opendev.org/#/c/615469/
Depends-On: https://review.opendev.org/#/c/615715
Implements: blueprint ansible-masakari
Co-Authored-By: Gaëtan Trellu <gaetan.trellu@incloudus.com>
2019-08-14 12:32:51 -04:00
Radosław Piliszek
8a543098d6 CI: clean up requirements installation
We install kolla-ansible requirements in Zuul's Ansible playbooks.
This patch cleans up the installation in scripts so that they are
only concerned with auxiliary requirements:
- ansible (since we do not track it in requirements)
- ara (for log summaries)
- openstack clients (for first init and tests after deployment)

Additionally this patch installs openstack clients in a separate
virtualenv.
Note that all kolla-ansible requirements, ansible and ara are still
installed system-wide.

Change-Id: Iac04082ad39a9d823c515ba11c5db9af50ed225f
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-07-16 20:43:22 +02:00
Zuul
c2244260c6 Merge "Test minimum supported and latest versions of Ansible" 2019-07-15 09:54:39 +00:00
Zuul
103e0e43e7 Merge "init-runonce: make public1 network optional" 2019-07-11 09:30:53 +00:00
Mark Goddard
3026fd9129 init-runonce: make public1 network optional
Skip creation by setting ENABLE_EXT_NET to 0.

Since adding errexit we are failing in kayobe CI, since we have a
conflicting flat network on physnet1.

Change-Id: I88429f30eb81a286f4b8104d5e7a176eefaad667
2019-07-10 17:48:28 +01:00
Mark Goddard
b9da05be55 Test minimum supported and latest versions of Ansible
We have a minimum supported version of Ansible, currently 2.5. We should
test this in addition to the latest version. This change tests latest on
Ubuntu, and minimum on other distros.

Change-Id: I45a7173139f057177a71e919ad3e718a99d9f87b
2019-07-09 08:04:26 +00:00
Zuul
887938bbcb Merge "Exit on failure in init-runonce" 2019-07-09 07:33:46 +00:00
Zuul
ec78645928 Merge "Bump minimum Ansible version to 2.5" 2019-07-08 09:21:53 +00:00
Zuul
fb964ce41b Merge "CI - remove unused setup scripts" 2019-07-05 15:42:42 +00:00
Zuul
dfa1a3844d Merge "Add upgrade-bifrost command" 2019-07-05 09:17:16 +00:00
Zuul
56c3603586 Merge "CI: Keep stderr in ansible logs" 2019-07-04 07:45:54 +00:00
Radosław Piliszek
b9aa8b38f4 CI: Keep stderr in ansible logs
Otherwise ara had only the stderr part and logs only the
stdout part which made ordered analysis harder.

Additionally add -vvv for the bootstrap-servers run.

Change-Id: Ia42ac9b90a17245e9df277c40bda24308ebcd11d
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-07-02 20:44:33 +02:00
Mark Goddard
9cac1137d0 Add upgrade-bifrost command
This performs the same as a deploy-bifrost, but first stops the
bifrost services and container if they are running.

This can help where a docker stop may lead to an ungraceful shutdown,
possibly due to running multiple services in one container.

Change-Id: I131ab3c0e850a1d7f5c814ab65385e3a03dfcc74
Implements: blueprint bifrost-upgrade
Closes-Bug: #1834332
2019-07-02 14:30:14 +01:00
Radosław Piliszek
20ab480ca5 CI: Use template-overrides.j2 from kolla
Some kolla-ansible jobs failed due to using external mirrors
instead of local ones.
This was due to not using the template override provided by kolla.
This patch fixes that.

Depends-On: https://review.opendev.org/668226
Change-Id: I27f714fdf05e521aa8ce25c5683a452ceb35eeb8
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-07-01 17:00:53 +00:00
Mark Goddard
0a769dc30b Bump minimum Ansible version to 2.5
This is necessary for some Ansible tests which were renamed in 2.5 -
including 'version' and 'successful'.

Change-Id: Iacf88ef5589c7571fcf56ba8b99d3dbe76975195
2019-07-01 09:38:01 +01:00
Mark Goddard
bc08b44fd1 Exit on failure in init-runonce
Previously we sourced this script in tests/deploy.sh, but this was
recently changed. Following that change we lost the errexit setting,
meaning we ignore errors in init-runonce.

Adding errexit in the script itself means that all callers get error
handling.

Also log init-runonce output.

TrivialFix

Change-Id: I9b35bd5f0f76eec26ddd968d093a3a5fd55a7ce2
2019-06-28 14:31:24 +00:00
Radosław Piliszek
480e575000 CI - remove unused setup scripts
This patch removes old, unused setup scripts.
They belong to kolla anyway.

Change-Id: Ia8dcd39991177153af61c638c7ae05123da08e82
Signed-off-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2019-06-21 15:10:34 +00:00
Mark Goddard
845040ad3f Add CI job for ironic
Adds four new CI jobs for testing centos/ubuntu binary/source deploys
with ironic enabled. These are run only when there are changes to the
ironic role.

Performs some simple testing by creating a node using the fake-hardware
hardware type and creating a server.

Change-Id: Ie669e57ce2af53257b4ca05f45193cb73f48827a
Depends-On: https://review.opendev.org/664011
2019-06-11 10:22:04 +01:00
Mark Goddard
e474c6ca19 Check for 'become' in tasks that use Docker in pep8
We should use become: true for all tasks that use Docker.

Change-Id: I5ce06cc6f2c7403a1c36aadf9e55068c780f05ac
2019-06-06 19:05:01 +01:00
Mark Goddard
b123bf6621 Use become for all docker tasks
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
2019-06-06 19:04:58 +01:00
Marcin Juszkiewicz
df5a5b6578 runonce: do not set hw_firmware_type=uefi
We made it default in Queens.

Change-Id: I52de6e041bbc4c316d332cbedeca924a7f3c7346
2019-06-04 08:56:57 +02:00
Mark Goddard
78ee0287a7 Test Ceph upgrade in CI
Add CI jobs for testing an upgrade of a multinode system with Ceph
enabled. As for the existing upgrade job, we upgrade from the previous
release to the current release.

Change-Id: I931772ca4c63757769467a57c80dc0726a11167a
Depends-On: https://review.opendev.org/658163
2019-06-03 08:24:32 +00:00
David Moreau Simard
86e9b0831c
Pin ARA to <1.0.0 and use stable setup interface to find callback plugin
ARA 1.0 will be released in the near future and isn't backwards
compatible. Pin it so it doesn't break things unexpectedly.

ARA ships simple setup modules to help figure out the paths
to where things are located.
These are backwards compatible from ARA 1.0 to 0.x.

Change-Id: I3fe3f4082279c2fd9a629605619a97aa5f5b0b73
2019-05-24 10:55:32 -04:00
Raimund Hook
fe71a5c059 fixed spelling of 'Bootstrapping' in tools/kolla-ansible
'Bootstrapping' was spelt with one p - added the second p so the
word becomes a verb nicely.

TrivialFix

Change-Id: I126a5c253408af70d6d0a3be6e59270f385a00e3
2019-04-26 11:48:57 +01:00
Mark Goddard
c23c9b2c25 Test upgrades in CI
This patch adds two new jobs:

* kolla-ansible-centos-source-upgrade
* kolla-ansible-ubuntu-source-upgrade

These jobs first deploy a control plane using the previous release of
Kolla Ansible, then upgrade to the current release.

Because we can't change the branch of the git repository on the Zuul
executor, we change the branch of the kolla-ansible repository on the
primary node to the branch of the previous release, in this case
stable/rocky. A new remote-template role has been added that supports
generating templates using a remote template source, to generate config
files using the previous kolla-ansible branch.

If the change being tested depends on a kolla change for the current
branch, then we build images. Rather than using the current
kolla-ansible version to tag the images, we now tag them with
change_<gerrit change ID>. This is because the version of kolla-ansible
will change from the previous release to the current one as we upgrade
the system.

Finally, it should be noted that the 'previous_release' variable in the
Zuul config needs to be updated with each release, since this sets the
release of kolla-ansible that is installed initially.

Depends-On: https://review.openstack.org/645089/
Depends-On: https://review.openstack.org/644250/
Depends-On: https://review.openstack.org/645816/
Depends-On: https://review.openstack.org/645840/
Change-Id: If301e0affcd55360fefe3b105f023ae5c47b0853
2019-03-27 16:13:49 +00:00
Zuul
4ad5122d3f Merge "Add cinder-lvm CI job" 2019-03-18 10:54:05 +00:00
Eduardo Gonzalez
2fc6d4cfc5 Split placement from nova
Depends-On: https://review.openstack.org/#/c/642958
Depends-On: https://review.openstack.org/642984
Change-Id: If795a9eb3ec92f75867ce3f755d6b832eba31af9
2019-03-15 15:19:54 +00:00
Mark Goddard
c41c9a0ce0 Add cinder-lvm CI job
Tests Cinder with an LVM/iSCSI backend, including attaching a volume to
an instance.

Change-Id: I6963b5e81d7ac88dd1bdfb94b62d9d63028b9786
2019-03-01 14:36:30 +00:00
Christian Berendt
3a5ef38f3b Add elasticsearch_datadir_volume
Change-Id: Id8276448c6e779b2b4a0aafee45d953c4f009fc1
2019-02-25 19:30:33 +01:00
binhong.hua
93e5e8e631 Link kolla_log volume dir to /var/log/kolla
The path /var/lib/docker/volumes/kolla_logs/_data/ is too long
shorter log path will help to debug from log.
The volume path is compatible with docker-engine and docker-ce.

Change-Id: I9195d5f24d938f5060fe748aac3ae58c79ec5abf
2019-01-24 11:02:48 +08:00
Mark Goddard
65aa706a44 Use kolla-ansible version to tag images
If building images, kolla currently uses its own version for their tag
by default.  This might not match the version of kolla-ansible, which is
what is used by default in kolla-ansible. This leads to the image not
being found.

This change uses kolla-ansible's version to tag locally built images.

Change-Id: I49c7afb9167d1e3f8a4470b6ebbb6ad6798d4996
2019-01-09 18:13:27 +00:00
ZijianGuo
6d876934ea Add customizable gnocchi volume
Change-Id: I8d21546847a2f5fa418e07cfe79016a349af4783
Signed-off-by: ZijianGuo <guozijn@gmail.com>
2019-01-02 11:49:41 +08:00
Eduardo Gonzalez
535aba79a9 Add NFV orchestration services CI job
Change-Id: I33484d0961f1cd17ed05dd124eba68d99b4db83f
2018-12-21 11:43:22 +01:00
Eduardo Gonzalez
362b6ee40e Test zun container creation in gates
Change-Id: If5b4ba975a65e07d2704eb6bdb9d841d6a9c3d42
2018-12-19 19:50:59 +01:00
wu.chunyang
4deefe3e92 remove unused library
trivial modify

Change-Id: I27d5b85d2c745fee5ff0643e7771b46faebd23a6
2018-12-12 10:30:20 +00:00