890 Commits

Author SHA1 Message Date
Brent Eagles
5fccdd3c2c Octavia: handle empty amphora image search result
In some situations, openstack image list queries on name return a 0
exit code even though there is no result.

Change-Id: I20f63ea45e52181810654f7afab11499fef9baa2
Related-Bug: #1843059
2020-04-23 10:23:52 -02:30
Brent Eagles
b187fb5b62 Using podman/docker ps to look for running sidecars
We've been running into numerous issues with searching on patterns in
the command so using the container CLI to match seems better.

Change-Id: I13633ab4d5ebfc7f52b7215523c310fe72a5487e
Closes-Bug: #1869384
2020-03-31 10:30:09 -02:30
Zuul
92b0f84876 Merge "BaR Always do MySQL dumps even the services wont be stopped" 2020-03-27 03:49:37 +00:00
Zuul
782efb215b Merge "Rework how we push the content in the file" 2020-03-26 17:06:04 +00:00
Zuul
0f90636580 Merge "Remove async from introspection" 2020-03-26 13:48:44 +00:00
Zuul
7ec3a7115b Merge "Make ceph-ansible run handle missing "{{ playbook_dir }}/ssh_key"" 2020-03-26 13:48:43 +00:00
Emilien Macchi
d6204498d7 Fix get_failed_containers() to correctly fetch container_data
To avoid this error:
The error was: KeyError: 'container_data'

We need to fetch container_data from async_result_item in the async
results; that's where the key is. Updating unit tests as well, and the
task which creates the facts so there is no confusion in the logs.

Change-Id: I2a5533335151c4b292e85aea310adfdc44ab1e02
2020-03-25 21:59:05 -04:00
Sagi Shnaidman
402885c2b3 Remove async from introspection
Remove async task from introspection, it will fail in case of
timeout due to node_timeout config
Set max_retries to 1 not to waste time and resources
In case we don't have info about nodes, something definitely went
wrong and let's fail it.
Change-Id: Ie4fbcc5fa0370832c0cf3eb5c5b363f380595db4
2020-03-25 23:35:03 +02:00
Cédric Jeanneret
75ed35c46a Rework how we push the content in the file
Since we allow to pass lists, we can't just use |join('').

In addition, using the multi-line support in YAML via the "|" creates
some issues when we want to use |join('\n'): it gets escaped, meaning we
end with a one-line content with some \n entries.

The present patch ensures that:
- generated content is still pushed in a fact to not lose time
- static content (lists) is properly treated and outputs correctly

Change-Id: I7e520035f24503e59840b34e5b2d9e9966cd6ca4
2020-03-25 16:01:18 +01:00
Steve Baker
967da6836e
Fix population of username, public keys
The expand function was failing to add the username and public keys to
the instances list. This change treats these arguments like other
defaults, and adds tests to confirm they're ending up in the instances
list.

This change also has a minor fix to the unprovision prompt validation
logic.

Change-Id: I603623511e4061e782a65d53a3118d211ea6e708
2020-03-25 07:19:20 -05:00
John Fulton
eaa13ee254 Make ceph-ansible run handle missing "{{ playbook_dir }}/ssh_key"
The SSH private key will normally be in $HOME/.ssh/id_rsa_tripleo
so if that key is present, then use it. This is a more reliable
location than "{{ playbook_dir }}/ssh_key", which will go away
with Mistral. This change is also backwards compatible as it
will fall back to using "{{ playbook_dir }}/ssh_key" in the case
that $HOME/.ssh/id_rsa_tripleo is missing. Covers one extra case
where CephAnsibleEnvironmentVariables/ANSIBLE_PRIVATE_KEY_FILE
might have been needed.

Also switches nodes_uuid_command to use ceph-ansible's ansible.cfg as
config-download may not always provide "{{ playbook_dir }}/ansible.cfg"

Change-Id: Ic7e20844877492d7c4b85f7579e90f6c9de355ec
Closes-Bug: #1868864
2020-03-24 20:13:36 +00:00
Zuul
a70139e5b9 Merge "Add baremetal node providing module" 2020-03-24 18:08:15 +00:00
Zuul
9c873191d7 Merge "Force container deletion if namespace does not exist in service_kill" 2020-03-24 17:23:36 +00:00
Zuul
d3e790da80 Merge "tripleo_container_manage: improve logging for failed containers" 2020-03-24 17:20:17 +00:00
Juan Badia Payno
fe5d3a5f9d BaR Always do MySQL dumps even the services wont be stopped
Do MySQL dump even though the services are not managed and stopped
during the backup process

Change-Id: I54891bcb28ba082f05ce705492a14bf93bba2f66
2020-03-24 02:10:48 +01:00
Rodolfo Alonso Hernandez
c516df9e51 Force container deletion if namespace does not exist in service_kill
When a service is stopped using "service_kill" script and the
namespace where the container is running does not exist, the
container processi should be forced to stop from the root namespace.

A namespace where a process is running, can be deleted whitout
stopping the mentioned process. "ip netns identify <PID>" then
returns an empty string (root namespace).

This patch will prevent an endless loop in Neutron DHCP agent. As
reported in the related bug, when a DHCP agent is resync, the DHCP
helper (metadata proxy) is stopped. In case this process stop raises
an exception (for example if the namespace does not exist), schedules
again a resync, creating an endless loop.

Change-Id: I9bac918fcde80e6a2336bc3cf1e6972512298118
Closes-Bug: #1868607
2020-03-23 18:48:49 +00:00
Zuul
e556e74d76 Merge "Remove duplicate mock requirement from test-reqs" 2020-03-23 16:11:48 +00:00
Zuul
665013a706 Merge "Add deploy plan playbook" 2020-03-23 16:11:47 +00:00
Sagi Shnaidman
16c79930a1 Add baremetal node providing module
Change-Id: I7bd1bb388e1213d8b0caf1453ab35679b04d7186
2020-03-23 15:19:58 +00:00
Emilien Macchi
62fcbf2925 tripleo_container_manage: improve logging for failed containers
If a container fails to start after many retries, the default logging of
the async_status tasks isn't great and it's hard to figure out what
container failed to start.

In this patch, we introduce a new filter that will read the
async_results and build a list of containers which failed to start
(failed to True) or did not finish to start (finished to 0); the
async_status ignores errors, but we fail a bit later after building that
list.

Change-Id: I5a2270130bdf5b9d781f4d81ec25c6ccf12fdc07
2020-03-23 14:10:13 +00:00
Rabi Mishra
91a2b34b13 Add deploy plan playbook
Change-Id: I42a65e379981fe7d7879ae5061eafe32845887b7
Depends-On: https://review.opendev.org/713580
2020-03-22 12:42:50 +05:30
Zuul
e9c37f5e55 Merge "Add Centos 8 to galaxy_info versions" 2020-03-20 22:38:29 +00:00
Zuul
86bce2c9f0 Merge "Add playbook for update deployment plan" 2020-03-20 18:24:45 +00:00
Zuul
2d6c79d43f Merge "Add playbook for create deployment plan" 2020-03-20 17:39:27 +00:00
Zuul
07dfc4ee5a Merge "Add tripleo_plan_parameters_update module" 2020-03-20 17:39:26 +00:00
Zuul
124a3da91d Merge "Add tripleo_templates_upload module" 2020-03-20 17:35:53 +00:00
Zuul
81b3a4c4a0 Merge "Filter out wrapper commands from the ps output" 2020-03-20 13:46:49 +00:00
Zuul
1a5b27c457 Merge "Add tripleo_image_params_prepare ansible module" 2020-03-20 08:02:00 +00:00
Rabi Mishra
ac40b0f5ef Add playbook for update deployment plan
This adds the playbook and required modules.

Depends-On: https://review.opendev.org/712896
Change-Id: I3090106fd24a82373ab308a1ba7f8bcd0eddecad
2020-03-20 08:09:44 +05:30
Rabi Mishra
4a988ab1d8 Add playbook for create deployment plan
This adds a playbook for creating deployment plan which would be
called from python-tripleoclient

Change-Id: Ib97d654fac3dd2ce74a50add6aedb2d0f7368dce
2020-03-19 21:52:41 +00:00
Rabi Mishra
ce16399264 Add tripleo_plan_parameters_update module
This adds ansible module to update plan parameters and optionally
validate the stack.

Change-Id: I60f4ed38584a6b55a09590d9a012d2bfb010f9bc
2020-03-19 21:52:31 +00:00
Rabi Mishra
e8c9b421f9
Add tripleo_templates_upload module
This adds a new module to upload templates to plan as a tar
file.

Change-Id: I7ac4c328ec7f4dd0fb4aa7495945fbc57feb4bbc
Depends-On: https://review.opendev.org/712599
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-03-19 16:50:59 -05:00
Rabi Mishra
d1e0e37146 Add tripleo_image_params_prepare ansible module
Uses tripleo-common library to build image params and update
the plan.

Depends-On: https://review.opendev.org/712598
Change-Id: If8df9863a3b3f18e00767d095849b48eb08486fd
2020-03-19 19:33:45 +00:00
Kevin Carter
2ee8f8cb85 change linters job to running on a cent8 node
Change-Id: I186602edc8cd4d5d7b3e9d16422460a48d1b2520
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-03-19 19:32:21 +00:00
Kevin Carter
3100780e1e Fix the docs job
This change fixes the docs job to ensure we have access to development
versions of tripleo-common. This is being done because we have more
modules coming in which are using tripleo-common which may require
unreleased versions of the package when running tests. This change
adds tripleo-common as an upstream constraint which is only used in
the docs and molecule test scenarios.

Change-Id: Ib64307defe4d5a0e06ad862ab9f51d1da3d23312
Signed-off-by: Kevin Carter <kecarter@redhat.com>
2020-03-19 19:31:20 +00:00
Sorin Sbarnea
9ac51dc172 Simplify linting
Keeps pep8 environment until we will be able to remove it from
zuul templates.

Change-Id: I1e709043bb4be93331d4511b947b181fe2ead8f4
2020-03-19 18:42:11 +00:00
Bogdan Dobrelya
b338e16692 Add Centos 8 to galaxy_info versions
Also drop Fedora 28 support

Change-Id: I03cd204f80c5cdc0be939b5f70762067f64c9ba7
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
2020-03-19 14:22:08 +01:00
Daniel Alvarez
0df3ebd759 Filter out wrapper commands from the ps output
This patch is filtering out the wrapper execution from the ps output
in the sync script. By doing this, it'll effectively detect when
the target process is not running and start it. Otherwise, there might
be cases where the process start is postponed until next iteration
of the sync script (1 minute) and it may be already too late.

This is causing tests to fail as the metadata service is not provisioned
in time for instances to fetch their SSH keys.

Change-Id: I530e257f343ffc551db9e984f9a27b20c397bfb1
Co-Authored-By: Jakub Libosvar <jlibosva@redhat.com>
Closes-Bug: #1868082
Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
2020-03-19 12:24:47 +01:00
Zuul
3bfa92d751 Merge "Make tripleo_ceph_run_ansible voting again" 2020-03-18 21:21:22 +00:00
Zuul
01dac9fa56 Merge "Cleanup old mistral key process" 2020-03-18 21:21:18 +00:00
Giulio Fidente
c3c19f70eb Make tripleo_ceph_run_ansible voting again
Also extends tripleo_ceph_run_ansible molecule job to run for
changes to any tripleo_ceph_.* role

The issue initially tracked by bug 1867012 should have been fixed
by I9952a4df122c00c0163b7e79dab8a821e3feff06

Change-Id: I79e33ca2bf5d8ae8f6e1ac39dda7710e4e65fa3a
2020-03-18 20:56:39 +01:00
Zuul
88fb84e19a Merge "Insert hosts entries to the beginning of the file." 2020-03-18 18:26:55 +00:00
Zuul
d004c80e5f Merge "Allow overriding keystone username by parameter" 2020-03-18 17:51:42 +00:00
Zuul
f7b26ecc5d Merge "Improve idempotency for images in podman container" 2020-03-18 16:21:39 +00:00
Zuul
2ba47dd457 Merge "fix all tripleo_container_* molecule jobs on centos8" 2020-03-17 22:34:23 +00:00
Zuul
0701687ba6 Merge "Unprovision confirmation, write an env file" 2020-03-17 19:36:47 +00:00
Zuul
ce03de0b8b Merge "Rename playbook.yml to converge.yml" 2020-03-17 18:59:25 +00:00
Sagi Shnaidman
4665392085 Improve idempotency for images in podman container
Add a new variable which would be used for strict images comparing
Use by default a "lite mode" which compares only image and tag.
Change-Id: I7592707c2a17654e521f6f136eabcb76c8152fba
2020-03-17 18:18:36 +02:00
Emilien Macchi
6af37d7a44 fix all tripleo_container_* molecule jobs on centos8
- --systemd needs to be given with a string (default to true, so since
  we used that argument we want true).
- Add fedora registry in the list of container registries to strip when
  figuring out what image is deployed  in podman_container (for
  idempotency). This code should be improved in a future patch to stop
  hardcoding these registries and find another way to figure out the
  image name.

Change-Id: If0d4cc6590105808a07569b60877eb440f1dd6d1
Closes-Bug: #1867787
2020-03-17 11:35:49 -04:00
Zuul
03955364d7 Merge "Baremetal Configure Playbook" 2020-03-17 13:08:22 +00:00