1109 Commits

Author SHA1 Message Date
Zuul
2d535a094d Merge "BaR - Export ceph authentication" 2020-06-04 21:31:33 +00:00
Zuul
10d5cf8e6e Merge "Do not set lo.disable_ipv6=0 by default" 2020-06-04 16:06:36 +00:00
Zuul
cda2af3608 Merge "Prepend timestamp callback output" 2020-06-04 11:26:49 +00:00
Zuul
5e47d8dc75 Merge "Add support for Octavia amphora log offloading" 2020-06-04 00:36:50 +00:00
Alex Schultz
97b68ec059 Prepend timestamp callback output
It's useful to know when a command last ran as well as being able to
cross coordinate when something was running between the ansible output
and other logs. We can use the output timestamp do this.

Change-Id: I3f55f0a7f966f025a9938576ccf735f50f4c8589
2020-06-03 14:15:50 -06:00
Michael Johnson
0d52c6066a Add support for Octavia amphora log offloading
This patch configures Octavia to enable amphora log offloading
to the Octavia rsyslog container if the OctaviaOffloadAllLogs
parameter is True.

Depends-On: https://review.opendev.org/724187
Change-Id: Ic4ee6f4a150200531491cdd78ca3c4f66e5d1ffb
2020-06-03 19:09:09 +00:00
Luca Miccini
f7fe7a3e29 Do not set lo.disable_ipv6=0 by default
Forcing lo.disable_ipv6=0 in tripleo-ansible may result in such
value being placed in /etc/sysctl.d/99-tripleo.conf *before*
net.ipv6.conf.all.disable_ipv6 = 1, thus effectively being ignored.

See rhbz#1841522 for an example of a side effect of this, where
'KernelDisableIPv6: 1' results in epmd/rabbitmq being unable to start.

Depends-on: https://review.opendev.org/#/c/732098

Change-Id: Iea01c7d6ef19ed2f0a2b7ecab15de0c30fcb4f8c
2020-06-03 08:51:09 +02:00
Hervé Beraud
c09f624891 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: I088f435bfc0dfeb67b4b2c3400aaa08eb41d7c59
2020-06-02 21:02:57 +02:00
Alex Schultz
64313d1f35 Exclude callbacks env vars for ceph-ansible
We're working on changing the default callbacks for tripleo but we don't
want to use them when invoking ceph-ansible. We should exclude the
callbacks that were used in the calling env and specifically set the
regular callbacks.

Change-Id: I6ab1709d2e0e0d60d2401281aa3bb88cfea6e5d4
Related-Bug: #1881670
2020-06-02 07:30:39 -06:00
Zuul
a180efde78 Merge "Fix conditions tuned profile" 2020-06-02 08:53:36 +00:00
Noam Angel
858f495738 Fix conditions tuned profile
tuned_isolated_cores is not bool type, check "is defined" and length >0
instead.

Change-Id: Iaeec9a8cc116023b34b357f68614c986992054a0
Closes-Bug: #1879458
2020-06-01 20:01:46 +00:00
Juan Badia Payno
4f12aeb3c1 BaR - Export ceph authentication
This patch export the ceph authentication just in case the mons
need to be rebuild from scratch

Change-Id: I1f54674d6491d3b4c1565928894db1be8b498873
2020-06-01 16:55:09 +02:00
Alex Schultz
e52089e8df Create tripleo base strategy class
In order to allow us to share some logic between the linear and free
strategies, we need to create a base strategy to use for our shared
logic.

Change-Id: I593f193f98112dbf1d493ffd22040837597db11c
2020-05-29 15:00:18 -06:00
Alex Schultz
09da864f8c Add tripleo linear strategy
Change-Id: I8539a6ad747a3923256f8c14c0a140e7670cc135
2020-05-29 15:00:14 -06:00
Alex Schultz
894a853a5e Implement run_once
Prior to this patch, run_once was basically ignored. This patch adds
tracking on tasks that are tagged with run_once and will only allow it
to be invoked once. This means if the run_once task fails, all the other
hosts will continue to process their tasks like nothing happened. The
play itself will exit if the run_once task fails at the end. For tripleo
this means that run_once should not be used for any required tasks
within a play but can be used to make sure a task will only run once
time for a given play.

Change-Id: Iaa1278763d56429b2886371a18477e1f54680e19
2020-05-29 14:02:56 -06:00
Alex Schultz
f873e31f58 Implement a tripleo free strategy
This strategy is to be used for the execution of deployment steps so
that tasks run on all hosts (up to # of workers) freely without locking
at each task.  This is closer to what we had when Heat drove the
deployments as each of the software deployments would execute
simultaneously on all nodes at the same time.

This strategy does two important things for us:

  1) Hosts execute their tasks freely with no dependencies on the other
     hosts that are running the same tasks
  2) Failures on any given host will not stop future tasks from
     executing on other hosts, but will cause the overall playbook
     execution to stop at the end of the "PLAY".

These specific things are how the previous deployment executed when Heat
was the driver of deployment actions. The nodes would fetch their list
of actions, execute and report back to status. Heat would fail the
deployment if any of the hosts failed to execute their work however a
failure on one host did not impact the other hosts.  The TripleO
deployment framework already has the step concept in itself to allow
for the individual steps (1 through 5) to execute in a parallael on all
hosts at the same time. At the end of the "PLAY", ansible waits for all
nodes to complete before proceeding on to the next "PLAY". So Step 1 is
a "PLAY" followed by Step 2. If a failure occurs during Step 1 on any
host, we would not proceed to the Step 2 play.

Change-Id: Id921ed48a948211b9a90def4a4667d015ec11d2f
2020-05-29 14:02:56 -06:00
Zuul
f7da8ff789 Merge "Add playbook for config-download" 2020-05-28 20:16:57 +00:00
Zuul
69e4bb548f Merge "Add module for downloading confg" 2020-05-28 07:55:02 +00:00
Zuul
97a5e83565 Merge "Add ansible module to generate tripleo inventory" 2020-05-27 17:23:58 +00:00
57c74da720 Add Python3 victoria unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for victoria.

See also the PTI in governance [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I318cb51f4c3a5a703f312c6d8a2d22d4a0ec4b19
2020-05-26 17:14:35 +00:00
7cbd22a0ef Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Ib651730924f36c9511bf73372c71fb5d14feaffc
Sem-Ver: feature
2020-05-26 17:14:32 +00:00
Zuul
b2b5a76231 Merge "Add security related podman options" 2020-05-25 18:09:13 +00:00
Zuul
0218bd7e65 Merge "Add missing doc & zuul job for tripleo_provision_mcelog" 2020-05-24 21:57:48 +00:00
Zuul
c81d4a6474 Merge "Add toggle for sensitive data within octavia" 2020-05-24 10:34:17 +00:00
Zuul
6d2e793332 Merge "Ensure that the playbooks and roles can display debug data when enabled" 2020-05-24 01:32:02 +00:00
Kevin Carter
b7e8f8f9d3 Add toggle for sensitive data within octavia
This change will allow deployers to expose sensitive data as needed.

Change-Id: I717b34920ab0129a2bac287015a6cd1053c7e1c9
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-05-23 15:05:03 +00:00
Kevin Carter
65e6e5b035 Ensure that the playbooks and roles can display debug data when enabled
This change will enable or disable no_log and debug options whenever the
verbosity is set to an integer greater than 2. This will ensure operators and
deployers are best equipped to troubleshoot issues by dynamically providing
additional data in an expected way. To ensure we're able to differentiate
between output masking and security masking, two options were used to enable or
disable no_log across our roles and playbooks.

> All debug options, without security implications, will now react to the
  `ansible_verbosity` built in by default. Changes have been made to our
  skeleton role to ensure this is enforced on all new roles created going
  forward.

> An additional prefixed role option, `*_hide_sensitive_logs`, has been added to
  allow operators to easily toggle sensitive output when required. The role
  prefixed variables will respond to the global option `hide_sensitive_logs` as
  defined in THT which will ensure a consistent user experience.

Depends-On: I84f3982811ade59bac5ebaf3a124f9bfa6fa22a4
Change-Id: Ia6658110326899107a0e277f0d2574c79a8a820b
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-05-23 15:04:10 +00:00
Zuul
f99dea3b50 Merge "Create derived parameters playbook, and role" 2020-05-23 07:46:59 +00:00
Zuul
fbaec6f205 Merge "move undercloud-containers to nv" 2020-05-22 22:49:42 +00:00
Emilien Macchi
ed6893bd16 Add missing doc & zuul job for tripleo_provision_mcelog
* Use become: true or the role can't be run as a regular user.
* Add the missing rst file that will generate the doc for the
  tripleo_provision_mcelog role.
* Add zuul layout to create the molecule job so we can test
  tripleo_provision_mcelog.
* Remove useless molecule/default/Dockerfile
* Update molecule/default/molecule.yml to match with other roles

Change-Id: I50efdfe02a3deec961f0a1fde473458ca6110698
2020-05-22 16:17:29 -04:00
Kevin Carter
c16b0afab8 Create derived parameters playbook, and role
The new `cli-derive-parameters.yaml` has been built to replace the mistral
workflow of the same name. This new playbook is leveraging several modules
which take advantage of the new ansible module utilities for tripleo-common.

The role `tripleo_derived_parameters` has been created, which will house all
of the required tasks to ensure an effective execution while also providing a
medium to test our process.

> Mock data has been added from a real deployment to ensure that the role
  data processing is correct and tested accordingly.

Change-Id: I6f3f797a37724d0eb91b37514087462ac25d175e
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-05-22 20:02:03 +00:00
Zuul
e65b22d2c8 Merge "Add tripleo_profile_tasks for tripleo_dense output" 2020-05-22 19:52:52 +00:00
Zuul
906ab19b5a Merge "Add tripleo dense formatting" 2020-05-22 19:52:51 +00:00
Zuul
4d8208af3d Merge "Add tripleo callback" 2020-05-22 19:52:49 +00:00
Zuul
d84b9cb412 Merge "added mcelog role" 2020-05-22 19:01:48 +00:00
Grzegorz Grasza
fbacb3752f Add security related podman options
These options can be used instead of the --privileged option with
some containerised services in TripleO.

Change-Id: If1d97e5f1697fdc1d6a7b845cf116d54b1897245
2020-05-22 16:28:11 +02:00
Rabi Mishra
cebe6593b8 Add playbook for config-download
This playbook generates the inventory and config-download
playbooks from heat stack output.

Change-Id: I307e89f152adce8f091a8904ca32ab13d0dff3c2
2020-05-22 13:40:01 +05:30
Zuul
c241070e4a Merge "tripleo_container_manage: set log_level appropriately" 2020-05-22 00:21:00 +00:00
Zuul
c30393b2cb Merge "Add log level config to podman_container module" 2020-05-21 21:42:59 +00:00
Emilien Macchi
98eaa0026d tripleo_container_manage: set log_level appropriately
If debug is enabled we want the new log level option to be debug
otherwise fallback to error like it's the default in the module.

Change-Id: I7ceed8d9720c0df8a88c7e1de9d9afd05afde166
2020-05-21 11:09:12 -04:00
Rabi Mishra
9f9b93f6b1 Add module for downloading confg
Make heat calls to download the config for a plan.

Change-Id: I5005e73807128cb9e283cc60a4ce2e2cafeb12c5
2020-05-21 18:11:19 +05:30
Rabi Mishra
bf203da389 Add ansible module to generate tripleo inventory
This adds a module to generate ansible inventory for a plan.

Depends-On: https://review.opendev.org/#/c/729928/
Change-Id: Ifc4bad57dc6f20c73e9082d30f814ad89742b31b
2020-05-21 18:11:17 +05:30
Sagi Shnaidman
61f28d58bd Add log level config to podman_container module
Add option to configure log-level for podman.
Print stderr, stdout and rc in case of "debug" option.
Fail container module if there is stderr not empty (excluding logs)

Change-Id: Id3854e70608fae9721978263d503bbeaf20d64e8
2020-05-21 14:34:21 +03:00
Emilien Macchi
60e59345b8 container_manage: fix number of retries to match 10 minutes
10 minutes is what we should aim for and we were doing 7 min 30s before,
since we rely on the default delay (5s and not 10s).

Change-Id: I95182701212717d8998ff9eb0737919b51350d21
2020-05-20 19:47:44 +00:00
Emilien Macchi
d160d8c4b0 podman/create: make containers_to_check more realistic
containers_to_check is a list of containers that run something and then
exit with a return code. Later we will check what their return code is
and make sure the containers didn't fail before we continue with the
deployment.

Also, if a container failed to be created or updated; we don't want to include
it in the list that contains the containers in which we want to check if
the returned RC is valid; since we already know the container didn't
terminate correctly.

Closes-Bug: #1878405
Change-Id: Ia3a985d923c5f44babaae601f3ba62b6d48659da
2020-05-20 10:52:14 -04:00
Zuul
bffbba4b4c Merge "Add centos support to EFI kernel args" 2020-05-20 09:46:18 +00:00
Zuul
37de50e370 Merge "Correctly match openvswitch package" 2020-05-19 23:16:06 +00:00
Zuul
9f6eeb9057 Merge "tripleo_container_manage: increase timeout to 15min" 2020-05-19 22:43:04 +00:00
Zuul
4162446148 Merge "Improve deployer UX by limiting failure output potential" 2020-05-19 19:44:12 +00:00
Emilien Macchi
5991cbd156 tripleo_container_manage: increase timeout to 15min
neutron db sync can take up to 15 min (seen in CI...).

Change-Id: Ib0e155bb69142ec79238577ade61f54e627cb4e1
2020-05-19 13:47:23 -04:00