1348 Commits

Author SHA1 Message Date
Zuul
27a22788ac Merge "Introduce module tripleo_derive_hci_parameters" 2020-09-10 01:03:26 +00:00
Zuul
797894d81d Merge "Remove swift_ring_rebalance.yaml playbook" 2020-09-08 18:44:11 +00:00
Zuul
5212ea5423 Merge "doc: tripleo_os_net_config_mappings module" 2020-09-08 15:58:40 +00:00
Zuul
86669b56d9 Merge "Add tripleo_nodes_validation role" 2020-09-08 08:52:10 +00:00
Harald Jensås
c7340675bf doc: tripleo_os_net_config_mappings module
This is a follup up for https://review.opendev.org/749669
adding documentation.

Change-Id: Ib7ccdc39ce71ba0b4e2a3dc52ac208336ca53a48
2020-09-07 15:33:14 +02:00
John Fulton
75afb950a5 Introduce module tripleo_derive_hci_parameters
Derive HCI parameters with an Ansible module instead of
a Mistral workflow.

Also adds the cli-derive-local-hci-parameters.yml playbook
which may be run before a deployment to generate a Heat
environment file to use as input to a deployment.

Story: 2007419
Task: 40710
Change-Id: I6ea9686a98a98c1fcb8d06f44eac830129fd74b0
2020-09-07 13:09:09 +00:00
Zuul
de0d8d06aa Merge "Ensure yaml packages are installed" 2020-09-04 18:09:35 +00:00
Zuul
ccfd30f8c2 Merge "Add os-net-config mappings support" 2020-09-04 16:13:34 +00:00
Alex Schultz
a9ab69a59d Ensure yaml packages are installed
Since all of our ansible modules have 'import yaml', we should ensure
that we have the correct yaml python packages installed.  When running
in containers, they aren't there by default.

Change-Id: I911f589817d7142711b8ef3c675a8098a3ebb0f3
2020-09-04 13:14:05 +00:00
Harald Jensås
6bd7eeb7cc Add os-net-config mappings support
Adds an ansible plug-in that can process the input
in THT parameter 'NetConfigDataLookup' used for the
OsNetConfigMappings resource in tripleo-heat-templates.

Add tasks in the tripleo_network_config role to call the
plug-in and write the result into the default mapping
file for os-net-config.

Change-Id: I968771376cdb3cd2e8e576a4de226b1eccebb23a
Blueprint: bp/nova-less-deploy
2020-09-03 22:41:59 +02:00
Zuul
ff730321a2 Merge "Fix podman and buildah only on rhel-8.2" 2020-09-03 20:09:03 +00:00
Zuul
6d165d1af6 Merge "Only concatenate default_templates_dir when necessary" 2020-09-03 17:59:38 +00:00
John Fulton
295555839c Only concatenate default_templates_dir when necessary
By default the default_templates_dir is appended to the
plan_environment file. This is fine unless the deployer
overrides the default plan_environment file with the -p
option. This patch adds jinja2 filters so that if the
plan_environment starts with a '/', then the default
templates directory is not appended. Otherwise the default
behavior is unchanged.

Change-Id: I5341da7fdea0a53b86295d74d68ef2013efb0ea0
Closes-Bug: #1893861
2020-09-03 13:00:19 +00:00
Christian Schwede
bc999a6dcf Remove swift_ring_rebalance.yaml playbook
This playbook has a few minor issues, and is no longer used. Instead of
fixing unused code, let's simply remove it.

Change-Id: I3d21e4596d0d0b8b5a1153c2e3dc85ede850a3b2
2020-09-03 13:56:25 +02:00
Zuul
fc54057525 Merge "Remove remaining implementations for OpenDaylight" 2020-09-02 22:48:51 +00:00
Zuul
c49f8d26b8 Merge "Stop relying on future mtime in tripleo_nova_image_cache" 2020-09-02 17:48:16 +00:00
Zuul
153f9250ab Merge "Workaround tripleo_nova_cache issue in ansible 2.9.11" 2020-09-02 17:10:44 +00:00
Cédric Jeanneret
c2365b3ab7 Fix podman and buildah only on rhel-8.2
Newer rhel version will provide newer tools, let's allow them for now
and decide if we must get some new redhat-8.3.yml and so on.

Change-Id: I81434e914d9c84a093f726181f7bb4a9b2042062
2020-09-02 15:39:33 +02:00
Oliver Walsh
359ef43f94 Stop relying on future mtime in tripleo_nova_image_cache
The tripleo_nova_image_cache role was relying on a future mtime to convince
nova image cleanup logic to skip a specific image that we want to pre-cache.
This works well on nodes that are not currently hosting an instance of the
image, however if there is an instance using it then nova will reset the mtime
every 40 minutes (by default).

As a result it's not possible to provide fine grained control of the caching.
We can just ensure the image exists on the host with an mtime of now.
It should remain cache for at least remove_unused_original_minimum_age_seconds
from nova.conf (default 86400).

Change-Id: If836759020bcaeb0d3af47f2af7f98ff2150b606
2020-09-02 00:34:44 +01:00
Zuul
cc4c6e8545 Merge "Fix a typo in the explanatory note" 2020-09-01 22:26:42 +00:00
Zuul
c82a958fc8 Merge "Add tripleo_deploy_artifacts" 2020-09-01 22:26:40 +00:00
Oliver Walsh
f38b4c97b9 Workaround tripleo_nova_cache issue in ansible 2.9.11
99a37234b7
changes the core action plugin to assume task_vars has ansible_facts and
ansible_delegated_vars keys when interpreter discovery is triggered.

The tripleo_nova_cache action plugin passes custom task_vars dicts via
self._exec_module that do not contain these keys.

This looks like a regression in ansible.
Workaround it for now while I take the issue upstream.

Change-Id: I57dc24b8450f900ac1fb4e4c2f420f104618c609
2020-09-01 22:15:11 +01:00
Alex Schultz
a19b9195fc Add tripleo_nodes_validation role
Convert the all-nodes-validation.sh to a native ansible role. This role
pings the default gateway, checks that controllers are reachable and can
validate that the hostname matches what is in /etc/hosts

Change-Id: I5c1109780f007849c5306adf21fd54b0e9a31494
2020-09-01 14:15:37 -06:00
Zuul
b62c354b1a Merge "Fix tripleo_kernel molecule verification" 2020-09-01 17:00:26 +00:00
Zuul
4669fd91f8 Merge "Add tripleo_ha_wrapper role" 2020-09-01 17:00:25 +00:00
Zuul
c04eca293a Merge "Fix role-addition CI" 2020-09-01 15:12:44 +00:00
Zuul
eda8c0add5 Merge "Add new playbook for container image prepare cli" 2020-09-01 15:12:42 +00:00
Michele Baldessari
d5782863b8 Add tripleo_ha_wrapper role
This role is meant to help moving the HA pcs tasks to pure deployment
steps run on the host and not in containers any more. We tested this
ansible review with the THT patches at
https://review.opendev.org/#/q/status:open+project:openstack/tripleo-heat-templates+branch:master+topic:pcs_host3

Here is the testing protocol that was used in order to verify we did
not break anything:
1) Deployed overcloud + tempest
2) Ran a successful redeploy
2.1) Verified that a redeploy restarted containers globally when the
     configuration for the service changed
2.2) Verified that a redeploy did not restart containers which config
     did not change
2.3) Verified that the ordering of restarting bundles allows for
     brownfield deployments (i.e. first the bundle is restarted due
     to new bind-mounts and then the bundle is restarted with new
     configuration)
2.4) Verified that converge step after minor update is successful
3) Ran an initial successful minor update
3.1) Verified that the new image is indeed being run by pacemaker
     (i.e. :pcmklatest tag is applied to the new containers)
3.2) Verified that after converge no container is restarted
4) Re-run a subsequent successful noop minor update
4.1) Verify that containers are not restarted a second time after
     the cluster is stopped and started

Depends-On: I367cf4b65300be8dca0190b9adeab549018d4a56

Change-Id: Iaa7e89f0d25221c2a6ef0b81eb88a6f496f01696
Related-Bug: #1863442
2020-09-01 12:25:14 +02:00
Michele Baldessari
8e2a54d5d5 Fix role-addition CI
By artificially setting the upper constraint file we ignore
global-requirements which then creates errors like the following:

role-addition run-test: commands[2] | pip check
setting PATH=/home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/role-addition/bin:/home/zuul/.local/bin:/home/zuul/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
[43268] /home/zuul/src/opendev.org/openstack/tripleo-ansible$ /home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/role-addition/bin/pip check
openstacksdk 0.48.0 has requirement decorator>=4.4.1, but you have decorator 4.2.1.
ERROR: InvocationError for command /home/zuul/src/opendev.org/openstack/tripleo-ansible/.tox/role-addition/bin/pip check (exited with code 1)

A job test that was failing previously with the above error, now passed
correctly:
- Before: https://zuul.opendev.org/t/openstack/build/8ad3a5951133418e8be132db218a4480
- After: https://zuul.opendev.org/t/openstack/build/01d33b85362d430cb30b619803814677

Closes-Bug: #1893734

Change-Id: I0e5f4692efe387d97f940b5323e593a94b6f833a
2020-09-01 12:21:05 +02:00
Zuul
c0d5ad8607 Merge "Enable tripleo setup for molecule" 2020-08-31 23:53:58 +00:00
Oliver Walsh
15de11b530 Fix tripleo_kernel molecule verification
Molecule was not running the verify playbook as the test_sequence was incorrect.

Change-Id: Idc3bf177a44f8a8433a1cef87ef5b46f909df637
2020-09-01 00:34:16 +01:00
Zuul
f72f9a991b Merge "Set timeout to default if not configured" 2020-08-31 21:30:40 +00:00
Alex Schultz
8765d31264 Enable tripleo setup for molecule
We currently don't setup the tripleo repos for the tripleo_bootstrap
role so the required package installation is not picking up the correct
packages (e.g. puppet).

Change-Id: I351f7ce8b4a2d8187a0c63f9c804d2fe97486cf3
2020-08-31 14:35:05 -06:00
Zuul
8cfe4d399a Merge "BaR - Ceph Backup" 2020-08-31 19:05:22 +00:00
Zuul
3c962d9cc9 Merge "Expose tripleo_container_manage_clean_orphans var" 2020-08-31 15:31:46 +00:00
Rabi Mishra
e03f6bb595 Add new playbook for container image prepare cli
This adds a new playbook for container image prepare command which
will be used in tripleoclient and can also be used elsewhere.

Change-Id: I8a1b9794723627bd458b5354155787bb1a2e26bc
2020-08-31 19:13:59 +05:30
Rabi Mishra
1b93165288 Expose tripleo_container_manage_clean_orphans var
This exposes new var for tripleo_container_manage. Also,
removes the check to force set clean_orphans=True in
needs_delete filter, when there is one or no item in
the startup config.

There is a possibility when disabling services, there would
be one or zero container_startup_configs for a step.

Partial-Bug: #1893335
Change-Id: I9d08168015487c48d8b380a9575ba236b7fb7d0d
2020-08-31 07:58:46 +05:30
Sagi Shnaidman
8a0bccadcd Set timeout to default if not configured
When "| int" is set after "omit" it sets parameter to 0 instead
of omitting.

Change-Id: Iee9085fa4992846e36c7e71d4c2cfc3bc9db42ac
2020-08-30 10:28:46 +03:00
Takashi Kajinami
b321336639 Remove remaining implementations for OpenDaylight
... because OpenDaylight is no longer supported by TripleO.

Change-Id: I321ce7706eb16e6c9498ace67965e951516806a4
2020-08-29 18:13:33 +09:00
Alex Schultz
f55f218535 Add tripleo_deploy_artifacts
This module takes a list of urls of rpms or tar.gz files and applies
them to a system.

Change-Id: Ia1b998069a5c973813c187ea1efa9b5715a55f28
2020-08-28 15:31:46 -06:00
Juan Badia Payno
a930407217 BaR - Ceph Backup
Backup and Restore:
  This task aims to take a backup of the /var/lib/ceph directory and
copied to the shared directory.
  To be able to do it, we copy the way that the ceph-ansible project [1]
deactivates the mds [2], so we can stop all the ceph services on the
controllers.

[1]-https://github.com/ceph/ceph-ansible/
[2]-https://github.com/ceph/ceph-ansible/blob/v4.0.14/infrastructure-playbooks/rolling_update.yml#L550-L623

I left the comment below to describe and give some backgroud.
** Just splitting the patch into patches.
All the Randy's comments are implemented.
The other patch is https://review.opendev.org/#/c/732399/

Change-Id: I55681d69cacf2e7bee52d9a61f12d8577fe15a2d
2020-08-28 12:31:23 +02:00
Alex Schultz
5702b7ba3d Add tripleo_diff_exec module
This module takes a file input and checks to see if it has changed since
the last time checked and runs a command if it has changed. The module
will take a copy of the file being checked to be used for subsequent
executions if the file has changed.

Change-Id: Iea02a40639529ff9d80d3368f07ce81e6b1e911f
2020-08-27 18:06:50 +02:00
Zuul
c33af2bbe7 Merge "Update containers info module from collection" 2020-08-26 04:42:30 +00:00
Zuul
c885911608 Merge "Show the proper value (0) to set unlimited pids" 2020-08-26 04:42:28 +00:00
Takashi Kajinami
42f32b21e3 Show the proper value (0) to set unlimited pids
According to podman documentation[1], 0 should be set to --pids-limit,
instead of -1, to allow unlimited pids.

[1] http://docs.podman.io/en/latest/markdown/podman-create.1.html

Change-Id: Ica40c727d864f941cde7104f3259edf8bb05f081
2020-08-25 23:12:15 +09:00
Cédric Jeanneret
f602e84c0f Enable pids_limit support
The default PID limit in a container is set to 4096. This limit might be
reached in a nova_libvirt container, after launching about 150 VMs.

Change-Id: Ibfbe63cbd9e2a219f10ebc407596aeefe4a5b194
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1871885
Closes-Bug: #1892817
2020-08-25 08:09:44 +02:00
Zuul
ed4e75e36e Merge "Fix role name typo in octavia playbook" 2020-08-25 04:42:22 +00:00
Sagi Shnaidman
72f0e09019 Update containers info module from collection
When container disappears between "podman ps -a" call and
inspection call "podman inspect cont1 cont2, ..", the module fails.
To avoid this run inspection of each container one by one if total
inspection call failed.
This is update of module from collection.
Closes-Bug: #1892701

Change-Id: I0c085c6c136e5d5b162feb8a1f72d906ab08502e
2020-08-25 06:19:45 +03:00
Brent Eagles
3220e4e5e3 Add OpenFlow10 to protocols for backwards compatability
We need to add OpenFlow10 to the required protocols to support
backwards compatibility with neutron's destroy_patch_ports.

Closes-Bug: #1892491
Change-Id: I6865787f4d0b0459ac2eb91c0f1da9c08b36dd8d
2020-08-24 14:18:15 +00:00
Brent Eagles
9d2f99f87c Fix role name typo in octavia playbook
octavia-controller-check should be octavia_controller_check. Also
removes symlink that should no longer be required.

Change-Id: I232aa4d8af134ce3403b12a15e06e378ad418d58
Closes-Bug: #1892512
2020-08-24 14:01:58 +00:00