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
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
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>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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