Commit Graph

1123 Commits (c6308a1666bf871f1e51703c9040f14d87e6d708)

Author SHA1 Message Date
Alex Schultz c6308a1666 Make profile tasks host aware
When we switched to free, the task timing isn't accurate because it
records time between two tasks. With free, the tasks may be on different
hosts and not even the same task so the timing was the time between some
tasks.  This rewrite adjusts where we start and stop the task timing and
includes a hostname in the calculation. The inclusion of the hostname
allows us to pinpoint if tasks take longer on specific hosts as task ids
are generally (but not always) the same between hosts.

Change-Id: If0194091eb03186203e7724d506fdd36fd82baeb
3 years ago
Alex Schultz 0afddf7b4c Stop using profile_tasks as a base
The profile_tasks callback has been moved out of the base ansible code
base as part of 2.10. We already override most of the logic so let's
drop this inclusion to make tripleo_profile_tasks compatible with
ansible >2.9.

Change-Id: Iae3cb2b763eac435a2b8546182d1c65e917516e6
3 years ago
Rabi Mishra 64fdb4e8c9 Check for raw image in node provision
We changed to upload raw images with
https://review.opendev.org/#/c/749466/

Change-Id: Ib1fa2566c8341892d84d1bdc7c45ee46549bbf65
Closes-Bug: #1895524
3 years ago
Zuul befede0ac4 Merge "Add guard to ensure a mapping has a valid key" 3 years ago
Kevin Carter a446dd4fce
Add guard to ensure a mapping has a valid key
This change will ensure our list comprehension doesn't
fault when attempting to perform a "containers" lookup
against a given resultant. While the result object
should always have a "containers" we've seen intermitent
failures in CI pointing at this being an issue.

Change-Id: I8f22888ba473c78dd56988546ae402ca41c8b89f
Closes-Bug: #1886636
Signed-off-by: Kevin Carter <kecarter@redhat.com>
3 years ago
Alex Schultz 10e488bcb7 Don't hide logs in molecule
The podman login is currently failing but we can't see why because no
log is set.

Change-Id: I272c5cf000f9bf56e571ee68950bab5c0919d498
3 years ago
Zuul 325d080583 Merge "Use bool filter when checking use_default_templates var" 3 years ago
Rabi Mishra 9ad422071b Use bool filter when checking use_default_templates var
extra_vars are passed as strings in older ansible-runner versions
and would result in wrong boolean value.

This regression downstream has been caused by
https://review.opendev.org/#/c/737677/

Related BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1876999

Change-Id: Ie9119d2e6ac6b03c283a535b0445e83a2b564dbf
3 years ago
Zuul 9cdc0a5b41 Merge "Derive HCI reseverved host memory without average guest workload" 3 years ago
Zuul 27a22788ac Merge "Introduce module tripleo_derive_hci_parameters" 3 years ago
John Fulton cf1744373f Derive HCI reseverved host memory without average guest workload
Add new option to tripleo_derive_hci_parameters module so that
if both the average_guest_cpu_utilization_percentage and the
average_guest_memory_size_in_mb are not passed, then a simpler
calculation is performed which computes the required memory for
the Ceph OSDs.

It is preferable for the user to pass the expected workload but
if this value is unknown it is still better to at least reserve
the bare minimum in memory for the OSDs so that they do not get
shutdown from an OOM error.

Change-Id: I68ad3783d3e0bf47fd63ab79f6ea0b0655c751c1
3 years ago
Zuul 797894d81d Merge "Remove swift_ring_rebalance.yaml playbook" 3 years ago
Zuul 86669b56d9 Merge "Add tripleo_nodes_validation role" 3 years ago
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
3 years ago
Zuul de0d8d06aa Merge "Ensure yaml packages are installed" 3 years ago
Zuul ccfd30f8c2 Merge "Add os-net-config mappings support" 3 years ago
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
3 years ago
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
3 years ago
Zuul ff730321a2 Merge "Fix podman and buildah only on rhel-8.2" 3 years ago
Zuul 6d165d1af6 Merge "Only concatenate default_templates_dir when necessary" 3 years ago
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
3 years ago
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
3 years ago
Zuul fc54057525 Merge "Remove remaining implementations for OpenDaylight" 3 years ago
Zuul c49f8d26b8 Merge "Stop relying on future mtime in tripleo_nova_image_cache" 3 years ago
Zuul 153f9250ab Merge "Workaround tripleo_nova_cache issue in ansible 2.9.11" 3 years ago
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
3 years ago
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
3 years ago
Zuul cc4c6e8545 Merge "Fix a typo in the explanatory note" 3 years ago
Zuul c82a958fc8 Merge "Add tripleo_deploy_artifacts" 3 years ago
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
3 years ago
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
3 years ago
Zuul b62c354b1a Merge "Fix tripleo_kernel molecule verification" 3 years ago
Zuul 4669fd91f8 Merge "Add tripleo_ha_wrapper role" 3 years ago
Zuul eda8c0add5 Merge "Add new playbook for container image prepare cli" 3 years ago
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
3 years ago
Zuul c0d5ad8607 Merge "Enable tripleo setup for molecule" 3 years ago
Oliver Walsh 15de11b530 Fix tripleo_kernel molecule verification
Molecule was not running the verify playbook as the test_sequence was incorrect.

Change-Id: Idc3bf177a44f8a8433a1cef87ef5b46f909df637
3 years ago
Zuul f72f9a991b Merge "Set timeout to default if not configured" 3 years ago
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
3 years ago
Zuul 8cfe4d399a Merge "BaR - Ceph Backup" 3 years ago
Zuul 3c962d9cc9 Merge "Expose tripleo_container_manage_clean_orphans var" 3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
Takashi Kajinami b321336639 Remove remaining implementations for OpenDaylight
... because OpenDaylight is no longer supported by TripleO.

Change-Id: I321ce7706eb16e6c9498ace67965e951516806a4
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
Zuul c33af2bbe7 Merge "Update containers info module from collection" 3 years ago
Zuul c885911608 Merge "Show the proper value (0) to set unlimited pids" 3 years ago