Commit Graph

409 Commits

Author SHA1 Message Date
Ghanshyam Mann c2ff9b8f49 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: I7f1dc7801a025d9bb28110f74340846b99870b79
2024-02-24 11:43:13 -08:00
Juan Badia Payno 88f527e353 Bug#1998501 fixed ansible conditional evaluation
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
2023-01-04 13:25:59 +01:00
Takashi Kajinami 29b8b6847a Get rid of jinja2 templating in conditional statements
... 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
2022-11-29 15:02:53 +09:00
Zuul 7f278cdfa6 Merge "Drop legacy networking resources" 2022-10-17 16:32:56 +00:00
Takashi Kajinami 2090ef676f Drop legacy networking resources
This change removes the resources and implementations for the legacy
networking method by OS::TripleO::{{role.name}}::Net::SoftwareConfig
resource types, because now the new ansible implementation is used by
default.

Depends-on: https://review.opendev.org/c/openstack/tripleo-ansible/+/859517
Depends-on: https://review.opendev.org/c/openstack/tripleo-common/+/859518
Change-Id: I74040e12503961d286a00b9e011831e77cac835b
2022-09-29 09:40:53 +09:00
Jesse Pretorius (odyssey4me) c8fba9b237 Eliminate unnecessary role looping in deploy-steps.j2
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
2022-09-26 11:24:12 +01:00
Takashi Kajinami dd6e887833 Change --start-at-task for plays using tripleo_free
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
2022-08-03 15:55:15 +05:30
Rabi Mishra e728e8cc8e Use conditions with Host prep block tasks
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
2022-08-03 08:33:31 +05:30
Brendan Shephard db92d55b31 Revert "task-core basic framework"
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
2022-06-16 09:18:29 +00:00
Takashi Kajinami 9f53e0ce5c Remove Docker support
Docker support was deprecated when we switched to CentOS 8 and has not
been tested since then.

Change-Id: I5575d344190537571ace16596e3635aeddccfe23
2022-05-30 11:37:51 +09:00
rabi 936aa927d7 Remove StackAction/StackUpdateType
Now that we don't update overcloud stacks with ephemeral heat,
we can drop these.

Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/834102
Change-Id: I9ab2fd33660022ea105e40ad5aa4f92186118abb
2022-03-21 13:18:56 +00:00
Saravanan KR 4e078fc42d Handle ping test ips when not available
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
2022-01-05 11:25:18 +05:30
Zuul 6e31b1579f Merge "task-core basic framework" 2021-11-18 17:28:49 +00:00
Alex Schultz 6d80912404 task-core basic framework
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
2021-10-28 16:35:26 -06:00
Harald Jensås 5d830980ec Add ping test for all networks gateway IPs
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
2021-10-28 23:48:33 +02:00
Zuul debf84c5df Merge "Use true/false for boolean values" 2021-10-13 17:41:48 +00:00
Takashi Kajinami 76adfd4202 Use true/false for boolean values
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
2021-10-12 09:35:38 +09:00
Harald Jensås 9e30f281fb Remove network_virtual_ips hard-coded name filter
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
2021-10-08 15:44:51 +02:00
Zuul eb837fa950 Merge "Remove and replace NetworkDeploymentActions" 2021-09-25 16:44:41 +00:00
Zuul 1caa1024e7 Merge "Don't create ExtraConfig resources per role" 2021-09-23 13:55:40 +00:00
Brendan Shephard 5edb21ee3e Remove and replace NetworkDeploymentActions
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
2021-09-14 05:28:10 +00:00
Kevin Carter d98d6d1f5c Fix playbook_dir Ansible Warning
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>
2021-07-08 11:07:00 -05:00
James Slagle bc2a0339eb Preface tasks path with {{playbook_dir}}
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>
2021-07-01 08:16:20 -04:00
ramishra 90ace4f686 Don't create ExtraConfig resources per role
This is unnecessary as it is not role specific.

Change-Id: I0e0dc33d098e40a48069a4d99ffb2013e618c04a
2021-06-08 14:53:26 +05:30
Zuul d8166c9f61 Merge "Simplify jinja for primary_role_name" 2021-06-03 21:31:29 +00:00
Kevin Carter 859f313034 Breakdown the deploy-steps playbook
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>
2021-05-25 12:03:09 -05:00
ramishra 5541696d4a Simplify jinja for primary_role_name
'disable_upgrade_deployment' to disable upgrades
has been dropped from roles_data since long.

Change-Id: I1e6c355c9fc28fed581525e42fb4ccacbfe8e896
2021-05-24 12:00:20 +05:30
Kevin Carter 127a8945f6
Fix artifact module usage
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>
2021-05-21 12:20:45 -05:00
ramishra 7fd0dd5d4b Don't add external tasks for roles with zero count
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
2021-05-12 09:06:39 +05:30
Sofer Athlan-Guyot 1fd3ef688c Make sure the container configuration is refreshed during update.
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
2021-04-29 10:07:17 +02:00
Zuul 09f9267b7d Merge "Run update tasks with become" 2021-04-27 09:19:41 +00:00
Bogdan Dobrelya dc52f3c949 Run update tasks with become
Make it aligned with the upgrade tasks, what uses become as well

Change-Id: I58da2c214c5a9cf013bc7719649e0d0d4f3a6f74
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2021-04-14 10:42:33 +02:00
Harald Jensås 23cdf4dd17 Refactor Service VIPs redis and ovn_dbs
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
2021-04-14 10:22:59 +02:00
Zuul b104f039af Merge "Use list_concat_unique instead of yaql" 2021-04-06 19:59:29 +00:00
Zuul 4749fef686 Merge "Introduce pre_deploy_step_tasks" 2021-04-06 18:58:21 +00:00
Michele Baldessari 35cb010cc8 Introduce pre_deploy_step_tasks
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
2021-04-06 09:25:34 +02:00
ramishra ef240c1f62 Use list_concat_unique instead of yaql
These tasks are already filtered per service.

Change-Id: Ib868c110f8d32619762333e1dda3ddc2b007148a
2021-04-05 10:26:30 +05:30
Zuul fdb5ac2a24 Merge "Use 'wallaby' heat_template_version" 2021-04-01 18:57:13 +00:00
Zuul 7d48e49301 Merge "Move overcloud common bootstrap tasks out of step1 deploy tasks" 2021-04-01 13:59:32 +00:00
ramishra c9991c2e31 Use 'wallaby' heat_template_version
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
2021-03-31 17:35:12 +05:30
Michele Baldessari 3e9df9576b Move overcloud common bootstrap tasks out of step1 deploy tasks
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
2021-03-30 15:31:37 +02:00
Zuul 1bb50929a4 Merge "Add artifact push interface to deployments" 2021-03-29 16:51:22 +00:00
Kevin Carter 9616f83e56 Add artifact push interface to deployments
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>
2021-03-25 21:46:14 +00:00
Michael Johnson fe53162e35 Adds net_cidr_map variable to allow cidr lists
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
2021-03-05 21:04:18 +00:00
Zuul aa98408f28 Merge "Restore PreNetworkConfig resources" 2021-03-01 20:42:08 +00:00
Alex Schultz 8d1fc85744 Use ansible_facts instead
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
2021-02-22 17:57:17 +00:00
Alex Schultz 73043121e3 Use include task for host prep tasks
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
2021-02-22 07:07:55 -07:00
Zuul 525d2278c3 Merge "Add a new role parameter rhsm_enforce." 2021-02-03 16:23:27 +00:00
Zuul 2338efd746 Merge "Move the Overcloud common bootstrap tasks for step 1 before the deploy tasks" 2021-02-02 23:40:05 +00:00
Takashi Kajinami e7894c0b23 Restore PreNetworkConfig resources
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
2021-02-01 05:56:59 +00:00