503 Commits

Author SHA1 Message Date
Sagi Shnaidman
c9b0abd96d Fix typo that prevents to run tests locally
Change-Id: Ia9e23daafc14dbba47ac1f4233a80c28c8d76a5e
2019-12-12 14:30:22 +02:00
Zuul
b91ec6ba1f Merge "Fix pip install for run-local-test" 2019-12-11 15:31:12 +00:00
Zuul
6ae16066c6 Merge "Fix zuul facts for run-local-test" 2019-12-11 15:31:12 +00:00
Oliver Walsh
a691762a80 Fix pip install for run-local-test
This currently fails with:
ERROR: Double requirement given:
mock (from -r molecule-requirements.txt (line 10))
(already in mock>=2.0.0 (from -r test-requirements.txt (line 3)), name='mock')

The tox linters job uses the same pip requirements files but doesn't hit this
because it also passes the openstack upper constraints files, so do the same in
run-local-test.

Change-Id: I12602801147b99a4c17a02cfd43239897ee049f3
2019-12-11 11:07:59 +00:00
Zuul
71a725ee8e Merge "Copy all_nodes.json instead of rendering template" 2019-12-10 23:15:39 +00:00
Zuul
f43003371a Merge "Move localhost_address to net_ip_map hieradata" 2019-12-10 23:15:38 +00:00
Oliver Walsh
cf7239e590 Fix zuul facts for run-local-test
The run-local playbook currently fails because the facts for local runs were
not updated when the expected zuul facts changed in
I09f7b29eb37d5c728d97dd4f27b4465fa0fb26f2

Change-Id: Id4f61161862ab05cf8f049cff919bf2b2c5270ba
2019-12-10 21:16:58 +00:00
Sagi Shnaidman
3f719c665f Use openstacksdk in test-deps
Change-Id: I4d4c2d9eeedb161d71b255179e914971d38e83a2
2019-12-10 03:52:17 +00:00
Kevin Carter
06df5f3c34
include the openstacksdk so that openstack modules work within molecule
Change-Id: Id8aeb925b7a305bf70ab556edd6f8891eae145a2
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-12-09 12:43:16 -06:00
James Slagle
f0cbd236a4 Copy all_nodes.json instead of rendering template
Rendering all_nodes.json on each node is proving to be a performance
bottleneck. Given that it is the same data on each node and it has
already been rendered as group_vars/overcloud.json on the control node
(undercloud), it can just be copied to each node.

Change-Id: Ic10858ce7eaa5353d546e75b26e7149df2e1aa2a
2019-12-08 15:17:06 +00:00
James Slagle
5c06ffdcd5 Move localhost_address to net_ip_map hieradata
all_nodes is meant to be for hieradata that is the same across all
nodes, while localhost_address could possibly be node specific. This
change moves it from all_nodes to net_ip_map.

This will allow rendering the all_nodes template once and then just
copying it into place, which will be a significant performance
improvement.

Change-Id: Ie3b5f242bc2afce9d395e29db498b3516f8bcc3c
2019-12-08 15:16:54 +00:00
Alex Schultz
08c965dcaa Don't include tuned tasks when checkmode
We don't get a tuned_check when in check mode so we should just skip the
config include.

Change-Id: Ic9d364d0f440b9308d57c2ebf07fbc12f6403c66
Closes-Bug: #1855502
2019-12-06 15:35:24 -07:00
Zuul
e880fa6e11 Merge "Networks may be none" 2019-12-06 22:03:08 +00:00
Emilien Macchi
b9b23c5600 tripleo-config: use become by default
The config files can be written in /etc (most of the times), so we need
sudo to write the files without permission error.

Change-Id: I68911dcec1d92def25e3b48fb1319564eda292f0
2019-12-06 12:33:36 +00:00
Zuul
bdce578920 Merge "OpenStack Node Provide playbook" 2019-12-06 00:12:07 +00:00
Zuul
55361aa053 Merge "Improve idempotency for podman containers module" 2019-12-06 00:12:06 +00:00
Alex Schultz
f5c93fa2f1 Networks may be none
If the network vars are defined but not lists, the filters and loops
fail in ansible. We need to check that vars exist and that they aren't
none prior to using them.

Change-Id: I648caf97b532c65a0b1e12e8b27be9997a69780d
Closes-Bug: #1855149
2019-12-05 14:53:43 -07:00
Zuul
f16f223d01 Merge "tripleo-hieradata: re-enable "service_names"" 2019-12-05 17:40:43 +00:00
Zuul
65eaeea9f7 Merge "Fix case in filters when Labels is None" 2019-12-05 03:31:42 +00:00
Zuul
e857680277 Merge "Optionally add ctlplane vips" 2019-12-05 00:24:15 +00:00
Emilien Macchi
114c3c97f4 tripleo-hieradata: re-enable "service_names"
"service_names" was a useful hieradata which listed the services enabled
for a specific roles vs "enabled_services" which are for all the
services enabled in the cloud, no matter the role.

This is re-added for backward compatibility.

Change-Id: I75b1112089a66cf5db0a2fd651bb24428cf861fd
Related-Bug: #1855138
2019-12-04 22:09:26 +00:00
Sagi Shnaidman
1acc95211d Fix case in filters when Labels is None
When Labels is None it's not managed by tripleo container,
then skip it.
Change-Id: Ib82c4d28c462abb3f1a5ccb7d5137ec6059b2665
2019-12-04 11:16:13 +02:00
Zuul
7dc0f38cc4 Merge "Add os_baremetal_node_info module for retrieving nodes info" 2019-12-04 07:32:54 +00:00
Sagi Shnaidman
0609c16d10 Improve idempotency for podman containers module
Fix some pep8 issues
Change-Id: If4233e57edeec10ccac965d61c78f30688cd5531
2019-12-04 00:54:04 +02:00
Alex Schultz
0dba52d593 Optionally add ctlplane vips
If the OS::TripleO::Network::Ports::ControlPlaneVipPort is not
configured, as done on an undercloud minion, the ctlplane_subnet_cidr is
never configured. We shouldn't assume it's available so let's check that
it exists first.

Change-Id: I154e6ffdeec86b13bc7e586154909c3ff41f8d58
Closes-Bug: #1837644
2019-12-03 15:19:01 -07:00
Zuul
0a325d8095 Merge "Introduce unit tests structure for tripleo-ansible filters" 2019-12-03 16:06:57 +00:00
Dougal Matthews
cb337e7391 Baremetal Introspection Playbook
This Ansible playbook provides a way of running a set of Ironic nodes through
introspection. It is intended to be used by the `openstack overcloud node
introspect` CLI command.

Related-Bug: #1835230
Co-Author: Sagi Shnaidman <sshnaidm@redhat.com>
Change-Id: Iebfd92461f4132f148ac2d935b58d06e1f1ff3c8
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-12-03 06:31:24 +00:00
Zuul
1e1ee4e719 Merge "Rename overcloud-delete playbook" 2019-12-03 02:36:55 +00:00
Zuul
aff670f2dd Merge "Delete Octavia configuration leftovers" 2019-12-03 02:12:15 +00:00
Emilien Macchi
f90a6d42b3 Introduce unit tests structure for tripleo-ansible filters
Change-Id: Ie2fea14d2cbfb2c0b78cdc3064df0a558fa28a4c
2019-12-02 22:26:16 +00:00
Zuul
baa509f5a9 Merge "Fix for Ansible playbook error, variable is undefined" 2019-12-02 19:56:34 +00:00
Zuul
04c445ae1e Merge "Handle range in the cpu_mask conversion for DPDK cores" 2019-12-02 18:46:07 +00:00
Zuul
199110e86d Merge "Remove extra backslash in awk for tripleo-ceph-uuid role" 2019-12-02 18:01:01 +00:00
Piotr Kopec
b398598311 Fix for Ansible playbook error, variable is undefined
This fixes the variable is undefined problem when deploying minions.

Change-Id: I2893b77bb1c7811fbdbf0426e0a09f80b2179f54
Closes-Bug: #1837644
2019-12-02 15:15:52 +01:00
Zuul
f19d07cbc0 Merge "Add missing ExecReload in container service unit file" 2019-12-02 04:20:16 +00:00
Zuul
c8916fbc04 Merge "tripleo-container-manage: remove no_log for create/exec tasks" 2019-11-29 18:20:58 +00:00
Zuul
e3acd2c196 Merge "Cast single value list as a string for config id" 2019-11-29 18:11:43 +00:00
Carlos Goncalves
5f14ff39fa Delete Octavia configuration leftovers
Post update and upgrade tasks added in Change-Id
I32524f85ef6a0ca3e87fa9acc8c9e12776225717 do not run as expected.
Octavia is an external deploy. Best way to handle config leftover files
is with an Ansible task in the end of the external deploy.

Closes-Bug: #1836074
Change-Id: I72e2c75ae19c6f41f2938cf165b598345b3796fc
2019-11-29 17:17:39 +01:00
Cédric Jeanneret
2a2bed6f5c Add missing ExecReload in container service unit file
It may happen that we want to just reload the container. Before this
patch, it was a "stop and start", while podman has the "podman kill"
available, accepting the HUP signal.

Doing so allows other automated tools to actually just "reload" the
container as we would do for a standard service.

Change-Id: I35eff80f7637b013d3a1a831289ec9b1e0f81431
2019-11-29 09:17:27 +01:00
Zuul
d0dd0f0c62 Merge "Make sure role_networks is used from current processed node" 2019-11-29 00:17:25 +00:00
Zuul
3c80d51b92 Merge "Make sure we add all_nodes_extra_map_data to all_nodes" 2019-11-28 23:38:06 +00:00
Martin Schuppert
bc570e74f2 Make sure role_networks is used from current processed node
When e.g. ceph storage role is used and a ceph storage node is the first node
to run on during deployment [1] the facts get set using this host. As a result
role_networks [2] will always only contain Storage and StorageMgmt :

TASK [tripleo-ssh-known-hosts : Set ssh_known_hosts fact]
******************************************************************************
Thursday 28 November 2019 14:16:00 +0000 (0:00:00.747) 0:00:13.681 *****
ok: [ceph-0]

Therefore all nodes will only get additional hostnames set in the
ssh_known_hosts file for the Storage and StorageMgmt network even if the they
don't have this network in their role, like the compute [4] StorageMgmt:

[192.168.24.42]*,[compute-0.redhat.local]*,[compute-0]*,[172.17.3.29]*,[compute-0.storage]*,[compute-0.storage.redhat.local]*,[192.168.24.8]*,[compute-0.storagemgmt]*,[compute-0.storagemgmt.redhat.local]*,
ssh-rsa

In such a situation live migration is broken due to host key verification
failure

[1] https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/roles/tripleo-ssh-known-hosts/tasks/main.yml#L47
[2] https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/roles/tripleo-ssh-known-hosts/tasks/main.yml#L54
[3] https://github.com/openstack/tripleo-heat-templates/blob/master/roles/CephStorage.yaml#L7-L11
[4] https://github.com/openstack/tripleo-heat-templates/blob/master/roles/Compute.yaml#L11-L17

Change-Id: I2491ccd9f1bbe1d9cd2848301956803c5935a6f3
Closes-Bug: #1854368
2019-11-28 15:30:12 +01:00
Bogdan Dobrelya
e88785f124 Cast single value list as a string for config id
When passing containers config-id into the paunch module,
convert it into a single value (string) for backwards compatibility
of paunch, and unlocking upgrade paths as well.

Paunch as a library only "understands" such single values for
config ids yet. This can be fixed later although.

Related-bug: #1853812

Change-Id: Id8985795fc8fac5a10466486d404799e9c65cc65
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2019-11-28 14:48:09 +01:00
Saravanan KR
709a11cbde Handle range in the cpu_mask conversion for DPDK cores
cpu_mask filter plugin handles list of cores, extend it to
support range of cores to convert to mask.
Closes-Bug: #1854341

Change-Id: I06d929e1602ece966100a6913166910b9e301635
2019-11-28 10:57:13 +00:00
Zuul
d4ec96a09c Merge "use version parsing from distutils" 2019-11-28 00:16:00 +00:00
John Fulton
7d935a5be4 Remove extra backslash in awk for tripleo-ceph-uuid role
This backslash caused bug 1854209. Whitespace in the
multi embedded in YAML is complicated. Seems safer to
just remove it in this case.

Change-Id: I8414a776360700b05fb18d73862797b13a58f32d
Closes-Bug: #1854209
2019-11-27 19:16:23 +00:00
Jon Schlueter
8c83219fbb use version parsing from distutils
use LooseVersion for version comparisons

Change-Id: I609920a96c725c49f1623f60f8295d89ae4f3141
2019-11-27 21:05:01 +02:00
Kevin Carter
19f33cf53d
Add LVM2 package install to bootstrap
This package is needed by ceph and should already be part of our
bootstrap process on pre-deployed hosts.

Change-Id: I1fecb562e1315ebfc0406b3ac25b8dac6dfca607
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2019-11-27 11:36:06 -06:00
Zuul
52508b0a17 Merge "tripleo-container-manage: create ansible-managed dropin file" 2019-11-27 00:13:56 +00:00
Emilien Macchi
89e4adf2ae tripleo-container-manage: remove no_log for create/exec tasks
1. Remove no_log for the create and exec tasks. It's always useful to
   see what is being run.

2. Enable podman_container debug, so we see what commands are being run.

Change-Id: If728788293dd64622cf95da840b60e271197e9a0
2019-11-26 18:42:13 -05:00