Not sure why but it seems to me that the parallel execution
is affecting this conditional evaluation.
As this conditional way was used in several places, this
patch aims also to change those places to look alike.
Closes-Bug: #1998501
Change-Id: Ib4de49adc50ee4c806882754c5657c7dbd1f8993
... to avoid the following warning.
[WARNING]: conditional statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: '{{ playbook_dir }}/{{
_task_file_path }}' is exists
Change-Id: Ie804bf9bebf32f45aebc1fb63def3f2f95774e98
These role task inclusions force a linear-like sequence
and result in a lot of unnecessary skipped tasks. This
takes extra time, and causes a lot of log noise which
makes debugging more difficult.
Given that a host can ever only have a single role, it
makes more sense to just include the applicable role
task file if it exists.
Change-Id: Id2cadceaaf563dc94fcf2d8ce0f0cb9054a65d40
With tripleo_free strategy a playbook run fails only after the
end of the play. In case a task failure for a node, the other nodes
keep continuing till the end of play. Therefore, --start-at-task
should be always at the beginning of the play as different nodes
can fail at different tasks and we need to always start from the
start of play.
Change-Id: I79ff5d3babd05c7d1ba5195f372c1348d6692e2b
Ansible free/tripleo_free strategies do not work well
for blocks with conditions, containing include_tasks.
Conditions ( i.e when: ) at times get mixed up resulting
in wrong condition being evaluated. As blocks are only
logical entities (conditions evaluated per task), we
shouldn't have any problem moving the conditions to tasks
in Host prep block to avoid the issue.
This fixes intermittent chrony failures in host_prep_tasks.
Note: This is a workaround as we've to backport it all
the way till train and has to be fixed in core ansible[1]
in the future.
[1] https://github.com/ansible/ansible/issues/60512
Resolves: rhbz#2084075
Resolves: rhbz#2111237
Change-Id: Id9f481f3fe75169bd4c3d721e23e847a1b6c8c43
This reverts commit 6d80912404.
Reason for revert: The decision was made to not pursue task-core and
directord. As such, these task-core methods are no longer required.
Change-Id: If3ec6485865755b584731835cdf866dc1feacfcb
Deploy without gateway in the network data, the ping test fails
because no valid ip address. Added default value when not present.
ping_test_ips is a space separated string. Added default value as
empty string. Also removed space (' ') from split as by default
split will work based on space. Adding space string creates list
with empty string [""].
ping_test_gateway_ips is a list of ips. Added default value as [].
Change-Id: I987e093fc1ebb8dc47b39b914483936b6e7e4d6b
This change adds a new output to service definitions called
core_services which are used to define task-core services that will be
collected and exported during the config-download progress. These
services are mapped to TripleO roles and published into a task-core role
file in the config-download.
Related-Blueprint: unified-orchestration
Change-Id: I6954ecc92e740212a4502ac5fa8e53eeed22d043
Depends-On: https://review.opendev.org/c/openstack/tripleo-common/+/798721
Add ping test for gateway IPs on all networks, to ensure
all gateways are reachable.
The releated Bugzilla reports an issue where some network
fabrics fail when using the current node ping test, which
pings the first node in each role. The fabric simply does
not forward traffic before the gateway has been pinged.
One can argue that the fabric in question is broken. However,
with the current implementation the first node in each role
actually ping tests only against it's own address? So adding
the test to ping the gateway addresses improves the validation
in general.
Related RHBZ#1875962
Depends-On: I93cded61ffb862e99fd8043dbf0def3d16079692
Change-Id: I3309f2a0e39ad115930ecd5c0e895816565819e9
In ansible, usage of true/false for boolean values, instead of yes/no,
is considered as a best practise and is enforced by ansible-lint with
the "truthy value should be one of false, true (truthy)" rule.
This change replaces usage of yes/no by true/false to follow that
practise.
Change-Id: I3313278f1ef6cbee0f906aca0a77bde1a3c53784
Remove the filtering of network_virtual_ips based on
the hard-coded network names. The depends-on does similar
filtering by using the service_net_map instead.
This should allow better support for custom network names,
custom ServiceNetMap and use of service_net_map_replace in
network data.
Related-Bug: #1946239
Depends-On: I9c5d681c266db1e5048a1be6557c20abd5a07f7b
Change-Id: I1c904d2f09e4679e50713d344abdff4fd830132a
With Ephemeral Heat, we can no longer rely on the stack
action to perform tasks. Such as we did with
NetworkDeploymentActions. This change will add a new
parameter to replace this functionality.
Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/805213
Change-Id: I7067c31f4fcc3f263ae2e3ab993c8bff7113d55b
This change removes the jinja found within the conditionals used in our
deploy steps playbook which will resolve an Ansible warning seen when
running a deployment.
Change-Id: Ifa66a0805cba5c5a095731bda5e4f8c31626ed96
Signed-off-by: Kevin Carter <kecarter@redhat.com>
When checking for the existence of task files at a given path, the path
should be prefaced with {{playbook_dir}} so that the correct absolute
path is checked. Otherwise, the path is relative to the working
directory which does not have to be the same as playbook_dir.
Change-Id: Ia16f249b240c06128374551f6110419f9c1923c9
Signed-off-by: James Slagle <jslagle@redhat.com>
This change breaks the deploy-steps monster playbook into isolated playbook
files allowing us to use the deploy-steps entrypoint as a playbook router.
With this change we'll be able to further optimise our playbook processes
in isolation and begin exploring different methods of deployment for parts
of our stack. Additionally this change will make it possible for advanced
users to run playbooks as needed, without having to run everything from
top to bottom.
Change-Id: I34bb41e63ccc65ae47999758ab7ce8a6120ef0a4
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This change updates the artifact module usage to leverage
our action plugin. Without this change any usage of deployed
artifacts is broken.
> "Unsupported parameters for (tripleo_deploy_artifacts)
module: artifact_paths Supported parameters include:
artifact_urls"
This change resolves the above error.
Change-Id: I792f453d4f84c3b572fe98929676b624675c0aee
Signed-off-by: Kevin Carter <kecarter@redhat.com>
We don't need to add these tasks for roles with zero
count. We probably should not create service chains for
roles with zero count, but that's a bigger change.
Change-Id: I41c6b4799eef7940b12811468dcc48e7b6fa543b
Following the refactor from Idf004f7a13544dfc1a8a6da033debd1a4f8b96e7
the operations needed to get the container configuration where removed
from the step1 file.
We need to re-include them explicitly during update so that new
changes get taken into account.
In the deployment we have this sequence (keeping only those common
with update):
- step-0
- host-prep-task
- common container setup
- common deploy steps tasks 1-5
We mimic this sequence in update by placing common container setup
before the common deploy steps tasks 1-5.
Change-Id: I5df88cf9d84f5fecb50b0c602b7923027d5f12b0
Closes-Bug: 1926281
Make it aligned with the upgrade tasks, what uses become as well
Change-Id: I58da2c214c5a9cf013bc7719649e0d0d4f3a6f74
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
With this change a Heat resource is no longer used to
create an undercloud neutron API port resource for the
redis and ovn_dbs service virtual IPs. Instead an
external deploy task at step 0 in the individual service
template uses the "tripleo_service_vip" ansible module
to mange a neutron API port resource for each service.
The interfaces to control the IP address and service
network (RedisVirtualFixedIPs, OVNDBsVirtualFixedIPs
and ServiceNetMap) remains the same.
It is also possible to include the 'use_neutron' boolean
in the FixedIPs parameter to instruct the ansible module
not to create a neutron API resource, and simply "echo"
the ip_address given in the FixedIPs parameter. For
example:
RedisVirtualFixedIPs:
- ip_address: 1.0.0.5
use_neutron: false
Alternatively the fixed-ips can be set using the
'ServiceVips' parameter, like this:
ServiceVips:
redis: 1.0.0.5
ovs_dbs: 1.0.0.6
NOTE: If the neutron service is not available the
tripleo_service_vip ansible module will "echo"
the IP provided in %service%VirtualFixedIPs.
Related: blueprint network-data-v2-ports
Depends-On: https://review.opendev.org/777307
Depends-On: https://review.opendev.org/779883
Change-Id: I4794418546363888e7a555a16b45b7a4417f1ef8
Let's introduce a new set of tasks that will be called after all the
groundwork to run containers has been run (so after podman's
host_prep_tasks, after the container_setup tasks but before any
deployment step or external deployment step).
Change-Id: If3c74703a684fbd5a815e073cc9da34e9ad672e8
With I57047682cfa82ba6ca4affff54fab5216e9ba51c Heat has added
a new template version for wallaby. This would allow us to use
2-argument variant of the ``if`` function that would allow for
e.g. conditional definition of resource properties and help
cleanup templates. If only two arguments are passed to ``if``
function, the entire enclosing item is removed when the condition
is false.
Change-Id: I25f981b60c6a66b39919adc38c02a051b6c51269
And move it into its own play called 'Overcloud container setup tasks'
This set of tasks covers creating kolla files and
container-startup-config files.
It makes more sense to split them out of the deployment steps as they
need to be run before any deployment step task and this makes it more
explicit.
This change is needed in order to support a new upcoming set of tasks
pre_deployment_setup_tasks that can spawn containers even before
any deployment tasks or external deployment task.
Change-Id: Idf004f7a13544dfc1a8a6da033debd1a4f8b96e7
This change adds an artifact push task to deployments, which helps
support operators to ensure they've a better overall user experience
without needing to deploy an http server or running Swift on the
undercloud.
Depends-On: I5d18cf334c1bc4011db968fbeb4f9e41869611cd
Change-Id: I7bef7c4c7613a2475784dde135d71232b412d79f
Signed-off-by: Kevin Carter <kecarter@redhat.com>
This patch exposes the net_cidr_map variable so that tasks can
access the list of CIDRs that are valid for a network as opposed
to attempting to build the CIDRs from the network definitions.
In spine-leaf or edge use cases the networks may have multiple
subnets assigned to a given network.
The new Unbound service will use these maps to build lists of
CIDRs allowed to make queries.
Change-Id: I6004519e8b2317d19356c4a2b8bea416b4d94c22
In order to ANSIBLE_INJECT_FACT_VARS=False we have to use ansible_facts
instead of ansible_* vars. This change switches our distribution and
hostname related items to use ansible_facts instead.
Change-Id: I49a2c42dcbb74671834f312798367f411c819813
Related-Bug: #1915761
Import tasks causes the tasks always to be pulled in and just skipped at
run time. This is terribly slow with more roles even when not running
against those hosts. A similar effort was applied to the update process
I2eab008ca27546acbd2b1275f07bcca0b84b858c which should also be used
here.
Change-Id: Ibd9bb9f8a4c6a7ce3c6ebd11ce5cf444dde57c33
Related-Bug: #1915761
This change restores the PreNetworkConfig resources, so that we migrate
back ExtraCnfigPre and NodeExtraConfig from pre network configurations
to post network configurations, to be consistent with older version
depending on Heat software deployments instead of config download.
Depends-on: https://review.opendev.org/772303
Closes-Bug: #1907214
Change-Id: I96e7e4c570839cfba6011788464d8e93925b2f01